Refactor display to separate widget

This commit is contained in:
2025-02-22 14:54:54 +01:00
parent 283c9dbbb3
commit a4a95c3c41
4 changed files with 276 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
import 'package:flutter/material.dart';
import 'package:gamer_updater/game.dart';
import 'package:gamer_updater/widgets/game_card.dart';
class NewGameCard extends StatelessWidget {
final Function(Game) onGameCreated;
const NewGameCard({
super.key,
required this.onGameCreated,
});
@override
Widget build(BuildContext context) {
return GameCard(
game: Game(
name: '',
versionRegex: '',
lastPlayed: '',
rssFeedUrl: '',
actualVersion: '',
lastUpdated: '',
),
isNameEditable: true,
onGameUpdated: onGameCreated,
);
}
}