feat: remove unused methods and improve widget styling in various screens
Test Suite / test (24.15.0) (push) Has been cancelled
Test Suite / test (24.15.0) (push) Has been cancelled
This commit is contained in:
@@ -111,13 +111,6 @@ class AppShell extends ConsumerWidget {
|
||||
!location.startsWith('/recipes/');
|
||||
final isImportRoute = location == '/import';
|
||||
|
||||
Future<void> logout() async {
|
||||
await ref.read(authStateProvider.notifier).logout();
|
||||
if (context.mounted) {
|
||||
context.go('/login');
|
||||
}
|
||||
}
|
||||
|
||||
Widget shell = Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(selectedDestination.title),
|
||||
|
||||
@@ -35,14 +35,6 @@ class CategoryThenProductPicker {
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
/// Hittar en nod med givet id djupet i trädet.
|
||||
static AdminCategoryNode? _findNode(List<AdminCategoryNode> nodes, int id) {
|
||||
for (final node in nodes) {
|
||||
if (node.id == id) return node;
|
||||
final found = _findNode(node.children, id);
|
||||
if (found != null) return found;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,8 @@ class ProductPickerField extends StatelessWidget {
|
||||
onChanged?.call(null);
|
||||
return;
|
||||
}
|
||||
if (result is int) onChanged?.call(result);
|
||||
if (result is! int) return;
|
||||
onChanged?.call(result);
|
||||
}
|
||||
|
||||
/// Öppnar produktväljarens bottenark utan att binda den till en specifik widget-instans.
|
||||
|
||||
Reference in New Issue
Block a user