Make new new

This commit is contained in:
2025-02-22 15:04:02 +01:00
parent a4a95c3c41
commit ef97b1eb30

View File

@@ -86,27 +86,22 @@ class _GameCardState extends State<GameCard> with SingleTickerProviderStateMixin
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: widget.isNameEditable
? TextField(
controller: _nameController,
style: Theme.of(context).textTheme.titleLarge,
decoration: const InputDecoration(
labelText: 'Game Name',
border: OutlineInputBorder(),
),
onChanged: (value) => widget.onGameUpdated(Game(
name: value,
versionRegex: widget.game.versionRegex,
lastPlayed: widget.game.lastPlayed,
rssFeedUrl: widget.game.rssFeedUrl,
actualVersion: widget.game.actualVersion,
lastUpdated: widget.game.lastUpdated,
)),
)
: Text(
widget.game.name,
style: Theme.of(context).textTheme.titleLarge,
),
child: TextField(
controller: _nameController,
style: Theme.of(context).textTheme.titleLarge,
enabled: widget.isNameEditable,
decoration: const InputDecoration.collapsed(
hintText: 'New Game',
),
onChanged: (value) => widget.onGameUpdated(Game(
name: value,
versionRegex: widget.game.versionRegex,
lastPlayed: widget.game.lastPlayed,
rssFeedUrl: widget.game.rssFeedUrl,
actualVersion: widget.game.actualVersion,
lastUpdated: widget.game.lastUpdated,
)),
),
),
Row(
mainAxisSize: MainAxisSize.min,