diff --git a/lib/ui/project/project_screen.dart b/lib/ui/project/project_screen.dart index 0e59e254b..d8a11b929 100644 --- a/lib/ui/project/project_screen.dart +++ b/lib/ui/project/project_screen.dart @@ -10,7 +10,6 @@ import 'package:invoiceninja_flutter/ui/project/project_list_vm.dart'; import 'package:invoiceninja_flutter/redux/project/project_actions.dart'; import 'package:invoiceninja_flutter/ui/app/app_drawer_vm.dart'; import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart'; -import 'package:invoiceninja_flutter/utils/keys.dart'; class ProjectScreen extends StatelessWidget { static const String route = '/project'; diff --git a/lib/ui/project/view/project_view.dart b/lib/ui/project/view/project_view.dart index b9e0c3346..92db005aa 100644 --- a/lib/ui/project/view/project_view.dart +++ b/lib/ui/project/view/project_view.dart @@ -5,13 +5,13 @@ import 'package:invoiceninja_flutter/ui/project/view/project_view_vm.dart'; import 'package:invoiceninja_flutter/ui/app/form_card.dart'; class ProjectView extends StatefulWidget { - final ProjectViewVM viewModel; - const ProjectView({ Key key, @required this.viewModel, }) : super(key: key); + final ProjectViewVM viewModel; + @override _ProjectViewState createState() => new _ProjectViewState(); } diff --git a/lib/ui/project/view/project_view_vm.dart b/lib/ui/project/view/project_view_vm.dart index 85009430f..557db1cc6 100644 --- a/lib/ui/project/view/project_view_vm.dart +++ b/lib/ui/project/view/project_view_vm.dart @@ -11,8 +11,8 @@ import 'package:invoiceninja_flutter/ui/project/view/project_view.dart'; import 'package:invoiceninja_flutter/redux/app/app_state.dart'; class ProjectViewScreen extends StatelessWidget { - static const String route = '/project/view'; const ProjectViewScreen({Key key}) : super(key: key); + static const String route = '/project/view'; @override Widget build(BuildContext context) { @@ -30,13 +30,6 @@ class ProjectViewScreen extends StatelessWidget { } class ProjectViewVM { - final ProjectEntity project; - final CompanyEntity company; - final Function(BuildContext, EntityAction) onActionSelected; - final Function(BuildContext) onEditPressed; - final bool isSaving; - final bool isLoading; - final bool isDirty; ProjectViewVM({ @required this.project, @@ -82,4 +75,13 @@ class ProjectViewVM { } }); } + + final ProjectEntity project; + final CompanyEntity company; + final Function(BuildContext, EntityAction) onActionSelected; + final Function(BuildContext) onEditPressed; + final bool isSaving; + final bool isLoading; + final bool isDirty; + } diff --git a/stubs/ui/stub/view/stub_view b/stubs/ui/stub/view/stub_view index 212cf78b4..f6cbd9e73 100644 --- a/stubs/ui/stub/view/stub_view +++ b/stubs/ui/stub/view/stub_view @@ -5,13 +5,14 @@ import 'package:invoiceninja_flutter/ui/stub/view/stub_view_vm.dart'; import 'package:invoiceninja_flutter/ui/app/form_card.dart'; class StubView extends StatefulWidget { - final StubViewVM viewModel; const StubView({ Key key, @required this.viewModel, }) : super(key: key); + final StubViewVM viewModel; + @override _StubViewState createState() => new _StubViewState(); } diff --git a/stubs/ui/stub/view/stub_view_vm b/stubs/ui/stub/view/stub_view_vm index 842f7ba8e..42a7c7876 100644 --- a/stubs/ui/stub/view/stub_view_vm +++ b/stubs/ui/stub/view/stub_view_vm @@ -11,8 +11,8 @@ import 'package:invoiceninja_flutter/ui/stub/view/stub_view.dart'; import 'package:invoiceninja_flutter/redux/app/app_state.dart'; class StubViewScreen extends StatelessWidget { - static const String route = '/stub/view'; const StubViewScreen({Key key}) : super(key: key); + static const String route = '/stub/view'; @override Widget build(BuildContext context) { @@ -30,13 +30,6 @@ class StubViewScreen extends StatelessWidget { } class StubViewVM { - final StubEntity stub; - final CompanyEntity company; - final Function(BuildContext, EntityAction) onActionSelected; - final Function(BuildContext) onEditPressed; - final bool isSaving; - final bool isLoading; - final bool isDirty; StubViewVM({ @required this.stub, @@ -82,4 +75,12 @@ class StubViewVM { } }); } + + final StubEntity stub; + final CompanyEntity company; + final Function(BuildContext, EntityAction) onActionSelected; + final Function(BuildContext) onEditPressed; + final bool isSaving; + final bool isLoading; + final bool isDirty; }