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, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Expanded( Expanded(
child: widget.isNameEditable child: TextField(
? TextField( controller: _nameController,
controller: _nameController, style: Theme.of(context).textTheme.titleLarge,
style: Theme.of(context).textTheme.titleLarge, enabled: widget.isNameEditable,
decoration: const InputDecoration( decoration: const InputDecoration.collapsed(
labelText: 'Game Name', hintText: 'New Game',
border: OutlineInputBorder(), ),
), onChanged: (value) => widget.onGameUpdated(Game(
onChanged: (value) => widget.onGameUpdated(Game( name: value,
name: value, versionRegex: widget.game.versionRegex,
versionRegex: widget.game.versionRegex, lastPlayed: widget.game.lastPlayed,
lastPlayed: widget.game.lastPlayed, rssFeedUrl: widget.game.rssFeedUrl,
rssFeedUrl: widget.game.rssFeedUrl, actualVersion: widget.game.actualVersion,
actualVersion: widget.game.actualVersion, lastUpdated: widget.game.lastUpdated,
lastUpdated: widget.game.lastUpdated, )),
)), ),
)
: Text(
widget.game.name,
style: Theme.of(context).textTheme.titleLarge,
),
), ),
Row( Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,