@@ -492,12 +492,8 @@ class MainScaffold extends StatelessWidget {
492
492
TooltipButton (
493
493
onPressed: () async {
494
494
final id = await Sentry .captureMessage ('UserFeedback' );
495
- // ignore: use_build_context_synchronously
496
- if (! context.isMounted) {
497
- return ;
498
- }
499
495
500
- // ignore: use_build_context_synchronously
496
+ if ( ! context.mounted) return ;
501
497
await showDialog (
502
498
context: context,
503
499
builder: (context) {
@@ -925,12 +921,7 @@ Future<void> makeWebRequest(BuildContext context) async {
925
921
926
922
await transaction.finish (status: const SpanStatus .ok ());
927
923
928
- // ignore: use_build_context_synchronously
929
- if (! context.isMounted) {
930
- return ;
931
- }
932
-
933
- // ignore: use_build_context_synchronously
924
+ if (! context.mounted) return ;
934
925
await showDialog <void >(
935
926
context: context,
936
927
builder: (context) {
@@ -976,12 +967,7 @@ Future<void> makeWebRequestWithDio(BuildContext context) async {
976
967
await span.finish ();
977
968
}
978
969
979
- // ignore: use_build_context_synchronously
980
- if (! context.isMounted) {
981
- return ;
982
- }
983
-
984
- // ignore: use_build_context_synchronously
970
+ if (! context.mounted) return ;
985
971
await showDialog <void >(
986
972
context: context,
987
973
builder: (context) {
@@ -1011,12 +997,7 @@ Future<void> showDialogWithTextAndImage(BuildContext context) async {
1011
997
final text =
1012
998
await DefaultAssetBundle .of (context).loadString ('assets/lorem-ipsum.txt' );
1013
999
1014
- // ignore: use_build_context_synchronously
1015
- if (! context.isMounted) {
1016
- return ;
1017
- }
1018
-
1019
- // ignore: use_build_context_synchronously
1000
+ if (! context.mounted) return ;
1020
1001
await showDialog <void >(
1021
1002
context: context,
1022
1003
// gets tracked if using SentryNavigatorObserver
0 commit comments