fix(ui): Follow MD3 guidelines regarding FABs on NavigationRails

This commit is contained in:
Inex Code 2024-11-11 03:35:14 +03:00
parent 2c11bf777d
commit d83f8b4723
2 changed files with 4 additions and 0 deletions

View file

@ -26,6 +26,7 @@ class _NavigationRail extends SubrouteSelector {
leading: showFab leading: showFab
? const BrandFab( ? const BrandFab(
extended: false, extended: false,
elevation: 0.0,
) )
: null, : null,
groupAlignment: 0.0, groupAlignment: 0.0,

View file

@ -8,10 +8,12 @@ import 'package:selfprivacy/utils/show_jobs_modal.dart';
class BrandFab extends StatefulWidget { class BrandFab extends StatefulWidget {
const BrandFab({ const BrandFab({
this.extended = false, this.extended = false,
this.elevation,
super.key, super.key,
}); });
final bool extended; final bool extended;
final double? elevation;
@override @override
State<BrandFab> createState() => _BrandFabState(); State<BrandFab> createState() => _BrandFabState();
@ -64,6 +66,7 @@ class _BrandFabState extends State<BrandFab>
}, },
isExtended: widget.extended, isExtended: widget.extended,
tooltip: 'jobs.title'.tr(), tooltip: 'jobs.title'.tr(),
elevation: widget.elevation,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,