Skip to content

Commit fb8dcae

Browse files
committed
Merge branch 'main' into sensors
2 parents 81b23c6 + f32e641 commit fb8dcae

File tree

770 files changed

+7399
-4099
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

770 files changed

+7399
-4099
lines changed

.fvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"flutter": "3.35.5"
2+
"flutter": "3.38.3"
33
}

.github/workflows/macos-integration-tests.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,18 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
suite: [apps, examples, controls/core, controls/material, controls/cupertino, controls/theme, controls/types]
39+
suite:
40+
- apps
41+
- examples/apps
42+
- examples/core
43+
- examples/cupertino
44+
- examples/material
45+
- controls/core
46+
- controls/cupertino
47+
- controls/material
48+
- controls/theme
49+
- controls/types
50+
4051
name: ${{ matrix.suite }} Integration Tests
4152
steps:
4253
- name: Checkout repository
@@ -47,7 +58,6 @@ jobs:
4758

4859
- name: Setup Flutter
4960
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
50-
id: fvm-config-action
5161
with:
5262
path: '.fvmrc'
5363
cache: true

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Controls in Python are now defined as plain dataclasses
1414
* Unified diffing algorithm supports both imperative and declarative styles
1515
* Refactored Flutter layer using inherited widgets and `Provider`
16+
* Added a Shimmer control for building skeleton loaders and animated placeholders.
1617
* Added `FletApp.appErrorMessage` template to customize loading screen errors.
1718
* See the list of [breaking changes](https://github.com/flet-dev/flet/issues/5238)
1819

client/integration_test/flutter_tester.dart

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ class FlutterWidgetTester implements Tester {
1414
final IntegrationTestWidgetsFlutterBinding _binding;
1515
final lock = Lock();
1616
final Completer _teardown = Completer();
17+
TestGesture? _gesture;
1718

1819
FlutterWidgetTester(this._tester, this._binding);
1920

2021
@override
2122
Future<void> pumpAndSettle({Duration? duration}) async {
2223
await lock.acquire();
2324
try {
24-
await _tester
25-
.pumpAndSettle(duration ?? const Duration(milliseconds: 100));
25+
await _tester.pumpAndSettle(
26+
duration ?? const Duration(milliseconds: 100),
27+
);
2628
} finally {
2729
lock.release();
2830
}
@@ -60,7 +62,8 @@ class FlutterWidgetTester implements Tester {
6062
if (defaultTargetPlatform != TargetPlatform.android &&
6163
defaultTargetPlatform != TargetPlatform.iOS) {
6264
throw Exception(
63-
"Full app screenshots are only available on Android and iOS.");
65+
"Full app screenshots are only available on Android and iOS.",
66+
);
6467
}
6568
if (defaultTargetPlatform == TargetPlatform.android) {
6669
await _binding.convertFlutterSurfaceToImage();
@@ -74,27 +77,44 @@ class FlutterWidgetTester implements Tester {
7477
Future<void> tap(TestFinder finder, int finderIndex) =>
7578
_tester.tap((finder as FlutterTestFinder).raw.at(finderIndex));
7679

80+
@override
81+
Future<void> tapAt(Offset offset) =>
82+
_tester.tapAt(offset);
83+
7784
@override
7885
Future<void> longPress(TestFinder finder, int finderIndex) =>
7986
_tester.longPress((finder as FlutterTestFinder).raw.at(finderIndex));
87+
8088
@override
81-
Future<void> enterText(TestFinder finder, int finderIndex, String text) =>
89+
Future<void> enterText(
90+
TestFinder finder, int finderIndex, String text) =>
8291
_tester.enterText(
83-
(finder as FlutterTestFinder).raw.at(finderIndex), text);
92+
(finder as FlutterTestFinder).raw.at(finderIndex),
93+
text,
94+
);
8495

8596
@override
8697
Future<void> mouseHover(TestFinder finder, int finderIndex) async {
87-
final center =
88-
_tester.getCenter((finder as FlutterTestFinder).raw.at(finderIndex));
89-
final gesture = await _tester.createGesture(kind: PointerDeviceKind.mouse);
90-
await gesture.addPointer();
91-
await gesture.moveTo(center);
92-
await pumpAndSettle();
98+
final center = _tester.getCenter(
99+
(finder as FlutterTestFinder).raw.at(finderIndex),
100+
);
101+
102+
await _mouseExit();
103+
_gesture = await _tester.createGesture(kind: PointerDeviceKind.mouse);
104+
await _gesture?.addPointer();
105+
await _gesture?.moveTo(center);
93106
}
94107

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

98111
@override
99112
Future waitForTeardown() => _teardown.future;
113+
114+
Future<void> _mouseExit() async {
115+
if (_gesture != null) {
116+
await _gesture?.removePointer();
117+
_gesture = null;
118+
}
119+
}
100120
}

0 commit comments

Comments
 (0)