From d83f8b4723b4fe79c55a359335f17768d32c834d Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 11 Nov 2024 03:35:14 +0300 Subject: [PATCH] fix(ui): Follow MD3 guidelines regarding FABs on NavigationRails --- .../root_scaffold_with_subroute_selector/navigation_rail.dart | 1 + lib/ui/molecules/buttons/flash_fab.dart | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/ui/layouts/root_scaffold_with_subroute_selector/navigation_rail.dart b/lib/ui/layouts/root_scaffold_with_subroute_selector/navigation_rail.dart index ef511018..aa910c03 100644 --- a/lib/ui/layouts/root_scaffold_with_subroute_selector/navigation_rail.dart +++ b/lib/ui/layouts/root_scaffold_with_subroute_selector/navigation_rail.dart @@ -26,6 +26,7 @@ class _NavigationRail extends SubrouteSelector { leading: showFab ? const BrandFab( extended: false, + elevation: 0.0, ) : null, groupAlignment: 0.0, diff --git a/lib/ui/molecules/buttons/flash_fab.dart b/lib/ui/molecules/buttons/flash_fab.dart index 6c4810b6..7fbe85c5 100644 --- a/lib/ui/molecules/buttons/flash_fab.dart +++ b/lib/ui/molecules/buttons/flash_fab.dart @@ -8,10 +8,12 @@ import 'package:selfprivacy/utils/show_jobs_modal.dart'; class BrandFab extends StatefulWidget { const BrandFab({ this.extended = false, + this.elevation, super.key, }); final bool extended; + final double? elevation; @override State createState() => _BrandFabState(); @@ -64,6 +66,7 @@ class _BrandFabState extends State }, isExtended: widget.extended, tooltip: 'jobs.title'.tr(), + elevation: widget.elevation, child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,