mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 06:18:49 +00:00
Default to mock version in web_dashboard (#505)
* use named constructors, set default app to mock version * rename grind tasks
This commit is contained in:
@@ -7,5 +7,5 @@ import 'package:flutter/material.dart';
|
|||||||
import 'src/app.dart';
|
import 'src/app.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
runApp(DashboardApp());
|
runApp(DashboardApp.mock());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,5 +7,5 @@ import 'package:flutter/material.dart';
|
|||||||
import 'src/app.dart';
|
import 'src/app.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
runApp(DashboardApp.mock());
|
runApp(DashboardApp.firebase());
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ class DashboardApp extends StatefulWidget {
|
|||||||
final ApiBuilder apiBuilder;
|
final ApiBuilder apiBuilder;
|
||||||
|
|
||||||
/// Runs the app using Firebase
|
/// Runs the app using Firebase
|
||||||
DashboardApp()
|
DashboardApp.firebase()
|
||||||
: auth = FirebaseAuthService(),
|
: auth = FirebaseAuthService(),
|
||||||
apiBuilder = _apiBuilder;
|
apiBuilder = _apiBuilder;
|
||||||
|
|
||||||
|
|||||||
@@ -24,16 +24,16 @@ void runWeb() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Task()
|
@Task()
|
||||||
void runMock() {
|
void runFirebase() {
|
||||||
run('flutter',
|
run('flutter',
|
||||||
arguments: 'run -d web --web-port=5000 lib/main_mock.dart '.split(' '));
|
arguments: 'run -d web --web-port=5000 lib/main_firebase.dart '.split(' '));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Task()
|
@Task()
|
||||||
void runMockSkia() {
|
void runFirebaseSkia() {
|
||||||
run('flutter',
|
run('flutter',
|
||||||
arguments:
|
arguments:
|
||||||
'run -d web --web-port=5000 --release --dart-define=FLUTTER_WEB_USE_SKIA=true lib/main_mock.dart'
|
'run -d web --web-port=5000 --release --dart-define=FLUTTER_WEB_USE_SKIA=true lib/main_firebase.dart'
|
||||||
.split(' '));
|
.split(' '));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user