Compare commits
3 Commits
2bd5c30094
...
4c479676d2
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c479676d2 | |||
| 4bcb10df81 | |||
| 664af7ffee |
@@ -20,7 +20,5 @@
|
|||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0</string>
|
<string>1.0</string>
|
||||||
<key>MinimumOSVersion</key>
|
|
||||||
<string>13.0</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -2,12 +2,15 @@ import Flutter
|
|||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
@main
|
@main
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
|
||||||
override func application(
|
override func application(
|
||||||
_ application: UIApplication,
|
_ application: UIApplication,
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
) -> Bool {
|
) -> Bool {
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
|
||||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
|
||||||
|
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,27 @@
|
|||||||
</array>
|
</array>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>UIApplicationSceneManifest</key>
|
||||||
|
<dict>
|
||||||
|
<key>UIApplicationSupportsMultipleScenes</key>
|
||||||
|
<false/>
|
||||||
|
<key>UISceneConfigurations</key>
|
||||||
|
<dict>
|
||||||
|
<key>UIWindowSceneSessionRoleApplication</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>UISceneClassName</key>
|
||||||
|
<string>UIWindowScene</string>
|
||||||
|
<key>UISceneConfigurationName</key>
|
||||||
|
<string>flutter</string>
|
||||||
|
<key>UISceneDelegateClassName</key>
|
||||||
|
<string>FlutterSceneDelegate</string>
|
||||||
|
<key>UISceneStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the title of the current tab based on [currentIndex].
|
/// Returns the title of the current tab based on [currentIndex].
|
||||||
String _currentTabTitle(context) {
|
String _currentTabTitle(BuildContext context) {
|
||||||
final loc = AppLocalizations.of(context);
|
final loc = AppLocalizations.of(context);
|
||||||
switch (currentIndex) {
|
switch (currentIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
@@ -282,6 +282,10 @@ class _CreateMatchViewState extends State<CreateMatchView> {
|
|||||||
group: selectedGroup,
|
group: selectedGroup,
|
||||||
players: selectedPlayers,
|
players: selectedPlayers,
|
||||||
game: tempGame,
|
game: tempGame,
|
||||||
|
winner: widget.match!.winner,
|
||||||
|
createdAt: widget.match!.createdAt,
|
||||||
|
endedAt: widget.match!.endedAt,
|
||||||
|
notes: widget.match!.notes,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (widget.match!.name != updatedMatch.name) {
|
if (widget.match!.name != updatedMatch.name) {
|
||||||
@@ -315,6 +319,9 @@ class _CreateMatchViewState extends State<CreateMatchView> {
|
|||||||
matchId: widget.match!.id,
|
matchId: widget.match!.id,
|
||||||
playerId: player.id,
|
playerId: player.id,
|
||||||
);
|
);
|
||||||
|
if (widget.match!.winner?.id == player.id) {
|
||||||
|
updatedMatch.winner = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,15 +40,12 @@ class MatchDetailView extends StatefulWidget {
|
|||||||
class _MatchDetailViewState extends State<MatchDetailView> {
|
class _MatchDetailViewState extends State<MatchDetailView> {
|
||||||
late final AppDatabase db;
|
late final AppDatabase db;
|
||||||
|
|
||||||
late Player? currentWinner;
|
|
||||||
|
|
||||||
late Match match;
|
late Match match;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
db = Provider.of<AppDatabase>(context, listen: false);
|
db = Provider.of<AppDatabase>(context, listen: false);
|
||||||
currentWinner = widget.match.winner;
|
|
||||||
match = widget.match;
|
match = widget.match;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +181,7 @@ class _MatchDetailViewState extends State<MatchDetailView> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
/// TODO: Implement different ruleset results display
|
/// TODO: Implement different ruleset results display
|
||||||
if (currentWinner != null) ...[
|
if (match.winner != null) ...[
|
||||||
Text(
|
Text(
|
||||||
loc.winner,
|
loc.winner,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
@@ -193,13 +190,11 @@ class _MatchDetailViewState extends State<MatchDetailView> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
currentWinner!.name,
|
match.winner!.name,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: match.winner != null
|
color: CustomTheme.primaryColor,
|
||||||
? CustomTheme.primaryColor
|
|
||||||
: CustomTheme.textColor,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
] else ...[
|
] else ...[
|
||||||
@@ -239,7 +234,7 @@ class _MatchDetailViewState extends State<MatchDetailView> {
|
|||||||
text: loc.enter_results,
|
text: loc.enter_results,
|
||||||
icon: Icons.emoji_events,
|
icon: Icons.emoji_events,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
currentWinner = await Navigator.push(
|
match.winner = await Navigator.push(
|
||||||
context,
|
context,
|
||||||
adaptivePageRoute(
|
adaptivePageRoute(
|
||||||
fullscreenDialog: true,
|
fullscreenDialog: true,
|
||||||
@@ -252,7 +247,6 @@ class _MatchDetailViewState extends State<MatchDetailView> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
match.winner = currentWinner;
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -266,7 +260,7 @@ class _MatchDetailViewState extends State<MatchDetailView> {
|
|||||||
|
|
||||||
/// Callback for when the match is updated in the edit view,
|
/// Callback for when the match is updated in the edit view,
|
||||||
/// updates the match in this view
|
/// updates the match in this view
|
||||||
onMatchUpdated(editedMatch) {
|
void onMatchUpdated(Match editedMatch) {
|
||||||
setState(() {
|
setState(() {
|
||||||
match = editedMatch;
|
match = editedMatch;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -47,10 +47,7 @@ class _AppSkeletonState extends State<AppSkeleton> {
|
|||||||
: (Widget? currentChild, List<Widget> previousChildren) {
|
: (Widget? currentChild, List<Widget> previousChildren) {
|
||||||
return Stack(
|
return Stack(
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
children: [
|
children: [...previousChildren, ?currentChild],
|
||||||
...previousChildren,
|
|
||||||
if (currentChild != null) currentChild,
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ dev_dependencies:
|
|||||||
build_runner: ^2.5.4
|
build_runner: ^2.5.4
|
||||||
dart_pubspec_licenses: ^3.0.14
|
dart_pubspec_licenses: ^3.0.14
|
||||||
drift_dev: ^2.27.0
|
drift_dev: ^2.27.0
|
||||||
flutter_lints: ^5.0.0
|
flutter_lints: ^6.0.0
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
|||||||
Reference in New Issue
Block a user