Default to mock version in web_dashboard (#505)

* use named constructors, set default app to mock version

* rename grind tasks
pull/509/head
John Ryan 4 years ago committed by GitHub
parent 32d04ba635
commit 3bc860f5df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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(' '));
} }

Loading…
Cancel
Save