♻️ New auto impl leading

This commit is contained in:
2024-12-05 22:22:38 +08:00
parent 5dd2e83389
commit d0a4eeb2b2
11 changed files with 37 additions and 30 deletions

View File

@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
import 'package:responsive_framework/responsive_framework.dart';
import 'package:surface/widgets/navigation/app_scaffold.dart';
class AutoAppBarLeading extends StatelessWidget {
const AutoAppBarLeading({super.key});
@override
Widget build(BuildContext context) {
return ResponsiveBreakpoints.of(context).smallerOrEqualTo(MOBILE)
? DrawerButton(onPressed: () {
globalRootScaffoldKey.currentState?.openDrawer();
})
: Navigator.canPop(context)
? BackButton()
: const SizedBox();
}
}

View File

@@ -56,7 +56,7 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer> {
],
).padding(
horizontal: 32,
top: MediaQuery.of(context).padding.top > 16 ? 8 : 16,
top: MediaQuery.of(context).padding.top > 16 ? 8 : 24,
bottom: 8,
),
...destinations.where((ele) => ele.isPinned).map((ele) {