aboutsummaryrefslogtreecommitdiffstats
path: root/lib/presentation/common_widget/settings_top_bar.dart
blob: fb4e9535aa6fc5beea4c1bc3c5ea396722fe148d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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,
    );
  }
}