fix crash app

fix_ssl_master
suvaissov 2021-01-19 11:00:19 +06:00
parent 8c0ae9939a
commit e1301e7340
3 changed files with 5 additions and 4 deletions

View File

@ -17,8 +17,8 @@ class SettingState {
return SettingState( return SettingState(
mode: payload?.mode ?? SettingModeKassa, mode: payload?.mode ?? SettingModeKassa,
tradeType: payload?.tradeType ?? SettingTradeTypeGood, tradeType: payload?.tradeType ?? SettingTradeTypeGood,
pinCode: payload.pinCode ?? null, pinCode: payload?.pinCode ?? null,
pinLocked: payload.pinLocked ?? false, pinLocked: payload?.pinLocked ?? false,
pinSkip: false, pinSkip: false,
); );
} }

View File

@ -93,6 +93,7 @@ class _HomeViewState extends State<HomeView> with WidgetsBindingObserver {
_checkLockPin () async { _checkLockPin () async {
if ( Redux.store.state.settingState.pinLocked == true) { if ( Redux.store.state.settingState.pinLocked == true) {
await Future.delayed(Duration(milliseconds: 200));
Navigator.of(context).push(MaterialPageRoute( Navigator.of(context).push(MaterialPageRoute(
builder: (_) => builder: (_) =>
WillPopScope( WillPopScope(
@ -108,11 +109,11 @@ class _HomeViewState extends State<HomeView> with WidgetsBindingObserver {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
WidgetsBinding.instance.addObserver(this);
selectedTabIndex = 0; selectedTabIndex = 0;
pageController = new PageController(initialPage: selectedTabIndex); pageController = new PageController(initialPage: selectedTabIndex);
Redux.store.dispatch(checkSmena); Redux.store.dispatch(checkSmena);
_dataService.checkDbFill(Redux.store.state.userState.user); _dataService.checkDbFill(Redux.store.state.userState.user);
WidgetsBinding.instance.addObserver(this);
_checkLockPin(); _checkLockPin();
} }

View File

@ -53,7 +53,7 @@ class _SettingViewState extends State<SettingView> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
centerTitle: true, centerTitle: true,
title: Text('Настройка HalykPos'), title: Text('Настройка приложения'),
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(