Refactor display to separate widget
This commit is contained in:
28
lib/widgets/new_game_card.dart
Normal file
28
lib/widgets/new_game_card.dart
Normal 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,
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user