change container creation handling
This commit is contained in:
@@ -134,7 +134,7 @@ class ContainerEditScreen extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
if (context.mounted) {
|
||||
context.pop();
|
||||
context.pop(container);
|
||||
}
|
||||
},
|
||||
icon: const Icon(Icons.check),
|
||||
|
||||
@@ -156,15 +156,9 @@ class ContainerListScreen extends HookConsumerWidget {
|
||||
.unusedRandomContainerColor();
|
||||
|
||||
if (context.mounted) {
|
||||
final result = await ContainerCreateRoute(
|
||||
await ContainerCreateRoute(
|
||||
ContainerData(id: uuid.v7(), color: initialColor),
|
||||
).push<ContainerData?>(context);
|
||||
|
||||
if (result != null) {
|
||||
await ref
|
||||
.read(containerRepositoryProvider.notifier)
|
||||
.addContainer(result);
|
||||
}
|
||||
).push(context);
|
||||
}
|
||||
},
|
||||
label: const Text('Container'),
|
||||
|
||||
+2
-8
@@ -83,15 +83,9 @@ class ContainerSelectionScreen extends HookConsumerWidget {
|
||||
.unusedRandomContainerColor();
|
||||
|
||||
if (context.mounted) {
|
||||
final result = await ContainerCreateRoute(
|
||||
await ContainerCreateRoute(
|
||||
ContainerData(id: uuid.v7(), color: initialColor),
|
||||
).push<ContainerData?>(context);
|
||||
|
||||
if (result != null) {
|
||||
await ref
|
||||
.read(containerRepositoryProvider.notifier)
|
||||
.addContainer(result);
|
||||
}
|
||||
).push(context);
|
||||
}
|
||||
},
|
||||
label: const Text('Container'),
|
||||
|
||||
Reference in New Issue
Block a user