ok for now
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/// Shared helpers to open Settings from app bars.
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../screens/settings_screen.dart';
|
||||
|
||||
List<Widget> bankAppBarActions({
|
||||
required BuildContext context,
|
||||
VoidCallback? onRefresh,
|
||||
bool refreshing = false,
|
||||
}) {
|
||||
return [
|
||||
if (onRefresh != null)
|
||||
IconButton(
|
||||
tooltip: 'Refresh',
|
||||
onPressed: refreshing ? null : onRefresh,
|
||||
icon: const Icon(Icons.refresh),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: 'Settings',
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute<void>(builder: (_) => const SettingsScreen()),
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.settings_outlined),
|
||||
),
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user