Implemented MatchProfileView
This commit is contained in:
@@ -11,7 +11,7 @@ import 'package:game_tracker/data/dto/match.dart';
|
||||
import 'package:game_tracker/data/dto/player.dart';
|
||||
import 'package:game_tracker/l10n/generated/app_localizations.dart';
|
||||
import 'package:game_tracker/presentation/views/main_menu/match_view/create_match/create_match_view.dart';
|
||||
import 'package:game_tracker/presentation/views/main_menu/match_view/match_result_view.dart';
|
||||
import 'package:game_tracker/presentation/views/main_menu/match_view/match_profile_view.dart';
|
||||
import 'package:game_tracker/presentation/widgets/app_skeleton.dart';
|
||||
import 'package:game_tracker/presentation/widgets/buttons/main_menu_button.dart';
|
||||
import 'package:game_tracker/presentation/widgets/tiles/match_tile.dart';
|
||||
@@ -89,10 +89,9 @@ class _MatchViewState extends State<MatchView> {
|
||||
Navigator.push(
|
||||
context,
|
||||
adaptivePageRoute(
|
||||
fullscreenDialog: true,
|
||||
builder: (context) => MatchResultView(
|
||||
builder: (context) => MatchProfileView(
|
||||
match: matches[index],
|
||||
onWinnerChanged: loadGames,
|
||||
callback: loadGames,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -128,6 +127,7 @@ class _MatchViewState extends State<MatchView> {
|
||||
|
||||
/// Loads the games from the database and sorts them by creation date.
|
||||
void loadGames() {
|
||||
isLoading = true;
|
||||
Future.wait([
|
||||
db.matchDao.getAllMatches(),
|
||||
Future.delayed(Constants.MINIMUM_SKELETON_DURATION),
|
||||
|
||||
Reference in New Issue
Block a user