mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

Closes https://github.com/flutter/flutter/issues/152325. This PR is large due to generate `flutter create --platforms android`. A quick summary: - Moves the integration test from `packages/flutter_driver/test` to `dev/integration_tests` - Created a sample Flutter app that draws a blue rectangle - Forked a subset of `package:flutter_goldens` that will work on the standalone Dart VM - Forked a subset of `goldens.dart` (from `flutter_test`) to `src/native/goldens.dart` (i.e. `matchesGoldenFile`) This ... works locally, but as usual I have no idea if it will work on Skia Gold so let's roll some dice.
30 lines
784 B
Dart
30 lines
784 B
Dart
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'dart:io' as io;
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_driver/driver_extension.dart';
|
|
|
|
void main() {
|
|
enableFlutterDriverExtension();
|
|
|
|
if (kIsWeb || !io.Platform.isAndroid) {
|
|
throw UnsupportedError('This app should only run on Android devices.');
|
|
}
|
|
|
|
runApp(const MainApp());
|
|
}
|
|
|
|
final class MainApp extends StatelessWidget {
|
|
const MainApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// Draw a full-screen blue rectangle.
|
|
return const DecoratedBox(decoration: BoxDecoration(color: Colors.blue));
|
|
}
|
|
}
|