MVP #141
@@ -112,6 +112,7 @@ class _CreateGroupViewState extends State<CreateGroupView> {
|
|||||||
bool success = await db.playerDao.addPlayer(
|
bool success = await db.playerDao.addPlayer(
|
||||||
player: Player(name: playerName),
|
player: Player(name: playerName),
|
||||||
);
|
);
|
||||||
|
if (!context.mounted) return;
|
||||||
if (success) {
|
if (success) {
|
||||||
loadPlayerList();
|
loadPlayerList();
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
@@ -120,7 +121,7 @@ class _CreateGroupViewState extends State<CreateGroupView> {
|
|||||||
content: Center(
|
content: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'Successfully added player $playerName.',
|
'Successfully added player $playerName.',
|
||||||
style: TextStyle(color: Colors.white),
|
style: const TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -132,7 +133,7 @@ class _CreateGroupViewState extends State<CreateGroupView> {
|
|||||||
content: Center(
|
content: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'Could not add player $playerName.',
|
'Could not add player $playerName.',
|
||||||
style: TextStyle(color: Colors.white),
|
style: const TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class CustomSearchBar extends StatelessWidget {
|
|||||||
: Colors.grey.withValues(alpha: 0.2),
|
: Colors.grey.withValues(alpha: 0.2),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
]
|
]
|
||||||
: null,
|
: null,
|
||||||
backgroundColor: WidgetStateProperty.all(CustomTheme.boxColor),
|
backgroundColor: WidgetStateProperty.all(CustomTheme.boxColor),
|
||||||
|
|||||||
Reference in New Issue
Block a user