From 3bc860f5df8ea5d6b31cfa0ca0a6d4a729ef224c Mon Sep 17 00:00:00 2001 From: John Ryan Date: Tue, 28 Jul 2020 07:21:12 -0700 Subject: [PATCH] Default to mock version in web_dashboard (#505) * use named constructors, set default app to mock version * rename grind tasks --- experimental/web_dashboard/lib/main.dart | 2 +- .../lib/{main_mock.dart => main_firebase.dart} | 2 +- experimental/web_dashboard/lib/src/app.dart | 2 +- experimental/web_dashboard/tool/grind.dart | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) rename experimental/web_dashboard/lib/{main_mock.dart => main_firebase.dart} (89%) diff --git a/experimental/web_dashboard/lib/main.dart b/experimental/web_dashboard/lib/main.dart index 74e7df4e1..c0b1767e6 100644 --- a/experimental/web_dashboard/lib/main.dart +++ b/experimental/web_dashboard/lib/main.dart @@ -7,5 +7,5 @@ import 'package:flutter/material.dart'; import 'src/app.dart'; void main() { - runApp(DashboardApp()); + runApp(DashboardApp.mock()); } diff --git a/experimental/web_dashboard/lib/main_mock.dart b/experimental/web_dashboard/lib/main_firebase.dart similarity index 89% rename from experimental/web_dashboard/lib/main_mock.dart rename to experimental/web_dashboard/lib/main_firebase.dart index c0b1767e6..20517fecc 100644 --- a/experimental/web_dashboard/lib/main_mock.dart +++ b/experimental/web_dashboard/lib/main_firebase.dart @@ -7,5 +7,5 @@ import 'package:flutter/material.dart'; import 'src/app.dart'; void main() { - runApp(DashboardApp.mock()); + runApp(DashboardApp.firebase()); } diff --git a/experimental/web_dashboard/lib/src/app.dart b/experimental/web_dashboard/lib/src/app.dart index f40cc5b8c..345759260 100644 --- a/experimental/web_dashboard/lib/src/app.dart +++ b/experimental/web_dashboard/lib/src/app.dart @@ -39,7 +39,7 @@ class DashboardApp extends StatefulWidget { final ApiBuilder apiBuilder; /// Runs the app using Firebase - DashboardApp() + DashboardApp.firebase() : auth = FirebaseAuthService(), apiBuilder = _apiBuilder; diff --git a/experimental/web_dashboard/tool/grind.dart b/experimental/web_dashboard/tool/grind.dart index e22bc923f..e98f791b8 100644 --- a/experimental/web_dashboard/tool/grind.dart +++ b/experimental/web_dashboard/tool/grind.dart @@ -24,16 +24,16 @@ void runWeb() { } @Task() -void runMock() { +void runFirebase() { 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() -void runMockSkia() { +void runFirebaseSkia() { run('flutter', 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(' ')); }