Skip to content

Commit b0811cc

Browse files
authored
Disable canvasKit renderer tests for beta channel (#1894)
* Disable canvasKit renderer tests for ‚beta‘ channel * fix condition * fix analyzer issues
1 parent 55610cd commit b0811cc

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

.github/workflows/flutter.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,17 @@ jobs:
9393
cd flutter
9494
flutter pub get
9595
96-
- name: Test chrome
96+
- name: Test chrome (exclude canvasKit)
9797
if: runner.os == 'Linux'
9898
run: |
9999
cd flutter
100100
flutter test --platform chrome --test-randomize-ordering-seed=random --exclude-tags canvasKit
101+
102+
# TODO: Revert when canvasKit is available again in `beta` channel
103+
- name: Test chrome (canvasKit)
104+
if: runner.os == 'Linux' && matrix.sdk != 'beta'
105+
run: |
106+
cd flutter
101107
flutter test --platform chrome --test-randomize-ordering-seed=random --tags canvasKit --web-renderer canvaskit
102108
103109
- name: Test VM with coverage

flutter/example/lib/main.dart

+4-23
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,8 @@ class MainScaffold extends StatelessWidget {
478478
TooltipButton(
479479
onPressed: () async {
480480
final id = await Sentry.captureMessage('UserFeedback');
481-
// ignore: use_build_context_synchronously
482-
if (!context.isMounted) {
483-
return;
484-
}
485481

486-
// ignore: use_build_context_synchronously
482+
if (!context.mounted) return;
487483
await showDialog(
488484
context: context,
489485
builder: (context) {
@@ -906,12 +902,7 @@ Future<void> makeWebRequest(BuildContext context) async {
906902

907903
await transaction.finish(status: const SpanStatus.ok());
908904

909-
// ignore: use_build_context_synchronously
910-
if (!context.isMounted) {
911-
return;
912-
}
913-
914-
// ignore: use_build_context_synchronously
905+
if (!context.mounted) return;
915906
await showDialog<void>(
916907
context: context,
917908
builder: (context) {
@@ -957,12 +948,7 @@ Future<void> makeWebRequestWithDio(BuildContext context) async {
957948
await span.finish();
958949
}
959950

960-
// ignore: use_build_context_synchronously
961-
if (!context.isMounted) {
962-
return;
963-
}
964-
965-
// ignore: use_build_context_synchronously
951+
if (!context.mounted) return;
966952
await showDialog<void>(
967953
context: context,
968954
builder: (context) {
@@ -992,12 +978,7 @@ Future<void> showDialogWithTextAndImage(BuildContext context) async {
992978
final text =
993979
await DefaultAssetBundle.of(context).loadString('assets/lorem-ipsum.txt');
994980

995-
// ignore: use_build_context_synchronously
996-
if (!context.isMounted) {
997-
return;
998-
}
999-
1000-
// ignore: use_build_context_synchronously
981+
if (!context.mounted) return;
1001982
await showDialog<void>(
1002983
context: context,
1003984
// gets tracked if using SentryNavigatorObserver

0 commit comments

Comments
 (0)