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
@@ -13,21 +13,16 @@ import 'src/allow_list_devices.dart';
|
||||
|
||||
const MethodChannel _channel = MethodChannel('smiley_face_texture');
|
||||
Future<int> _fetchTexture(int width, int height) async {
|
||||
final int? result = await _channel.invokeMethod<int>(
|
||||
'initTexture',
|
||||
<String, int>{
|
||||
'width': width,
|
||||
'height': height,
|
||||
},
|
||||
);
|
||||
final int? result = await _channel.invokeMethod<int>('initTexture', <String, int>{
|
||||
'width': width,
|
||||
'height': height,
|
||||
});
|
||||
return result!;
|
||||
}
|
||||
|
||||
void main() async {
|
||||
ensureAndroidOrIosDevice();
|
||||
enableFlutterDriverExtension(commands: <CommandExtension>[
|
||||
nativeDriverCommands,
|
||||
]);
|
||||
enableFlutterDriverExtension(commands: <CommandExtension>[nativeDriverCommands]);
|
||||
|
||||
// Run on full screen.
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||
|
||||
@@ -11,9 +11,7 @@ import 'src/allow_list_devices.dart';
|
||||
|
||||
void main() {
|
||||
ensureAndroidOrIosDevice();
|
||||
enableFlutterDriverExtension(commands: <CommandExtension>[
|
||||
nativeDriverCommands,
|
||||
]);
|
||||
enableFlutterDriverExtension(commands: <CommandExtension>[nativeDriverCommands]);
|
||||
|
||||
// Run on full screen.
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||
|
||||
@@ -11,9 +11,7 @@ import 'src/allow_list_devices.dart';
|
||||
|
||||
void main() async {
|
||||
ensureAndroidOrIosDevice();
|
||||
enableFlutterDriverExtension(commands: <CommandExtension>[
|
||||
nativeDriverCommands,
|
||||
]);
|
||||
enableFlutterDriverExtension(commands: <CommandExtension>[nativeDriverCommands]);
|
||||
|
||||
// Run on full screen.
|
||||
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||
|
||||
@@ -11,9 +11,7 @@ import 'src/allow_list_devices.dart';
|
||||
|
||||
void main() async {
|
||||
ensureAndroidOrIosDevice();
|
||||
enableFlutterDriverExtension(commands: <CommandExtension>[
|
||||
nativeDriverCommands,
|
||||
]);
|
||||
enableFlutterDriverExtension(commands: <CommandExtension>[nativeDriverCommands]);
|
||||
|
||||
// Run on full screen.
|
||||
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||
|
||||
@@ -35,9 +35,7 @@ void main() async {
|
||||
await flutterDriver.waitFor(find.byType('AndroidView'));
|
||||
await expectLater(
|
||||
nativeDriver.screenshot(),
|
||||
matchesGoldenFile(
|
||||
'platform_view_blue_orange_gradient_portrait.android.png',
|
||||
),
|
||||
matchesGoldenFile('platform_view_blue_orange_gradient_portrait.android.png'),
|
||||
);
|
||||
}, timeout: Timeout.none);
|
||||
|
||||
@@ -46,17 +44,13 @@ void main() async {
|
||||
await nativeDriver.rotateToLandscape();
|
||||
await expectLater(
|
||||
nativeDriver.screenshot(),
|
||||
matchesGoldenFile(
|
||||
'platform_view_blue_orange_gradient_landscape.android.png',
|
||||
),
|
||||
matchesGoldenFile('platform_view_blue_orange_gradient_landscape.android.png'),
|
||||
);
|
||||
|
||||
await nativeDriver.rotateResetDefault();
|
||||
await expectLater(
|
||||
nativeDriver.screenshot(),
|
||||
matchesGoldenFile(
|
||||
'platform_view_blue_orange_gradient_portrait_post_rotation.android.png',
|
||||
),
|
||||
matchesGoldenFile('platform_view_blue_orange_gradient_portrait_post_rotation.android.png'),
|
||||
);
|
||||
}, timeout: Timeout.none);
|
||||
}
|
||||
|
||||
@@ -34,17 +34,13 @@ void main() async {
|
||||
await flutterDriver.waitFor(find.byType('AndroidView'));
|
||||
await expectLater(
|
||||
nativeDriver.screenshot(),
|
||||
matchesGoldenFile(
|
||||
'platform_view_tap_color_change_initial.android.png',
|
||||
),
|
||||
matchesGoldenFile('platform_view_tap_color_change_initial.android.png'),
|
||||
);
|
||||
|
||||
await nativeDriver.tap(const ByNativeAccessibilityLabel('Change color'));
|
||||
await expectLater(
|
||||
nativeDriver.screenshot(),
|
||||
matchesGoldenFile(
|
||||
'platform_view_tap_color_change_tapped.android.png',
|
||||
),
|
||||
matchesGoldenFile('platform_view_tap_color_change_tapped.android.png'),
|
||||
);
|
||||
}, timeout: Timeout.none);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user