refactor: Update to Dart 3.10 with . shorthands
This commit is contained in:
parent
75a37f3f7c
commit
1ea649f01e
167 changed files with 3351 additions and 3912 deletions
|
|
@ -82,8 +82,8 @@ class AppLock extends State<AppLockWidget> with WidgetsBindingObserver {
|
|||
}
|
||||
|
||||
void showLockScreen() => setState(() {
|
||||
_isLocked = true;
|
||||
});
|
||||
_isLocked = true;
|
||||
});
|
||||
|
||||
Future<T> pauseWhile<T>(Future<T> future) async {
|
||||
_paused = true;
|
||||
|
|
@ -94,20 +94,15 @@ class AppLock extends State<AppLockWidget> with WidgetsBindingObserver {
|
|||
}
|
||||
}
|
||||
|
||||
static AppLock of(BuildContext context) => Provider.of<AppLock>(
|
||||
context,
|
||||
listen: false,
|
||||
);
|
||||
static AppLock of(BuildContext context) =>
|
||||
Provider.of<AppLock>(context, listen: false);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Provider<AppLock>(
|
||||
create: (_) => this,
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
widget.child,
|
||||
if (isLocked) const LockScreen(),
|
||||
],
|
||||
),
|
||||
);
|
||||
create: (_) => this,
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [widget.child, if (isLocked) const LockScreen()],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue