WIP: Bearbeiten und Löschen von Gruppen #148

Draft
sneeex wants to merge 6 commits from feature/118-bearbeiten-und-löschen-von-gruppen into development
2 changed files with 7 additions and 7 deletions
Showing only changes of commit b6dd0541ae - Show all commits

View File

@@ -10,17 +10,17 @@ import 'package:game_tracker/presentation/widgets/player_selection.dart';
import 'package:game_tracker/presentation/widgets/text_input/text_input_field.dart'; import 'package:game_tracker/presentation/widgets/text_input/text_input_field.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class CreateGroupView extends StatefulWidget { class GroupDetailView extends StatefulWidget {
const CreateGroupView({super.key, this.groupToEdit}); const GroupDetailView({super.key, this.groupToEdit});
/// The group to edit, if any /// The group to edit, if any
final Group? groupToEdit; final Group? groupToEdit;
@override @override
State<CreateGroupView> createState() => _CreateGroupViewState(); State<GroupDetailView> createState() => _GroupDetailViewState();
} }
class _CreateGroupViewState extends State<CreateGroupView> { class _GroupDetailViewState extends State<GroupDetailView> {
late final AppDatabase db; late final AppDatabase db;
/// GlobalKey for ScaffoldMessenger to show snackbars /// GlobalKey for ScaffoldMessenger to show snackbars
@@ -145,7 +145,7 @@ class _CreateGroupViewState extends State<CreateGroupView> {
); );
*/ */
success = false; success = false;
}; }
if (!context.mounted) return; if (!context.mounted) return;
if (success) { if (success) {
Navigator.pop(context); Navigator.pop(context);

View File

@@ -78,7 +78,7 @@ class _GroupsViewState extends State<GroupsView> {
context, context,
adaptivePageRoute( adaptivePageRoute(
builder: (context) { builder: (context) {
return CreateGroupView(groupToEdit: groups[index]); return GroupDetailView(groupToEdit: groups[index]);
}, },
), ),
); );
@@ -100,7 +100,7 @@ class _GroupsViewState extends State<GroupsView> {
context, context,
adaptivePageRoute( adaptivePageRoute(
builder: (context) { builder: (context) {
return const CreateGroupView(); return const GroupDetailView();
}, },
), ),
); );