This commit is contained in:
Hillel Coren 2018-12-13 16:40:06 +02:00
parent ff896f491f
commit 4a4a3ea74b
5 changed files with 23 additions and 20 deletions

View File

@ -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';

View File

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

View File

@ -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;
}

View File

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

View File

@ -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;
}