summaryrefslogtreecommitdiffstats
path: root/lib/presentation/common_widget/settings_top_bar.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/presentation/common_widget/settings_top_bar.dart')
-rw-r--r--lib/presentation/common_widget/settings_top_bar.dart37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/presentation/common_widget/settings_top_bar.dart b/lib/presentation/common_widget/settings_top_bar.dart
new file mode 100644
index 0000000..fb4e953
--- /dev/null
+++ b/lib/presentation/common_widget/settings_top_bar.dart
@@ -0,0 +1,37 @@
+import '../../export.dart';
+
+class SettingsTopBar extends ConsumerStatefulWidget
+ implements PreferredSizeWidget {
+ final String title;
+ const SettingsTopBar(this.title, {super.key});
+
+ @override
+ SettingsTopBarState createState() => SettingsTopBarState();
+ @override
+ Size get preferredSize => const Size.fromHeight(50);
+}
+
+class SettingsTopBarState extends ConsumerState<SettingsTopBar> {
+ @override
+ Widget build(
+ BuildContext context,
+ ) {
+ return AppBar(
+ elevation: 0,
+ backgroundColor: const Color(0xFF0D113F),
+ leading: BackButton(
+ onPressed: () {
+ context.flow<AppState>().update((state) => AppState.settings);
+ },
+ ),
+ title: Text(
+ widget.title,
+ style: const TextStyle(
+ fontStyle: FontStyle.normal,
+ fontWeight: FontWeight.normal,
+ fontSize: 20),
+ ),
+ //centerTitle: true,
+ );
+ }
+}