123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import 'package:flutter/cupertino.dart';
- import 'package:photos/theme/ente_theme.dart';
- class KeyboardTopButton extends StatelessWidget {
- final VoidCallback? onDoneTap;
- final VoidCallback? onCancelTap;
- final String doneText;
- final String cancelText;
- const KeyboardTopButton({
- super.key,
- this.doneText = "Done",
- this.cancelText = "Cancel",
- this.onDoneTap,
- this.onCancelTap,
- });
- @override
- Widget build(BuildContext context) {
- final enteTheme = getEnteTextTheme(context);
- final colorScheme = getEnteColorScheme(context);
- return Container(
- width: double.infinity,
- decoration: BoxDecoration(
- border: Border(
- top: BorderSide(width: 1.0, color: colorScheme.strokeFaint),
- bottom: BorderSide(width: 1.0, color: colorScheme.strokeFaint),
- ),
- color: colorScheme.backgroundElevated2,
- ),
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 10.0),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- CupertinoButton(
- padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 14),
- onPressed: onCancelTap,
- child: Text(cancelText, style: enteTheme.bodyBold),
- ),
- CupertinoButton(
- padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 14),
- onPressed: onDoneTap,
- child: Text(doneText, style: enteTheme.bodyBold),
- ),
- ],
- ),
- ),
- );
- }
- }
|