feat: remove unused methods and improve widget styling in various screens
Test Suite / test (24.15.0) (push) Has been cancelled

This commit is contained in:
Nils-Johan Gynther
2026-05-08 15:28:54 +02:00
parent 5019bf6acf
commit 84dbe8490d
7 changed files with 7 additions and 22 deletions
-7
View File
@@ -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.