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

pull/462/head
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)
AnimatedSwitcher(
duration: const Duration(milliseconds: 300),
child: Tooltip(
message: 'jobs.title'.tr(),
child: IconButton(
onPressed: () {
showModalBottomSheet(
context: context,
useRootNavigator: true,
isScrollControlled: true,
builder: (final BuildContext context) =>
DraggableScrollableSheet(
expand: false,
maxChildSize: 0.9,
minChildSize: 0.4,
initialChildSize: 0.6,
builder: (final context, final scrollController) =>
JobsContent(controller: scrollController),
),
);
},
icon: Icon(
isJobsListEmpty ? Ionicons.flash_outline : Ionicons.flash,
),
color: isJobsListEmpty
? Theme.of(context).colorScheme.onBackground
: Theme.of(context).colorScheme.primary,
child: IconButton(
onPressed: () {
showModalBottomSheet(
context: context,
useRootNavigator: true,
isScrollControlled: true,
builder: (final BuildContext context) =>
DraggableScrollableSheet(
expand: false,
maxChildSize: 0.9,
minChildSize: 0.4,
initialChildSize: 0.6,
builder: (final context, final scrollController) =>
JobsContent(controller: scrollController),
),
);
},
icon: Icon(
isJobsListEmpty ? Ionicons.flash_outline : Ionicons.flash,
),
color: isJobsListEmpty
? Theme.of(context).colorScheme.onBackground
: Theme.of(context).colorScheme.primary,
tooltip: 'jobs.title'.tr(),
),
),
const SizedBox.shrink(),