rename CreateGroupView to GroupDetailView for clarity and consistency
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user