refactor(ui): Use IconButton's tooltip method instead of the Tooltip widget in BrandHeroScreen

This commit is contained in:
Inex Code 2024-04-11 13:53:08 +03:00
parent 5cfeb8aba8
commit 104beea2d6
1 changed files with 23 additions and 25 deletions

View File

@ -142,32 +142,30 @@ class _HeroSliverAppBarState extends State<HeroSliverAppBar> {
if (widget.hasFlashButton && isMobile) if (widget.hasFlashButton && isMobile)
AnimatedSwitcher( AnimatedSwitcher(
duration: const Duration(milliseconds: 300), duration: const Duration(milliseconds: 300),
child: Tooltip( child: IconButton(
message: 'jobs.title'.tr(), onPressed: () {
child: IconButton( showModalBottomSheet(
onPressed: () { context: context,
showModalBottomSheet( useRootNavigator: true,
context: context, isScrollControlled: true,
useRootNavigator: true, builder: (final BuildContext context) =>
isScrollControlled: true, DraggableScrollableSheet(
builder: (final BuildContext context) => expand: false,
DraggableScrollableSheet( maxChildSize: 0.9,
expand: false, minChildSize: 0.4,
maxChildSize: 0.9, initialChildSize: 0.6,
minChildSize: 0.4, builder: (final context, final scrollController) =>
initialChildSize: 0.6, JobsContent(controller: scrollController),
builder: (final context, final scrollController) => ),
JobsContent(controller: scrollController), );
), },
); icon: Icon(
}, isJobsListEmpty ? Ionicons.flash_outline : Ionicons.flash,
icon: Icon(
isJobsListEmpty ? Ionicons.flash_outline : Ionicons.flash,
),
color: isJobsListEmpty
? Theme.of(context).colorScheme.onBackground
: Theme.of(context).colorScheme.primary,
), ),
color: isJobsListEmpty
? Theme.of(context).colorScheme.onBackground
: Theme.of(context).colorScheme.primary,
tooltip: 'jobs.title'.tr(),
), ),
), ),
const SizedBox.shrink(), const SizedBox.shrink(),