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> {
Future<void> saveRecordedEvents(ByteData data, BuildContext context) async {
if (await channel.invokeMethod<bool>('getStoragePermission') ?? false) {
showMessage(
context, 'External storage permissions are required to save events');
if (mounted) {
showMessage(context, 'External storage permissions are required to save events');
}
return;
}
try {
......
......@@ -154,8 +154,9 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
Future<void> saveRecordedEvents(ByteData data, BuildContext context) async {
if (await channel.invokeMethod<bool>('getStoragePermission') != true) {
showMessage(
context, 'External storage permissions are required to save events');
if (mounted) {
showMessage(context, 'External storage permissions are required to save events');
}
return;
}
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