Refactored views

This commit is contained in:
2026-01-07 13:27:39 +01:00
parent a78614851b
commit 6e45e9435b
11 changed files with 117 additions and 67 deletions

View File

@@ -18,15 +18,17 @@ class CreateGroupView extends StatefulWidget {
}
class _CreateGroupViewState extends State<CreateGroupView> {
final _groupNameController = TextEditingController();
late final AppDatabase db;
/// Controller for the group name input field
final _groupNameController = TextEditingController();
/// List of currently selected players
List<Player> selectedPlayers = [];
@override
void initState() {
super.initState();
db = Provider.of<AppDatabase>(context, listen: false);
_groupNameController.addListener(() {
setState(() {});

View File

@@ -21,7 +21,11 @@ class GroupsView extends StatefulWidget {
class _GroupsViewState extends State<GroupsView> {
late final AppDatabase db;
/// Loaded groups from the database
late List<Group> loadedGroups;
/// Loading state
bool isLoading = true;
List<Group> groups = List.filled(