mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-06 11:09:28 +00:00
* refactor: consolidate theme definitions by removing separate dark and light theme files * feat: integrate dynamic color support and enhance theme settings management * feat: add theme settings route and update theme management in app settings * feat: enhance theme management by integrating high contrast support in various components * feat: implement mode selection dialog for theme settings and enhance button functionality * refactor: update theme import paths and consolidate theme provider files * feat: enhance theme management by integrating theme selection based on audiobook playback * refactor: update default value for useMaterialThemeFromSystem to false in theme settings * refactor: adjust high contrast condition order in theme settings for consistency * refactor: rename useMaterialThemeOfPlayingItem to useCurrentPlayerThemeThroughoutApp for clarity * refactor: correct spelling in system theme provider and replace with updated implementation * refactor: extract restore backup dialog into a separate widget for improved readability * refactor: reorganize settings sections for clarity and improve restore dialog functionality
38 lines
694 B
Dart
38 lines
694 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class OkButton<T> extends StatelessWidget {
|
|
const OkButton({
|
|
super.key,
|
|
this.onPressed,
|
|
});
|
|
|
|
final void Function()? onPressed;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TextButton(
|
|
onPressed: onPressed,
|
|
child: const Text('OK'),
|
|
);
|
|
}
|
|
}
|
|
|
|
class CancelButton extends StatelessWidget {
|
|
const CancelButton({
|
|
super.key,
|
|
this.onPressed,
|
|
});
|
|
|
|
final void Function()? onPressed;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TextButton(
|
|
onPressed: () {
|
|
onPressed?.call();
|
|
Navigator.of(context).pop();
|
|
},
|
|
child: const Text('Cancel'),
|
|
);
|
|
}
|
|
}
|