Unverified Commit 504a2ca6 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

fix upcomming diagnostics after updates on use_build_context_synchronously (#106057)

parent e55aa0e8
...@@ -172,8 +172,9 @@ class MotionEventsBodyState extends State<MotionEventsBody> { ...@@ -172,8 +172,9 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
Future<void> saveRecordedEvents(ByteData data, BuildContext context) async { Future<void> saveRecordedEvents(ByteData data, BuildContext context) async {
if (await channel.invokeMethod<bool>('getStoragePermission') ?? false) { if (await channel.invokeMethod<bool>('getStoragePermission') ?? false) {
showMessage( if (mounted) {
context, 'External storage permissions are required to save events'); showMessage(context, 'External storage permissions are required to save events');
}
return; return;
} }
try { try {
......
...@@ -154,8 +154,9 @@ class MotionEventsBodyState extends State<MotionEventsBody> { ...@@ -154,8 +154,9 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
Future<void> saveRecordedEvents(ByteData data, BuildContext context) async { Future<void> saveRecordedEvents(ByteData data, BuildContext context) async {
if (await channel.invokeMethod<bool>('getStoragePermission') != true) { if (await channel.invokeMethod<bool>('getStoragePermission') != true) {
showMessage( if (mounted) {
context, 'External storage permissions are required to save events'); showMessage(context, 'External storage permissions are required to save events');
}
return; return;
} }
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment