Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
ad04a6317b | |||
ba8b669399 |
@@ -64,10 +64,10 @@ class _GameCardState extends State<GameCard>
|
|||||||
if (name.isNotEmpty) {
|
if (name.isNotEmpty) {
|
||||||
widget.onGameUpdated(
|
widget.onGameUpdated(
|
||||||
Game(
|
Game(
|
||||||
name: name,
|
name: name.trim(),
|
||||||
versionRegex: _versionRegexController.text,
|
versionRegex: _versionRegexController.text,
|
||||||
lastPlayed: _lastPlayedController.text,
|
lastPlayed: _lastPlayedController.text.trim(),
|
||||||
rssFeedUrl: _rssFeedUrlController.text,
|
rssFeedUrl: _rssFeedUrlController.text.trim(),
|
||||||
actualVersion: widget.game.actualVersion,
|
actualVersion: widget.game.actualVersion,
|
||||||
lastUpdated: widget.game.lastUpdated,
|
lastUpdated: widget.game.lastUpdated,
|
||||||
imageData: widget.game.imageData,
|
imageData: widget.game.imageData,
|
||||||
@@ -156,10 +156,10 @@ class _GameCardState extends State<GameCard>
|
|||||||
final imageBytes = await image.readAsBytes();
|
final imageBytes = await image.readAsBytes();
|
||||||
final updatedGame = await GameRepository.updateImage(
|
final updatedGame = await GameRepository.updateImage(
|
||||||
Game(
|
Game(
|
||||||
name: widget.game.name,
|
name: widget.game.name.trim(),
|
||||||
versionRegex: _versionRegexController.text,
|
versionRegex: _versionRegexController.text,
|
||||||
lastPlayed: _lastPlayedController.text,
|
lastPlayed: _lastPlayedController.text.trim(),
|
||||||
rssFeedUrl: _rssFeedUrlController.text,
|
rssFeedUrl: _rssFeedUrlController.text.trim(),
|
||||||
actualVersion: widget.game.actualVersion,
|
actualVersion: widget.game.actualVersion,
|
||||||
lastUpdated: widget.game.lastUpdated,
|
lastUpdated: widget.game.lastUpdated,
|
||||||
imageData: imageBytes,
|
imageData: imageBytes,
|
||||||
@@ -183,7 +183,10 @@ class _GameCardState extends State<GameCard>
|
|||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
opacity: 0.4,
|
opacity: 0.4,
|
||||||
child: Image.memory(widget.game.imageData!, fit: BoxFit.cover),
|
child: Image.memory(
|
||||||
|
widget.game.imageData!,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -205,7 +208,10 @@ class _GameCardState extends State<GameCard>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 24.0),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 16.0,
|
||||||
|
vertical: 24.0,
|
||||||
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@@ -215,17 +221,29 @@ class _GameCardState extends State<GameCard>
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child:
|
||||||
controller: _nameController,
|
widget.isNameEditable
|
||||||
focusNode: _nameFocus,
|
? TextField(
|
||||||
style: Theme.of(context).textTheme.titleLarge
|
controller: _nameController,
|
||||||
?.copyWith(color: hasImage ? Colors.white : null),
|
focusNode: _nameFocus,
|
||||||
enabled: widget.isNameEditable,
|
style: Theme.of(
|
||||||
decoration: const InputDecoration.collapsed(
|
context,
|
||||||
hintText: 'New Game',
|
).textTheme.titleLarge?.copyWith(
|
||||||
),
|
color: hasImage ? Colors.white : null,
|
||||||
onSubmitted: (_) => _nameFocus.unfocus(),
|
),
|
||||||
),
|
decoration: const InputDecoration.collapsed(
|
||||||
|
hintText: 'New Game',
|
||||||
|
),
|
||||||
|
onSubmitted: (_) => _nameFocus.unfocus(),
|
||||||
|
)
|
||||||
|
: SelectableText(
|
||||||
|
widget.game.name,
|
||||||
|
style: Theme.of(
|
||||||
|
context,
|
||||||
|
).textTheme.titleLarge?.copyWith(
|
||||||
|
color: hasImage ? Colors.white : null,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
Reference in New Issue
Block a user