replaced ternary operator solution with custom adaptive_page_route.dart
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import 'dart:core' hide Match;
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/adaptive_page_route.dart';
|
||||
import 'package:game_tracker/core/constants.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:game_tracker/data/db/database.dart';
|
||||
@@ -83,7 +82,7 @@ class _MatchViewState extends State<MatchView> {
|
||||
onTap: () async {
|
||||
Navigator.push(
|
||||
context,
|
||||
CupertinoPageRoute(
|
||||
AdaptivePageRoute(
|
||||
fullscreenDialog: true,
|
||||
builder: (context) => MatchResultView(
|
||||
match: matches[index],
|
||||
@@ -106,12 +105,9 @@ class _MatchViewState extends State<MatchView> {
|
||||
onPressed: () async {
|
||||
Navigator.push(
|
||||
context,
|
||||
Platform.isIOS ? CupertinoPageRoute(
|
||||
AdaptivePageRoute(
|
||||
builder: (context) =>
|
||||
CreateMatchView(onWinnerChanged: loadGames)) : MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
CreateMatchView(onWinnerChanged: loadGames),
|
||||
),
|
||||
CreateMatchView(onWinnerChanged: loadGames))
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user