mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
fix upcomming diagnostics after updates on use_build_context_synchronously (#106057)
This commit is contained in:
parent
e55aa0e85c
commit
504a2ca6b0
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user