Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: subosito/flutter-action@v2
with:
flutter-version: '3.3.0'
flutter-version: '3.24.5'
channel: 'stable'

- name: Clean Dependencies
Expand All @@ -21,7 +21,7 @@ jobs:
run: flutter packages get

- name: Format
run: flutter format --set-exit-if-changed lib test
run: dart format --set-exit-if-changed lib test

- name: Analyze
run: flutter analyze lib test
Expand Down
3 changes: 2 additions & 1 deletion test/fake_unity_widget_controllers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ class FakePlatformUnityWidget {
FakePlatformUnityWidget(int id, Map<dynamic, dynamic> params)
: channel = MethodChannel(
'plugin.xraph.com/unity_view_$id', const StandardMethodCodec()) {
channel.setMockMethodCallHandler(onMethodCall);
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, onMethodCall);
}

MethodChannel channel;
Expand Down
8 changes: 5 additions & 3 deletions test/flutter_unity_widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ Future<void> main() async {
TestWidgetsFlutterBinding.ensureInitialized();

setUpAll(() {
SystemChannels.platform_views.setMockMethodCallHandler(
fakePlatformViewsController.fakePlatformViewsMethodHandler);
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(SystemChannels.platform_views,
fakePlatformViewsController.fakePlatformViewsMethodHandler);
});

setUp(() {
fakePlatformViewsController.reset();
});

tearDown(() {
channel.setMockMethodCallHandler(null);
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, null);
});

testWidgets('Unity widget ready', (WidgetTester tester) async {
Expand Down