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
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.35.5"
"flutter": "3.38.2"
}
22 changes: 19 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,27 @@ jobs:
- name: Setup uv
uses: astral-sh/setup-uv@v6

- name: Setup Flutter
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
- name: Configure Flutter version
uses: kuhnroyal/flutter-fvm-config-action/config@v3
id: fvm-config-action
with:
path: '.fvmrc'
cache: true

- name: Setup Flutter
id: flutter-action
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
cache: false

# TODO: Remove when https://github.com/actions/runner-images/issues/13341 is fixed
- name: Cache Flutter
id: cache-flutter
uses: actions/cache@v4
with:
path: ${{ steps.flutter-action.outputs.CACHE-PATH }}
key: ${{ steps.flutter-action.outputs.CACHE-KEY }}

- name: Build Flutter macOS client
shell: bash
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/macos-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,27 @@ jobs:
- name: Setup uv
uses: astral-sh/setup-uv@v6

- name: Setup Flutter
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
- name: Configure Flutter version
uses: kuhnroyal/flutter-fvm-config-action/config@v3
id: fvm-config-action
with:
path: '.fvmrc'
cache: true

- name: Setup Flutter
id: flutter-action
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
cache: false

# TODO: Remove when https://github.com/actions/runner-images/issues/13341 is fixed
- name: Cache Flutter
id: cache-flutter
uses: actions/cache@v4
with:
path: ${{ steps.flutter-action.outputs.CACHE-PATH }}
key: ${{ steps.flutter-action.outputs.CACHE-KEY }}

- name: Show tool versions
run: |
Expand Down
51 changes: 35 additions & 16 deletions client/integration_test/flutter_tester.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ class FlutterWidgetTester implements Tester {
final IntegrationTestWidgetsFlutterBinding _binding;
final lock = Lock();
final Completer _teardown = Completer();
TestGesture? _gesture;

FlutterWidgetTester(this._tester, this._binding);

@override
Future<void> pumpAndSettle({Duration? duration}) async {
await lock.acquire();
try {
await _tester
.pumpAndSettle(duration ?? const Duration(milliseconds: 100));
await _tester.pumpAndSettle(
duration ?? const Duration(milliseconds: 100),
);
} finally {
lock.release();
}
Expand Down Expand Up @@ -60,7 +62,8 @@ class FlutterWidgetTester implements Tester {
if (defaultTargetPlatform != TargetPlatform.android &&
defaultTargetPlatform != TargetPlatform.iOS) {
throw Exception(
"Full app screenshots are only available on Android and iOS.");
"Full app screenshots are only available on Android and iOS.",
);
}
if (defaultTargetPlatform == TargetPlatform.android) {
await _binding.convertFlutterSurfaceToImage();
Expand All @@ -71,30 +74,46 @@ class FlutterWidgetTester implements Tester {
}

@override
Future<void> tap(TestFinder finder, int finderIndex) =>
_tester.tap((finder as FlutterTestFinder).raw.at(finderIndex));
Future<void> tap(TestFinder finder, int finderIndex) async {
await _tester.tap((finder as FlutterTestFinder).raw.at(finderIndex));
}

@override
Future<void> longPress(TestFinder finder, int finderIndex) =>
_tester.longPress((finder as FlutterTestFinder).raw.at(finderIndex));
Future<void> longPress(TestFinder finder, int finderIndex) async {
await _tester.longPress((finder as FlutterTestFinder).raw.at(finderIndex));
}

@override
Future<void> enterText(TestFinder finder, int finderIndex, String text) =>
_tester.enterText(
(finder as FlutterTestFinder).raw.at(finderIndex), text);
Future<void> enterText(
TestFinder finder, int finderIndex, String text) async {
await _tester.enterText(
(finder as FlutterTestFinder).raw.at(finderIndex),
text,
);
}

@override
Future<void> mouseHover(TestFinder finder, int finderIndex) async {
final center =
_tester.getCenter((finder as FlutterTestFinder).raw.at(finderIndex));
final gesture = await _tester.createGesture(kind: PointerDeviceKind.mouse);
await gesture.addPointer();
await gesture.moveTo(center);
await pumpAndSettle();
final center = _tester.getCenter(
(finder as FlutterTestFinder).raw.at(finderIndex),
);

await _mouseExit();
_gesture = await _tester.createGesture(kind: PointerDeviceKind.mouse);
await _gesture?.addPointer();
await _gesture?.moveTo(center);
}

@override
void teardown() => _teardown.complete();

@override
Future waitForTeardown() => _teardown.future;

Future<void> _mouseExit() async {
if (_gesture != null) {
await _gesture?.removePointer();
_gesture = null;
}
}
}
2 changes: 0 additions & 2 deletions client/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import geolocator_apple
import media_kit_libs_macos_video
import media_kit_video
import package_info_plus
import path_provider_foundation
import record_macos
import rive_common
import screen_retriever_macos
Expand All @@ -32,7 +31,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
RecordMacOsPlugin.register(with: registry.registrar(forPlugin: "RecordMacOsPlugin"))
RivePlugin.register(with: registry.registrar(forPlugin: "RivePlugin"))
ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin"))
Expand Down
Loading
Loading