mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
Fix formatting
This commit is contained in:
parent
6836ac6d1a
commit
59484e5b91
1 changed files with 13 additions and 15 deletions
|
@ -8,15 +8,14 @@ import 'package:cake_wallet/store/authentication_store.dart';
|
||||||
import 'package:cake_wallet/entities/qr_scanner.dart';
|
import 'package:cake_wallet/entities/qr_scanner.dart';
|
||||||
|
|
||||||
class Root extends StatefulWidget {
|
class Root extends StatefulWidget {
|
||||||
Root(
|
Root({
|
||||||
{required Key key,
|
required Key key,
|
||||||
required this.authenticationStore,
|
required this.authenticationStore,
|
||||||
required this.appStore,
|
required this.appStore,
|
||||||
required this.child,
|
required this.child,
|
||||||
required this.navigatorKey,
|
required this.navigatorKey,
|
||||||
required this.authService,
|
required this.authService,
|
||||||
})
|
}) : super(key: key);
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
final AuthenticationStore authenticationStore;
|
final AuthenticationStore authenticationStore;
|
||||||
final AppStore appStore;
|
final AppStore appStore;
|
||||||
|
@ -30,10 +29,10 @@ class Root extends StatefulWidget {
|
||||||
|
|
||||||
class RootState extends State<Root> with WidgetsBindingObserver {
|
class RootState extends State<Root> with WidgetsBindingObserver {
|
||||||
RootState()
|
RootState()
|
||||||
: _isInactiveController = StreamController<bool>.broadcast(),
|
: _isInactiveController = StreamController<bool>.broadcast(),
|
||||||
_isInactive = false,
|
_isInactive = false,
|
||||||
_requestAuth = true,
|
_requestAuth = true,
|
||||||
_postFrameCallback = false;
|
_postFrameCallback = false;
|
||||||
|
|
||||||
Stream<bool> get isInactive => _isInactiveController.stream;
|
Stream<bool> get isInactive => _isInactiveController.stream;
|
||||||
StreamController<bool> _isInactiveController;
|
StreamController<bool> _isInactiveController;
|
||||||
|
@ -63,8 +62,7 @@ class RootState extends State<Root> with WidgetsBindingObserver {
|
||||||
_requestAuth = widget.authService.requireAuth();
|
_requestAuth = widget.authService.requireAuth();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!_isInactive &&
|
if (!_isInactive && widget.authenticationStore.state == AuthenticationState.allowed) {
|
||||||
widget.authenticationStore.state == AuthenticationState.allowed) {
|
|
||||||
setState(() => _setInactive(true));
|
setState(() => _setInactive(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue