Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the `engine` subdirectory and enforces that these files stay formatted with a presubmit check. **Reviewers:** Please carefully review all the commits except for the one titled "formatted". The "formatted" commit was auto-generated by running `dev/tools/format.sh -a -f`. The other commits were hand-crafted to prepare the repo for the formatting change. I recommend reviewing the commits one-by-one via the "Commits" tab and avoiding Github's "Files changed" tab as it will likely slow down your browser because of the size of this PR. --------- Co-authored-by: Kate Lovett <katelovett@google.com> Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8e0993eda8
commit
5491c8c146
@@ -38,8 +38,7 @@ class AndroidPlatformView extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return PlatformViewLink(
|
||||
viewType: viewType,
|
||||
surfaceFactory:
|
||||
(BuildContext context, PlatformViewController controller) {
|
||||
surfaceFactory: (BuildContext context, PlatformViewController controller) {
|
||||
return AndroidViewSurface(
|
||||
controller: controller as AndroidViewController,
|
||||
gestureRecognizers: const <Factory<OneSequenceGestureRecognizer>>{},
|
||||
|
||||
@@ -25,7 +25,7 @@ class FutureDataHandler {
|
||||
Future<String> handleMessage(String? message) async {
|
||||
if (_handlers[message] == null) {
|
||||
return 'Unsupported driver message: $message.\n'
|
||||
'Supported messages are: ${_handlers.keys}.';
|
||||
'Supported messages are: ${_handlers.keys}.';
|
||||
}
|
||||
final DriverHandler handler = await _handlers[message]!.future;
|
||||
return handler();
|
||||
|
||||
@@ -27,7 +27,7 @@ class Home extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: ListView(
|
||||
children: _allPages.map((PageWidget p) => _buildPageListTile(context, p)).toList(),
|
||||
children: _allPages.map((PageWidget p) => _buildPageListTile(context, p)).toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -36,14 +36,13 @@ class Home extends StatelessWidget {
|
||||
return ListTile(
|
||||
title: Text(page.title),
|
||||
key: page.tileKey,
|
||||
onTap: () { _pushPage(context, page); },
|
||||
onTap: () {
|
||||
_pushPage(context, page);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _pushPage(BuildContext context, PageWidget page) {
|
||||
Navigator.of(context).push(MaterialPageRoute<void>(
|
||||
builder: (_) => Scaffold(
|
||||
body: page,
|
||||
)));
|
||||
Navigator.of(context).push(MaterialPageRoute<void>(builder: (_) => Scaffold(body: page)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,19 +15,21 @@ const List<int> kPointerActions = <int>[
|
||||
|
||||
const double kDoubleErrorMargin = 1e-4;
|
||||
|
||||
String diffMotionEvents(
|
||||
Map<String, dynamic> originalEvent,
|
||||
Map<String, dynamic> synthesizedEvent,
|
||||
) {
|
||||
String diffMotionEvents(Map<String, dynamic> originalEvent, Map<String, dynamic> synthesizedEvent) {
|
||||
final StringBuffer diff = StringBuffer();
|
||||
|
||||
diffMaps(originalEvent, synthesizedEvent, diff, excludeKeys: const <String>[
|
||||
'pointerProperties', // Compared separately.
|
||||
'pointerCoords', // Compared separately.
|
||||
'source', // Unused by Flutter.
|
||||
'deviceId', // Android documentation says that's an arbitrary number that shouldn't be depended on.
|
||||
'action', // Compared separately.
|
||||
]);
|
||||
diffMaps(
|
||||
originalEvent,
|
||||
synthesizedEvent,
|
||||
diff,
|
||||
excludeKeys: const <String>[
|
||||
'pointerProperties', // Compared separately.
|
||||
'pointerCoords', // Compared separately.
|
||||
'source', // Unused by Flutter.
|
||||
'deviceId', // Android documentation says that's an arbitrary number that shouldn't be depended on.
|
||||
'action', // Compared separately.
|
||||
],
|
||||
);
|
||||
|
||||
diffActions(diff, originalEvent, synthesizedEvent);
|
||||
diffPointerProperties(diff, originalEvent, synthesizedEvent);
|
||||
@@ -36,19 +38,24 @@ String diffMotionEvents(
|
||||
return diff.toString();
|
||||
}
|
||||
|
||||
void diffActions(StringBuffer diffBuffer, Map<String, dynamic> originalEvent,
|
||||
Map<String, dynamic> synthesizedEvent) {
|
||||
final int synthesizedActionMasked =
|
||||
getActionMasked(synthesizedEvent['action'] as int);
|
||||
void diffActions(
|
||||
StringBuffer diffBuffer,
|
||||
Map<String, dynamic> originalEvent,
|
||||
Map<String, dynamic> synthesizedEvent,
|
||||
) {
|
||||
final int synthesizedActionMasked = getActionMasked(synthesizedEvent['action'] as int);
|
||||
final int originalActionMasked = getActionMasked(originalEvent['action'] as int);
|
||||
final String synthesizedActionName =
|
||||
getActionName(synthesizedActionMasked, synthesizedEvent['action'] as int);
|
||||
final String originalActionName =
|
||||
getActionName(originalActionMasked, originalEvent['action'] as int);
|
||||
final String synthesizedActionName = getActionName(
|
||||
synthesizedActionMasked,
|
||||
synthesizedEvent['action'] as int,
|
||||
);
|
||||
final String originalActionName = getActionName(
|
||||
originalActionMasked,
|
||||
originalEvent['action'] as int,
|
||||
);
|
||||
|
||||
if (synthesizedActionMasked != originalActionMasked) {
|
||||
diffBuffer.write(
|
||||
'action (expected: $originalActionName actual: $synthesizedActionName) ');
|
||||
diffBuffer.write('action (expected: $originalActionName actual: $synthesizedActionName) ');
|
||||
}
|
||||
|
||||
if (kPointerActions.contains(originalActionMasked) &&
|
||||
@@ -57,13 +64,17 @@ void diffActions(StringBuffer diffBuffer, Map<String, dynamic> originalEvent,
|
||||
final int synthesizedPointer = getPointerIdx(synthesizedEvent['action'] as int);
|
||||
if (originalPointer != synthesizedPointer) {
|
||||
diffBuffer.write(
|
||||
'pointerIdx (expected: $originalPointer actual: $synthesizedPointer action: $originalActionName ');
|
||||
'pointerIdx (expected: $originalPointer actual: $synthesizedPointer action: $originalActionName ',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void diffPointerProperties(StringBuffer diffBuffer,
|
||||
Map<String, dynamic> originalEvent, Map<String, dynamic> synthesizedEvent) {
|
||||
void diffPointerProperties(
|
||||
StringBuffer diffBuffer,
|
||||
Map<String, dynamic> originalEvent,
|
||||
Map<String, dynamic> synthesizedEvent,
|
||||
) {
|
||||
final List<Map<dynamic, dynamic>> expectedList =
|
||||
(originalEvent['pointerProperties'] as List<dynamic>).cast<Map<dynamic, dynamic>>();
|
||||
final List<Map<dynamic, dynamic>> actualList =
|
||||
@@ -71,21 +82,23 @@ void diffPointerProperties(StringBuffer diffBuffer,
|
||||
|
||||
if (expectedList.length != actualList.length) {
|
||||
diffBuffer.write(
|
||||
'pointerProperties (actual length: ${actualList.length}, expected length: ${expectedList.length} ');
|
||||
'pointerProperties (actual length: ${actualList.length}, expected length: ${expectedList.length} ',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < expectedList.length; i++) {
|
||||
final Map<String, dynamic> expected =
|
||||
expectedList[i].cast<String, dynamic>();
|
||||
final Map<String, dynamic> expected = expectedList[i].cast<String, dynamic>();
|
||||
final Map<String, dynamic> actual = actualList[i].cast<String, dynamic>();
|
||||
diffMaps(expected, actual, diffBuffer,
|
||||
messagePrefix: '[pointerProperty $i] ');
|
||||
diffMaps(expected, actual, diffBuffer, messagePrefix: '[pointerProperty $i] ');
|
||||
}
|
||||
}
|
||||
|
||||
void diffPointerCoordsList(StringBuffer diffBuffer,
|
||||
Map<String, dynamic> originalEvent, Map<String, dynamic> synthesizedEvent) {
|
||||
void diffPointerCoordsList(
|
||||
StringBuffer diffBuffer,
|
||||
Map<String, dynamic> originalEvent,
|
||||
Map<String, dynamic> synthesizedEvent,
|
||||
) {
|
||||
final List<Map<dynamic, dynamic>> expectedList =
|
||||
(originalEvent['pointerCoords'] as List<dynamic>).cast<Map<dynamic, dynamic>>();
|
||||
final List<Map<dynamic, dynamic>> actualList =
|
||||
@@ -93,20 +106,24 @@ void diffPointerCoordsList(StringBuffer diffBuffer,
|
||||
|
||||
if (expectedList.length != actualList.length) {
|
||||
diffBuffer.write(
|
||||
'pointerCoords (actual length: ${actualList.length}, expected length: ${expectedList.length} ');
|
||||
'pointerCoords (actual length: ${actualList.length}, expected length: ${expectedList.length} ',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < expectedList.length; i++) {
|
||||
final Map<String, dynamic> expected =
|
||||
expectedList[i].cast<String, dynamic>();
|
||||
final Map<String, dynamic> expected = expectedList[i].cast<String, dynamic>();
|
||||
final Map<String, dynamic> actual = actualList[i].cast<String, dynamic>();
|
||||
diffPointerCoords(expected, actual, i, diffBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
void diffPointerCoords(Map<String, dynamic> expected,
|
||||
Map<String, dynamic> actual, int pointerIdx, StringBuffer diffBuffer) {
|
||||
void diffPointerCoords(
|
||||
Map<String, dynamic> expected,
|
||||
Map<String, dynamic> actual,
|
||||
int pointerIdx,
|
||||
StringBuffer diffBuffer,
|
||||
) {
|
||||
diffMaps(expected, actual, diffBuffer, messagePrefix: '[pointerCoord $pointerIdx] ');
|
||||
}
|
||||
|
||||
@@ -119,8 +136,7 @@ void diffMaps(
|
||||
}) {
|
||||
const IterableEquality<String> eq = IterableEquality<String>();
|
||||
if (!eq.equals(expected.keys, actual.keys)) {
|
||||
diffBuffer.write(
|
||||
'${messagePrefix}keys (expected: ${expected.keys} actual: ${actual.keys} ');
|
||||
diffBuffer.write('${messagePrefix}keys (expected: ${expected.keys} actual: ${actual.keys} ');
|
||||
return;
|
||||
}
|
||||
for (final String key in expected.keys) {
|
||||
@@ -132,8 +148,7 @@ void diffMaps(
|
||||
}
|
||||
|
||||
if (expected[key] != actual[key]) {
|
||||
diffBuffer.write(
|
||||
'$messagePrefix$key (expected: ${expected[key]} actual: ${actual[key]}) ');
|
||||
diffBuffer.write('$messagePrefix$key (expected: ${expected[key]} actual: ${actual[key]}) ');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ const String kEventsFileName = 'touchEvents';
|
||||
|
||||
class MotionEventsPage extends PageWidget {
|
||||
const MotionEventsPage({Key? key})
|
||||
: super('Motion Event Tests', const ValueKey<String>('MotionEventsListTile'), key: key);
|
||||
: super('Motion Event Tests', const ValueKey<String>('MotionEventsListTile'), key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -57,10 +57,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemBuilder: buildEventTile,
|
||||
itemCount: flutterViewEvents.length,
|
||||
),
|
||||
child: ListView.builder(itemBuilder: buildEventTile, itemCount: flutterViewEvents.length),
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
@@ -86,8 +83,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
||||
child: const Text('SAVE'),
|
||||
onPressed: () {
|
||||
const StandardMessageCodec codec = StandardMessageCodec();
|
||||
saveRecordedEvents(
|
||||
codec.encodeMessage(flutterViewEvents)!, context);
|
||||
saveRecordedEvents(codec.encodeMessage(flutterViewEvents)!, context);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -95,14 +91,18 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
||||
child: ElevatedButton(
|
||||
key: const ValueKey<String>('play'),
|
||||
child: const Text('PLAY FILE'),
|
||||
onPressed: () { playEventsFile(); },
|
||||
onPressed: () {
|
||||
playEventsFile();
|
||||
},
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
key: const ValueKey<String>('back'),
|
||||
child: const Text('BACK'),
|
||||
onPressed: () { Navigator.pop(context); },
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -114,12 +114,15 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
||||
Future<String> playEventsFile() async {
|
||||
const StandardMessageCodec codec = StandardMessageCodec();
|
||||
try {
|
||||
final ByteData data = await rootBundle.load('packages/assets_for_android_views/assets/touchEvents');
|
||||
final ByteData data = await rootBundle.load(
|
||||
'packages/assets_for_android_views/assets/touchEvents',
|
||||
);
|
||||
final List<dynamic> unTypedRecordedEvents = codec.decodeMessage(data) as List<dynamic>;
|
||||
final List<Map<String, dynamic>> recordedEvents = unTypedRecordedEvents
|
||||
.cast<Map<dynamic, dynamic>>()
|
||||
.map<Map<String, dynamic>>((Map<dynamic, dynamic> e) =>e.cast<String, dynamic>())
|
||||
.toList();
|
||||
final List<Map<String, dynamic>> recordedEvents =
|
||||
unTypedRecordedEvents
|
||||
.cast<Map<dynamic, dynamic>>()
|
||||
.map<Map<String, dynamic>>((Map<dynamic, dynamic> e) => e.cast<String, dynamic>())
|
||||
.toList();
|
||||
await viewChannel!.invokeMethod<void>('pipeTouchEvents');
|
||||
print('replaying ${recordedEvents.length} motion events');
|
||||
for (final Map<String, dynamic> event in recordedEvents.reversed) {
|
||||
@@ -180,15 +183,13 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
||||
}
|
||||
|
||||
void showMessage(BuildContext context, String message) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||
content: Text(message),
|
||||
duration: const Duration(seconds: 3),
|
||||
));
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(message), duration: const Duration(seconds: 3)));
|
||||
}
|
||||
|
||||
void onPlatformViewCreated(int id) {
|
||||
viewChannel = MethodChannel('simple_view/$id')
|
||||
..setMethodCallHandler(onViewMethodChannelCall);
|
||||
viewChannel = MethodChannel('simple_view/$id')..setMethodCallHandler(onViewMethodChannelCall);
|
||||
driverDataHandler.registerHandler('run test').complete(playEventsFile);
|
||||
}
|
||||
|
||||
@@ -227,11 +228,9 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
||||
|
||||
Widget buildEventTile(BuildContext context, int index) {
|
||||
if (embeddedViewEvents.length > index) {
|
||||
return TouchEventDiff(
|
||||
flutterViewEvents[index], embeddedViewEvents[index]);
|
||||
return TouchEventDiff(flutterViewEvents[index], embeddedViewEvents[index]);
|
||||
}
|
||||
return Text(
|
||||
'Unmatched event, action: ${flutterViewEvents[index]['action']}');
|
||||
return Text('Unmatched event, action: ${flutterViewEvents[index]['action']}');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +242,6 @@ class TouchEventDiff extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
Color color;
|
||||
final String diff = diffMotionEvents(originalEvent, synthesizedEvent);
|
||||
String msg;
|
||||
@@ -263,11 +261,7 @@ class TouchEventDiff extends StatelessWidget {
|
||||
print('\nactual:');
|
||||
prettyPrintEvent(synthesizedEvent);
|
||||
},
|
||||
child: Container(
|
||||
color: color,
|
||||
margin: const EdgeInsets.only(bottom: 2.0),
|
||||
child: Text(msg),
|
||||
),
|
||||
child: Container(color: color, margin: const EdgeInsets.only(bottom: 2.0), child: Text(msg)),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -279,12 +273,15 @@ class TouchEventDiff extends StatelessWidget {
|
||||
|
||||
buffer.write('$actionName ');
|
||||
if (maskedAction == 5 || maskedAction == 6) {
|
||||
buffer.write('pointer: ${getPointerIdx(action)} ');
|
||||
buffer.write('pointer: ${getPointerIdx(action)} ');
|
||||
}
|
||||
|
||||
final List<Map<dynamic, dynamic>> coords = (event['pointerCoords'] as List<dynamic>).cast<Map<dynamic, dynamic>>();
|
||||
final List<Map<dynamic, dynamic>> coords =
|
||||
(event['pointerCoords'] as List<dynamic>).cast<Map<dynamic, dynamic>>();
|
||||
for (int i = 0; i < coords.length; i++) {
|
||||
buffer.write('p$i x: ${coords[i]['x']} y: ${coords[i]['y']}, pressure: ${coords[i]['pressure']} ');
|
||||
buffer.write(
|
||||
'p$i x: ${coords[i]['x']} y: ${coords[i]['y']}, pressure: ${coords[i]['pressure']} ',
|
||||
);
|
||||
}
|
||||
print(buffer);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import 'page.dart';
|
||||
|
||||
class NestedViewEventPage extends PageWidget {
|
||||
const NestedViewEventPage({Key? key})
|
||||
: super('Nested View Event Tests', const ValueKey<String>('NestedViewEventTile'), key: key);
|
||||
: super('Nested View Event Tests', const ValueKey<String>('NestedViewEventTile'), key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => const NestedViewEventBody();
|
||||
@@ -26,11 +26,7 @@ class NestedViewEventBody extends StatefulWidget {
|
||||
State<NestedViewEventBody> createState() => NestedViewEventBodyState();
|
||||
}
|
||||
|
||||
enum _LastTestStatus {
|
||||
pending,
|
||||
success,
|
||||
error
|
||||
}
|
||||
enum _LastTestStatus { pending, success, error }
|
||||
|
||||
class NestedViewEventBodyState extends State<NestedViewEventBody> {
|
||||
MethodChannel? viewChannel;
|
||||
@@ -44,9 +40,7 @@ class NestedViewEventBodyState extends State<NestedViewEventBody> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Nested view event'),
|
||||
),
|
||||
appBar: AppBar(title: const Text('Nested view event')),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
@@ -69,15 +63,13 @@ class NestedViewEventBodyState extends State<NestedViewEventBody> {
|
||||
// rendering operations throughout the framework and engine.
|
||||
const Positioned(
|
||||
top: 50,
|
||||
child: Text('overlapping widget',
|
||||
style: TextStyle(color: Colors.yellow),
|
||||
),
|
||||
child: Text('overlapping widget', style: TextStyle(color: Colors.yellow)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (_lastTestStatus != _LastTestStatus.pending) _statusWidget(),
|
||||
if (viewChannel != null) ... <Widget>[
|
||||
if (viewChannel != null) ...<Widget>[
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
@@ -144,9 +136,7 @@ class NestedViewEventBodyState extends State<NestedViewEventBody> {
|
||||
child: Text(
|
||||
message,
|
||||
key: const ValueKey<String>('Status'),
|
||||
style: TextStyle(
|
||||
color: _lastTestStatus == _LastTestStatus.error ? Colors.yellow : null,
|
||||
),
|
||||
style: TextStyle(color: _lastTestStatus == _LastTestStatus.error ? Colors.yellow : null),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -208,7 +198,8 @@ class NestedViewEventBodyState extends State<NestedViewEventBody> {
|
||||
setState(() {
|
||||
viewChannel = MethodChannel('simple_view/$id');
|
||||
});
|
||||
driverDataHandler.registerHandler('hierarchy')
|
||||
.complete(() async => (await channel.invokeMethod<String>('getViewHierarchy'))!);
|
||||
driverDataHandler
|
||||
.registerHandler('hierarchy')
|
||||
.complete(() async => (await channel.invokeMethod<String>('getViewHierarchy'))!);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,7 @@ Future<void> main() async {
|
||||
|
||||
group('Nested View Event', () {
|
||||
setUpAll(() async {
|
||||
final SerializableFinder wmListTile =
|
||||
find.byValueKey('NestedViewEventTile');
|
||||
final SerializableFinder wmListTile = find.byValueKey('NestedViewEventTile');
|
||||
await driver.tap(wmListTile);
|
||||
});
|
||||
|
||||
@@ -53,8 +52,9 @@ Future<void> main() async {
|
||||
await driver.tap(addChildView);
|
||||
final SerializableFinder tapChildView = find.byValueKey('TapChildView');
|
||||
await driver.tap(tapChildView);
|
||||
final String nestedViewClickCount =
|
||||
await driver.getText(find.byValueKey('NestedViewClickCount'));
|
||||
final String nestedViewClickCount = await driver.getText(
|
||||
find.byValueKey('NestedViewClickCount'),
|
||||
);
|
||||
expect(nestedViewClickCount, 'Click count: 1');
|
||||
}, timeout: Timeout.none);
|
||||
});
|
||||
@@ -76,8 +76,8 @@ Future<void> main() async {
|
||||
await driver.requestData('hierarchy'),
|
||||
'|-FlutterView\n'
|
||||
' |-FlutterSurfaceView\n' // Flutter UI
|
||||
' |-ViewGroup\n' // Platform View
|
||||
' |-ViewGroup\n'
|
||||
' |-ViewGroup\n' // Platform View
|
||||
' |-ViewGroup\n',
|
||||
);
|
||||
|
||||
// Hide platform view.
|
||||
@@ -88,7 +88,7 @@ Future<void> main() async {
|
||||
expect(
|
||||
await driver.requestData('hierarchy'),
|
||||
'|-FlutterView\n'
|
||||
' |-FlutterSurfaceView\n' // Just the Flutter UI
|
||||
' |-FlutterSurfaceView\n', // Just the Flutter UI
|
||||
);
|
||||
|
||||
// Show platform view again.
|
||||
@@ -100,7 +100,7 @@ Future<void> main() async {
|
||||
'|-FlutterView\n'
|
||||
' |-FlutterSurfaceView\n' // Flutter UI
|
||||
' |-ViewGroup\n' // Platform View
|
||||
' |-ViewGroup\n'
|
||||
' |-ViewGroup\n',
|
||||
);
|
||||
}, timeout: Timeout.none);
|
||||
});
|
||||
@@ -124,11 +124,11 @@ Future<void> main() async {
|
||||
expect(
|
||||
await driver.requestData('hierarchy'),
|
||||
'|-FlutterView\n'
|
||||
' |-FlutterSurfaceView\n' // Flutter UI (hidden)
|
||||
' |-FlutterSurfaceView\n' // Flutter UI (hidden)
|
||||
' |-FlutterImageView\n' // Flutter UI (background surface)
|
||||
' |-ViewGroup\n' // Platform View
|
||||
' |-ViewGroup\n' // Platform View
|
||||
' |-ViewGroup\n'
|
||||
' |-FlutterImageView\n' // Flutter UI (overlay surface)
|
||||
' |-FlutterImageView\n', // Flutter UI (overlay surface)
|
||||
);
|
||||
|
||||
// Hide platform view.
|
||||
@@ -139,7 +139,7 @@ Future<void> main() async {
|
||||
expect(
|
||||
await driver.requestData('hierarchy'),
|
||||
'|-FlutterView\n'
|
||||
' |-FlutterSurfaceView\n' // Just the Flutter UI
|
||||
' |-FlutterSurfaceView\n', // Just the Flutter UI
|
||||
);
|
||||
|
||||
// Show platform view again.
|
||||
@@ -153,7 +153,7 @@ Future<void> main() async {
|
||||
' |-FlutterImageView\n' // Flutter UI (background surface)
|
||||
' |-ViewGroup\n' // Platform View
|
||||
' |-ViewGroup\n'
|
||||
' |-FlutterImageView\n' // Flutter UI (overlay surface)
|
||||
' |-FlutterImageView\n', // Flutter UI (overlay surface)
|
||||
);
|
||||
}, timeout: Timeout.none);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user