mirror of
https://github.com/localsend/localsend.git
synced 2026-08-07 07:14:52 +00:00
fix: analyzer warnings
This commit is contained in:
@@ -211,7 +211,7 @@ class _ProgressPageState extends State<ProgressPage> with Refena {
|
||||
|
||||
return PopScope(
|
||||
onPopInvokedWithResult: (_, __) async {
|
||||
if (await _onWillPop() && mounted) {
|
||||
if (await _onWillPop() && context.mounted) {
|
||||
context.pop();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -164,7 +164,7 @@ class _WebSendPageState extends State<WebSendPage> with Refena {
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
await Clipboard.setData(ClipboardData(text: url));
|
||||
if (mounted && checkPlatformIsDesktop()) {
|
||||
if (context.mounted && checkPlatformIsDesktop()) {
|
||||
context.showSnackBar(t.general.copiedToClipboard);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -162,9 +162,8 @@ class SendNotifier extends Notifier<Map<String, SendSessionState>> {
|
||||
// wait until animation is finished
|
||||
await sleepAsync(500);
|
||||
|
||||
// ignore: use_build_context_synchronously
|
||||
pin = await showDialog<String>(
|
||||
context: Routerino.context,
|
||||
context: Routerino.context, // ignore: use_build_context_synchronously
|
||||
builder: (_) => PinDialog(
|
||||
obscureText: true,
|
||||
showInvalidPin: !pinFirstAttempt,
|
||||
|
||||
@@ -99,9 +99,9 @@ class _FavoriteEditDialogState extends State<FavoriteEditDialog> with Refena {
|
||||
builder: (_) => FavoriteDeleteDialog(widget.favorite!),
|
||||
);
|
||||
|
||||
if (mounted && result == true) {
|
||||
if (context.mounted && result == true) {
|
||||
await context.ref.redux(favoritesProvider).dispatchAsync(RemoveFavoriteAction(deviceFingerprint: widget.favorite!.fingerprint));
|
||||
if (mounted) {
|
||||
if (context.mounted) {
|
||||
context.pop();
|
||||
}
|
||||
}
|
||||
@@ -180,7 +180,7 @@ class _FavoriteEditDialogState extends State<FavoriteEditDialog> with Refena {
|
||||
)));
|
||||
}
|
||||
|
||||
if (mounted) {
|
||||
if (context.mounted) {
|
||||
context.pop();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user