Refactor
This commit is contained in:
parent
85ded1bff0
commit
f801001b3c
|
|
@ -1,8 +1,6 @@
|
|||
import 'dart:async';
|
||||
import 'dart:core';
|
||||
import 'package:invoiceninja/data/models/serializers.dart';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
|
||||
import 'package:invoiceninja/redux/auth/auth_state.dart';
|
||||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/data/web_client.dart';
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import 'package:invoiceninja/redux/client/client_actions.dart';
|
|||
import 'package:invoiceninja/redux/dashboard/dashboard_actions.dart';
|
||||
import 'package:invoiceninja/redux/invoice/invoice_actions.dart';
|
||||
import 'package:invoiceninja/redux/product/product_actions.dart';
|
||||
import 'package:invoiceninja/ui/dashboard/dashboard_screen.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
import 'package:invoiceninja/redux/ui/ui_reducer.dart';
|
||||
import 'package:invoiceninja/redux/auth/auth_actions.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
import 'package:invoiceninja/redux/app/app_state.dart';
|
||||
import 'package:invoiceninja/redux/app/loading_reducer.dart';
|
||||
import 'package:invoiceninja/redux/auth/auth_reducer.dart';
|
||||
import 'package:invoiceninja/redux/company/company_reducer.dart';
|
||||
import 'package:invoiceninja/redux/company/company_actions.dart';
|
||||
|
||||
// We create the State reducer by combining many smaller reducers into one!
|
||||
AppState appReducer(AppState state, action) {
|
||||
|
|
@ -16,27 +14,18 @@ AppState appReducer(AppState state, action) {
|
|||
}
|
||||
|
||||
return state.rebuild((b) => b
|
||||
..selectedCompanyIndex = selectedCompanyIndexReducer(state.selectedCompanyIndex, action)
|
||||
..isLoading = loadingReducer(state.isLoading, action)
|
||||
..authState.replace(authReducer(state.authState, action))
|
||||
..companyState1.replace(state.selectedCompanyIndex == 1
|
||||
..companyState1.replace(state.uiState.selectedCompanyIndex == 1
|
||||
? companyReducer(state.companyState1, action) : state.companyState1)
|
||||
..companyState2.replace(state.selectedCompanyIndex == 2
|
||||
..companyState2.replace(state.uiState.selectedCompanyIndex == 2
|
||||
? companyReducer(state.companyState2, action) : state.companyState2)
|
||||
..companyState3.replace(state.selectedCompanyIndex == 3
|
||||
..companyState3.replace(state.uiState.selectedCompanyIndex == 3
|
||||
? companyReducer(state.companyState3, action) : state.companyState3)
|
||||
..companyState4.replace(state.selectedCompanyIndex == 4
|
||||
..companyState4.replace(state.uiState.selectedCompanyIndex == 4
|
||||
? companyReducer(state.companyState4, action) : state.companyState4)
|
||||
..companyState5.replace(state.selectedCompanyIndex == 5
|
||||
..companyState5.replace(state.uiState.selectedCompanyIndex == 5
|
||||
? companyReducer(state.companyState5, action) : state.companyState5)
|
||||
..uiState.replace(uiReducer(state.uiState, action))
|
||||
);
|
||||
}
|
||||
|
||||
Reducer<int> selectedCompanyIndexReducer = combineReducers([
|
||||
TypedReducer<int, SelectCompany>(selectCompanyReducer),
|
||||
]);
|
||||
|
||||
int selectCompanyReducer(int selectedCompanyIndex, SelectCompany action) {
|
||||
return action.companyIndex;
|
||||
}
|
||||
|
|
@ -17,7 +17,6 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
|||
bool get isLoading;
|
||||
AuthState get authState;
|
||||
UIState get uiState;
|
||||
int get selectedCompanyIndex;
|
||||
CompanyState get companyState1;
|
||||
CompanyState get companyState2;
|
||||
CompanyState get companyState3;
|
||||
|
|
@ -28,7 +27,6 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
|||
return _$AppState._(
|
||||
isLoading: false,
|
||||
authState: AuthState(),
|
||||
selectedCompanyIndex: 0,
|
||||
companyState1: CompanyState(),
|
||||
companyState2: CompanyState(),
|
||||
companyState3: CompanyState(),
|
||||
|
|
@ -43,7 +41,7 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
|||
static Serializer<AppState> get serializer => _$appStateSerializer;
|
||||
|
||||
CompanyState get selectedCompanyState {
|
||||
switch (this.selectedCompanyIndex) {
|
||||
switch (this.uiState.selectedCompanyIndex) {
|
||||
case 1:
|
||||
return this.companyState1;
|
||||
case 2:
|
||||
|
|
|
|||
|
|
@ -35,9 +35,6 @@ class _$AppStateSerializer implements StructuredSerializer<AppState> {
|
|||
'uiState',
|
||||
serializers.serialize(object.uiState,
|
||||
specifiedType: const FullType(UIState)),
|
||||
'selectedCompanyIndex',
|
||||
serializers.serialize(object.selectedCompanyIndex,
|
||||
specifiedType: const FullType(int)),
|
||||
'companyState1',
|
||||
serializers.serialize(object.companyState1,
|
||||
specifiedType: const FullType(CompanyState)),
|
||||
|
|
@ -81,10 +78,6 @@ class _$AppStateSerializer implements StructuredSerializer<AppState> {
|
|||
result.uiState.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(UIState)) as UIState);
|
||||
break;
|
||||
case 'selectedCompanyIndex':
|
||||
result.selectedCompanyIndex = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
break;
|
||||
case 'companyState1':
|
||||
result.companyState1.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(CompanyState)) as CompanyState);
|
||||
|
|
@ -120,8 +113,6 @@ class _$AppState extends AppState {
|
|||
@override
|
||||
final UIState uiState;
|
||||
@override
|
||||
final int selectedCompanyIndex;
|
||||
@override
|
||||
final CompanyState companyState1;
|
||||
@override
|
||||
final CompanyState companyState2;
|
||||
|
|
@ -139,7 +130,6 @@ class _$AppState extends AppState {
|
|||
{this.isLoading,
|
||||
this.authState,
|
||||
this.uiState,
|
||||
this.selectedCompanyIndex,
|
||||
this.companyState1,
|
||||
this.companyState2,
|
||||
this.companyState3,
|
||||
|
|
@ -152,8 +142,6 @@ class _$AppState extends AppState {
|
|||
throw new BuiltValueNullFieldError('AppState', 'authState');
|
||||
if (uiState == null)
|
||||
throw new BuiltValueNullFieldError('AppState', 'uiState');
|
||||
if (selectedCompanyIndex == null)
|
||||
throw new BuiltValueNullFieldError('AppState', 'selectedCompanyIndex');
|
||||
if (companyState1 == null)
|
||||
throw new BuiltValueNullFieldError('AppState', 'companyState1');
|
||||
if (companyState2 == null)
|
||||
|
|
@ -180,7 +168,6 @@ class _$AppState extends AppState {
|
|||
return isLoading == other.isLoading &&
|
||||
authState == other.authState &&
|
||||
uiState == other.uiState &&
|
||||
selectedCompanyIndex == other.selectedCompanyIndex &&
|
||||
companyState1 == other.companyState1 &&
|
||||
companyState2 == other.companyState2 &&
|
||||
companyState3 == other.companyState3 &&
|
||||
|
|
@ -195,12 +182,8 @@ class _$AppState extends AppState {
|
|||
$jc(
|
||||
$jc(
|
||||
$jc(
|
||||
$jc(
|
||||
$jc(
|
||||
$jc($jc(0, isLoading.hashCode),
|
||||
authState.hashCode),
|
||||
uiState.hashCode),
|
||||
selectedCompanyIndex.hashCode),
|
||||
$jc($jc($jc(0, isLoading.hashCode), authState.hashCode),
|
||||
uiState.hashCode),
|
||||
companyState1.hashCode),
|
||||
companyState2.hashCode),
|
||||
companyState3.hashCode),
|
||||
|
|
@ -214,7 +197,6 @@ class _$AppState extends AppState {
|
|||
..add('isLoading', isLoading)
|
||||
..add('authState', authState)
|
||||
..add('uiState', uiState)
|
||||
..add('selectedCompanyIndex', selectedCompanyIndex)
|
||||
..add('companyState1', companyState1)
|
||||
..add('companyState2', companyState2)
|
||||
..add('companyState3', companyState3)
|
||||
|
|
@ -240,11 +222,6 @@ class AppStateBuilder implements Builder<AppState, AppStateBuilder> {
|
|||
UIStateBuilder get uiState => _$this._uiState ??= new UIStateBuilder();
|
||||
set uiState(UIStateBuilder uiState) => _$this._uiState = uiState;
|
||||
|
||||
int _selectedCompanyIndex;
|
||||
int get selectedCompanyIndex => _$this._selectedCompanyIndex;
|
||||
set selectedCompanyIndex(int selectedCompanyIndex) =>
|
||||
_$this._selectedCompanyIndex = selectedCompanyIndex;
|
||||
|
||||
CompanyStateBuilder _companyState1;
|
||||
CompanyStateBuilder get companyState1 =>
|
||||
_$this._companyState1 ??= new CompanyStateBuilder();
|
||||
|
|
@ -282,7 +259,6 @@ class AppStateBuilder implements Builder<AppState, AppStateBuilder> {
|
|||
_isLoading = _$v.isLoading;
|
||||
_authState = _$v.authState?.toBuilder();
|
||||
_uiState = _$v.uiState?.toBuilder();
|
||||
_selectedCompanyIndex = _$v.selectedCompanyIndex;
|
||||
_companyState1 = _$v.companyState1?.toBuilder();
|
||||
_companyState2 = _$v.companyState2?.toBuilder();
|
||||
_companyState3 = _$v.companyState3?.toBuilder();
|
||||
|
|
@ -313,7 +289,6 @@ class AppStateBuilder implements Builder<AppState, AppStateBuilder> {
|
|||
isLoading: isLoading,
|
||||
authState: authState.build(),
|
||||
uiState: uiState.build(),
|
||||
selectedCompanyIndex: selectedCompanyIndex,
|
||||
companyState1: companyState1.build(),
|
||||
companyState2: companyState2.build(),
|
||||
companyState3: companyState3.build(),
|
||||
|
|
@ -326,7 +301,6 @@ class AppStateBuilder implements Builder<AppState, AppStateBuilder> {
|
|||
authState.build();
|
||||
_$failedField = 'uiState';
|
||||
uiState.build();
|
||||
|
||||
_$failedField = 'companyState1';
|
||||
companyState1.build();
|
||||
_$failedField = 'companyState2';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/redux/invoice/invoice_actions.dart';
|
||||
import 'package:invoiceninja/redux/product/product_actions.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
import 'package:invoiceninja/redux/client/client_actions.dart';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:invoiceninja/redux/client/client_actions.dart';
|
||||
import 'package:invoiceninja/redux/product/product_actions.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
import 'package:invoiceninja/redux/dashboard/dashboard_actions.dart';
|
||||
import 'package:invoiceninja/redux/app/app_state.dart';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/redux/product/product_actions.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
import 'package:invoiceninja/redux/invoice/invoice_actions.dart';
|
||||
import 'package:invoiceninja/redux/client/client_actions.dart';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/redux/client/client_actions.dart';
|
||||
import 'package:invoiceninja/redux/ui/ui_actions.dart';
|
||||
import 'package:invoiceninja/ui/product/edit/product_edit_vm.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:invoiceninja/redux/client/client_reducer.dart';
|
||||
import 'package:invoiceninja/redux/company/company_actions.dart';
|
||||
import 'package:invoiceninja/redux/ui/ui_actions.dart';
|
||||
import 'package:invoiceninja/redux/ui/ui_state.dart';
|
||||
import 'package:invoiceninja/redux/product/product_reducer.dart';
|
||||
|
|
@ -8,6 +9,7 @@ import 'package:redux/redux.dart';
|
|||
UIState uiReducer(UIState state, action) {
|
||||
|
||||
return state.rebuild((b) => b
|
||||
..selectedCompanyIndex = selectedCompanyIndexReducer(state.selectedCompanyIndex, action)
|
||||
..currentRoute = currentRouteReducer(state.currentRoute, action)
|
||||
..productUIState.replace(productUIReducer(state.productUIState, action))
|
||||
..clientUIState.replace(clientUIReducer(state.clientUIState, action))
|
||||
|
|
@ -21,4 +23,12 @@ Reducer<String> currentRouteReducer = combineReducers([
|
|||
|
||||
String updateCurrentRouteReducer(String currentRoute, UpdateCurrentRoute action) {
|
||||
return action.route;
|
||||
}
|
||||
|
||||
Reducer<int> selectedCompanyIndexReducer = combineReducers([
|
||||
TypedReducer<int, SelectCompany>(selectCompanyReducer),
|
||||
]);
|
||||
|
||||
int selectCompanyReducer(int selectedCompanyIndex, SelectCompany action) {
|
||||
return action.companyIndex;
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ part 'ui_state.g.dart';
|
|||
|
||||
abstract class UIState implements Built<UIState, UIStateBuilder> {
|
||||
|
||||
int get selectedCompanyIndex;
|
||||
String get currentRoute;
|
||||
EntityUIState get productUIState;
|
||||
EntityUIState get clientUIState;
|
||||
|
|
@ -15,6 +16,7 @@ abstract class UIState implements Built<UIState, UIStateBuilder> {
|
|||
|
||||
factory UIState() {
|
||||
return _$UIState._(
|
||||
selectedCompanyIndex: 0,
|
||||
currentRoute: '/',
|
||||
productUIState: EntityUIState(ProductFields.productKey),
|
||||
clientUIState: EntityUIState(ClientFields.name),
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ class _$UIStateSerializer implements StructuredSerializer<UIState> {
|
|||
Iterable serialize(Serializers serializers, UIState object,
|
||||
{FullType specifiedType: FullType.unspecified}) {
|
||||
final result = <Object>[
|
||||
'selectedCompanyIndex',
|
||||
serializers.serialize(object.selectedCompanyIndex,
|
||||
specifiedType: const FullType(int)),
|
||||
'currentRoute',
|
||||
serializers.serialize(object.currentRoute,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -54,6 +57,10 @@ class _$UIStateSerializer implements StructuredSerializer<UIState> {
|
|||
iterator.moveNext();
|
||||
final dynamic value = iterator.current;
|
||||
switch (key) {
|
||||
case 'selectedCompanyIndex':
|
||||
result.selectedCompanyIndex = serializers.deserialize(value,
|
||||
specifiedType: const FullType(int)) as int;
|
||||
break;
|
||||
case 'currentRoute':
|
||||
result.currentRoute = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
|
|
@ -78,6 +85,8 @@ class _$UIStateSerializer implements StructuredSerializer<UIState> {
|
|||
}
|
||||
|
||||
class _$UIState extends UIState {
|
||||
@override
|
||||
final int selectedCompanyIndex;
|
||||
@override
|
||||
final String currentRoute;
|
||||
@override
|
||||
|
|
@ -91,11 +100,14 @@ class _$UIState extends UIState {
|
|||
(new UIStateBuilder()..update(updates)).build();
|
||||
|
||||
_$UIState._(
|
||||
{this.currentRoute,
|
||||
{this.selectedCompanyIndex,
|
||||
this.currentRoute,
|
||||
this.productUIState,
|
||||
this.clientUIState,
|
||||
this.invoiceUIState})
|
||||
: super._() {
|
||||
if (selectedCompanyIndex == null)
|
||||
throw new BuiltValueNullFieldError('UIState', 'selectedCompanyIndex');
|
||||
if (currentRoute == null)
|
||||
throw new BuiltValueNullFieldError('UIState', 'currentRoute');
|
||||
if (productUIState == null)
|
||||
|
|
@ -117,7 +129,8 @@ class _$UIState extends UIState {
|
|||
bool operator ==(dynamic other) {
|
||||
if (identical(other, this)) return true;
|
||||
if (other is! UIState) return false;
|
||||
return currentRoute == other.currentRoute &&
|
||||
return selectedCompanyIndex == other.selectedCompanyIndex &&
|
||||
currentRoute == other.currentRoute &&
|
||||
productUIState == other.productUIState &&
|
||||
clientUIState == other.clientUIState &&
|
||||
invoiceUIState == other.invoiceUIState;
|
||||
|
|
@ -126,7 +139,11 @@ class _$UIState extends UIState {
|
|||
@override
|
||||
int get hashCode {
|
||||
return $jf($jc(
|
||||
$jc($jc($jc(0, currentRoute.hashCode), productUIState.hashCode),
|
||||
$jc(
|
||||
$jc(
|
||||
$jc($jc(0, selectedCompanyIndex.hashCode),
|
||||
currentRoute.hashCode),
|
||||
productUIState.hashCode),
|
||||
clientUIState.hashCode),
|
||||
invoiceUIState.hashCode));
|
||||
}
|
||||
|
|
@ -134,6 +151,7 @@ class _$UIState extends UIState {
|
|||
@override
|
||||
String toString() {
|
||||
return (newBuiltValueToStringHelper('UIState')
|
||||
..add('selectedCompanyIndex', selectedCompanyIndex)
|
||||
..add('currentRoute', currentRoute)
|
||||
..add('productUIState', productUIState)
|
||||
..add('clientUIState', clientUIState)
|
||||
|
|
@ -145,6 +163,11 @@ class _$UIState extends UIState {
|
|||
class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
||||
_$UIState _$v;
|
||||
|
||||
int _selectedCompanyIndex;
|
||||
int get selectedCompanyIndex => _$this._selectedCompanyIndex;
|
||||
set selectedCompanyIndex(int selectedCompanyIndex) =>
|
||||
_$this._selectedCompanyIndex = selectedCompanyIndex;
|
||||
|
||||
String _currentRoute;
|
||||
String get currentRoute => _$this._currentRoute;
|
||||
set currentRoute(String currentRoute) => _$this._currentRoute = currentRoute;
|
||||
|
|
@ -171,6 +194,7 @@ class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
|||
|
||||
UIStateBuilder get _$this {
|
||||
if (_$v != null) {
|
||||
_selectedCompanyIndex = _$v.selectedCompanyIndex;
|
||||
_currentRoute = _$v.currentRoute;
|
||||
_productUIState = _$v.productUIState?.toBuilder();
|
||||
_clientUIState = _$v.clientUIState?.toBuilder();
|
||||
|
|
@ -197,6 +221,7 @@ class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
|||
try {
|
||||
_$result = _$v ??
|
||||
new _$UIState._(
|
||||
selectedCompanyIndex: selectedCompanyIndex,
|
||||
currentRoute: currentRoute,
|
||||
productUIState: productUIState.build(),
|
||||
clientUIState: clientUIState.build(),
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class AppDrawerVM {
|
|||
return AppDrawerVM(
|
||||
companies: companiesSelector(store.state),
|
||||
selectedCompany: store.state.selectedCompany,
|
||||
selectedCompanyIndex: store.state.selectedCompanyIndex.toString(),
|
||||
selectedCompanyIndex: store.state.uiState.selectedCompanyIndex.toString(),
|
||||
onCompanyChanged: (BuildContext context, String companyIndex) {
|
||||
store.dispatch(SelectCompany(int.parse(companyIndex)));
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
import 'package:invoiceninja/data/models/entities.dart';
|
||||
import 'package:invoiceninja/redux/app/app_state.dart';
|
||||
import 'package:invoiceninja/redux/product/product_actions.dart';
|
||||
import 'package:invoiceninja/redux/ui/list_ui_state.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
|
|
@ -20,7 +19,7 @@ class AppSearchButton extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var localization = AppLocalization.of(context);
|
||||
var store = StoreProvider.of<AppState>(context);
|
||||
//var store = StoreProvider.of<AppState>(context);
|
||||
|
||||
return StoreConnector<AppState, ListUIState>(
|
||||
converter: (Store<AppState> store) =>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/ui/app/dismissible_entity.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
//import 'package:invoiceninja/utils/localization.dart';
|
||||
|
||||
import '../app/entity_state_label.dart';
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ class ClientItem extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var localization = AppLocalization.of(context);
|
||||
//var localization = AppLocalization.of(context);
|
||||
|
||||
return DismissibleEntity(
|
||||
onDismissed: onDismissed,
|
||||
|
|
|
|||
|
|
@ -5,9 +5,7 @@ import 'package:invoiceninja/ui/client/edit/client_edit_details.dart';
|
|||
import 'package:invoiceninja/ui/client/edit/client_edit_vm.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
import 'package:invoiceninja/ui/app/save_icon_button.dart';
|
||||
import 'package:invoiceninja/ui/client/edit/client_edit_billing_address.dart';
|
||||
import 'package:invoiceninja/ui/client/edit/client_edit_contacts.dart';
|
||||
import 'package:invoiceninja/ui/client/edit/client_edit_shipping_address.dart';
|
||||
|
||||
class ClientEdit extends StatefulWidget {
|
||||
final ClientEditVM viewModel;
|
||||
|
|
@ -27,10 +25,12 @@ class _ClientEditState extends State<ClientEdit>
|
|||
static final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
|
||||
static final GlobalKey<ClientEditDetailsState> _detailsKey =
|
||||
GlobalKey<ClientEditDetailsState>();
|
||||
/*
|
||||
static final GlobalKey<ClientEditBillingAddressState> _billingAddressKey =
|
||||
GlobalKey<ClientEditBillingAddressState>();
|
||||
static final GlobalKey<ClientEditShippingAddressState> _shippingAddressKey =
|
||||
GlobalKey<ClientEditShippingAddressState>();
|
||||
*/
|
||||
static final GlobalKey<ClientEditContactsState> _contactsKey =
|
||||
GlobalKey<ClientEditContactsState>();
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ class _ClientEditState extends State<ClientEdit>
|
|||
_formKey.currentState.save();
|
||||
|
||||
var detailsState = _detailsKey.currentState;
|
||||
var billingAddressState = _billingAddressKey.currentState;
|
||||
//var billingAddressState = _billingAddressKey.currentState;
|
||||
//var shippingAddressState = _shippingAddressKey.currentState;
|
||||
var contactState = _contactsKey.currentState;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/ui/client/edit/client_edit.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
|
||||
import '../../app/form_card.dart';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/ui/client/edit/client_edit.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
|
||||
import '../../app/form_card.dart';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/ui/client/edit/client_edit.dart';
|
||||
import 'package:invoiceninja/ui/client/edit/client_edit_vm.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
import 'package:invoiceninja/ui/app/form_card.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/ui/client/edit/client_edit.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
|
||||
import '../../app/form_card.dart';
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
|||
|
||||
_formKey.currentState.save();
|
||||
|
||||
var detailsState = _detailsKey.currentState;
|
||||
var itemsState = _itemsKey.currentState;
|
||||
//var detailsState = _detailsKey.currentState;
|
||||
//var itemsState = _itemsKey.currentState;
|
||||
|
||||
/*
|
||||
InvoiceEntity invoice = widget.viewModel.invoice.rebuild((b) => b
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/ui/app/entity_dropdown.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
import 'package:invoiceninja/ui/app/form_card.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/ui/app/dismissible_entity.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
|
||||
import '../app/entity_state_label.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'dart:async';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:invoiceninja/redux/client/client_actions.dart';
|
||||
import 'package:invoiceninja/redux/invoice/invoice_selectors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja/ui/app/actions_menu_button.dart';
|
||||
import 'package:invoiceninja/ui/app/form_card.dart';
|
||||
import 'package:invoiceninja/ui/app/progress_button.dart';
|
||||
import 'package:invoiceninja/ui/product/edit/product_edit_vm.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
import 'package:invoiceninja/ui/app/save_icon_button.dart';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja/data/models/models.dart';
|
||||
import 'package:invoiceninja/ui/app/dismissible_entity.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
|
||||
import '../app/entity_state_label.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import 'package:invoiceninja/data/models/models.dart';
|
|||
import 'package:invoiceninja/ui/product/product_list.dart';
|
||||
import 'package:invoiceninja/redux/app/app_state.dart';
|
||||
import 'package:invoiceninja/redux/product/product_actions.dart';
|
||||
import 'package:invoiceninja/ui/product/edit/product_edit_vm.dart';
|
||||
|
||||
class ProductListBuilder extends StatelessWidget {
|
||||
ProductListBuilder({Key key}) : super(key: key);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
import 'package:invoiceninja/redux/ui/ui_actions.dart';
|
||||
import 'package:invoiceninja/ui/app/app_search.dart';
|
||||
import 'package:invoiceninja/ui/app/app_search_button.dart';
|
||||
import 'package:invoiceninja/ui/product/edit/product_edit_vm.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
import 'package:invoiceninja/redux/app/app_state.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
|
|||
Loading…
Reference in New Issue