Refactor
This commit is contained in:
parent
f25a48efa7
commit
ffa3fb12a2
|
|
@ -7,7 +7,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||
import 'package:intl/intl.dart';
|
||||
import 'package:invoiceninja_flutter/.env.dart';
|
||||
import 'package:invoiceninja_flutter/constants.dart';
|
||||
import 'package:invoiceninja_flutter/data/models/company_model.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_middleware.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_reducer.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||
|
|
@ -149,7 +148,6 @@ Future<AppState> _initialState(bool isTesting) async {
|
|||
|
||||
return AppState(
|
||||
uiState: UIState(
|
||||
CompanyEntity(),
|
||||
isTesting: isTesting,
|
||||
enableDarkMode: prefs?.getBool(kSharedPrefEnableDarkMode) ?? true,
|
||||
accentColor:
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
|||
companyState8: UserCompanyState(),
|
||||
companyState9: UserCompanyState(),
|
||||
companyState10: UserCompanyState(),
|
||||
uiState: uiState ?? UIState(CompanyEntity()),
|
||||
uiState: uiState ?? UIState(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'package:built_collection/built_collection.dart';
|
|||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:invoiceninja_flutter/data/models/company_model.dart';
|
||||
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
||||
import 'package:invoiceninja_flutter/redux/client/client_state.dart';
|
||||
import 'package:invoiceninja_flutter/redux/company/company_state.dart';
|
||||
|
|
@ -27,8 +26,7 @@ import 'package:invoiceninja_flutter/redux/group/group_state.dart';
|
|||
part 'ui_state.g.dart';
|
||||
|
||||
abstract class UIState implements Built<UIState, UIStateBuilder> {
|
||||
factory UIState(
|
||||
CompanyEntity company, {
|
||||
factory UIState({
|
||||
AppLayout layout,
|
||||
bool isTesting,
|
||||
bool enableDarkMode,
|
||||
|
|
|
|||
Loading…
Reference in New Issue