✨ Adaptive app bar leading
This commit is contained in:
@@ -4,6 +4,12 @@ import 'package:solian/shells/root_shell.dart';
|
||||
class AppBarLeadingButton extends StatelessWidget {
|
||||
const AppBarLeadingButton({super.key});
|
||||
|
||||
static Widget? adaptive(BuildContext context) {
|
||||
final hasContent =
|
||||
Navigator.canPop(context) || rootScaffoldKey.currentState!.hasDrawer;
|
||||
return hasContent ? const AppBarLeadingButton() : null;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (Navigator.canPop(context)) {
|
||||
|
Reference in New Issue
Block a user