refactor: Deprecate showFab on BrandHeroScreen

pull/203/head
Inex Code 2023-02-24 15:12:03 +03:00 committed by Gitea
parent 1f5f366bc5
commit 9d6721d58b
2 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class BrandHeroScreen extends StatelessWidget {
required this.children, required this.children,
super.key, super.key,
this.hasBackButton = true, this.hasBackButton = true,
this.hasFlashButton = true, this.hasFlashButton = false,
this.heroIcon, this.heroIcon,
this.heroIconWidget, this.heroIconWidget,
this.heroTitle = '', this.heroTitle = '',
@ -20,6 +20,7 @@ class BrandHeroScreen extends StatelessWidget {
final List<Widget> children; final List<Widget> children;
final bool hasBackButton; final bool hasBackButton;
@Deprecated('Flash button is now provided by root scaffold')
final bool hasFlashButton; final bool hasFlashButton;
final IconData? heroIcon; final IconData? heroIcon;
final Widget? heroIconWidget; final Widget? heroIconWidget;

View File

@ -52,6 +52,9 @@ class RootScaffoldWithNavigation extends StatelessWidget {
hidden: !(Breakpoints.small.isActive(context) && showBottomBar), hidden: !(Breakpoints.small.isActive(context) && showBottomBar),
key: const Key('bottomBar'), key: const Key('bottomBar'),
), ),
floatingActionButton: showFab && Breakpoints.small.isActive(context)
? const BrandFab()
: null,
); );
} }
} }