-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TW-1308: remove back button in setting in web
- Loading branch information
1 parent
26c42da
commit 10cd42a
Showing
10 changed files
with
68 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
lib/pages/settings_dashboard/settings/settings_app_bar.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:fluffychat/config/app_config.dart'; | ||
import 'package:fluffychat/di/global/get_it_initializer.dart'; | ||
import 'package:fluffychat/utils/responsive/responsive_utils.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class SettingsAppBar extends StatelessWidget implements PreferredSizeWidget { | ||
final Widget? title; | ||
|
||
final BuildContext context; | ||
|
||
final List<Widget>? actions; | ||
|
||
const SettingsAppBar({ | ||
super.key, | ||
required this.title, | ||
required this.context, | ||
this.actions, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final responsiveUtils = getIt.get<ResponsiveUtils>(); | ||
return AppBar( | ||
title: title, | ||
leading: responsiveUtils.isMobile(context) | ||
? const BackButton() | ||
: const SizedBox.shrink(), | ||
actions: actions, | ||
); | ||
} | ||
|
||
@override | ||
Size get preferredSize => Size.fromHeight(AppConfig.toolbarHeight(context)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters