1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Fix beta CI (#1311)

This commit is contained in:
Brett Morgan
2022-06-18 11:09:19 +10:00
committed by GitHub
parent e4d4d0f48d
commit a6bb4d1c20
2 changed files with 4 additions and 9 deletions

View File

@@ -83,15 +83,12 @@ class _SongsTabState extends State<SongsTab> {
}
void _togglePlatform() {
TargetPlatform _getOppositePlatform() {
if (defaultTargetPlatform == TargetPlatform.iOS) {
return TargetPlatform.android;
} else {
return TargetPlatform.iOS;
}
if (defaultTargetPlatform == TargetPlatform.iOS) {
debugDefaultTargetPlatformOverride = TargetPlatform.android;
} else {
debugDefaultTargetPlatformOverride = TargetPlatform.iOS;
}
debugDefaultTargetPlatformOverride = _getOppositePlatform();
// This rebuilds the application. This should obviously never be
// done in a real app but it's done here since this app
// unrealistically toggles the current platform for demonstration