mirror of
https://github.com/flutter/flutter
synced 2024-08-27 03:50:33 +00:00
Add smoke tests for all the examples, fix 17 broken examples. (#89021)
This adds a smoke test for every single API example. It also fixes 17 tests that had bugs in them, or were otherwise broken, and even fixes one actual bug in the framework, and one limitation in the framework. The bug in the framework is that NetworkImage's _loadAsync method had await response.drain<List<int>>();, but if the response is null, it will throw a cryptic exception saying that Null can't be assigned to List<int>. The fix was just to use await response.drain<void>(); instead. The limitation is that RelativePositionedTransition takes an Animation<Rect> rect parameter, and if you want to use a RectTween with it, the value emitted there is Rect?, and one of the examples was just casting from Animation<Rect> to Animation<Rect?>, which is invalid, so I modified RelativePositionedTransition to take a Rect? and just use Rect.zero if the rect is null.
This commit is contained in:
parent
d508a247be
commit
ab2b0851a2
|
@ -57,7 +57,7 @@ dependencies:
|
|||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -69,4 +69,4 @@ flutter:
|
|||
assets:
|
||||
- icon/
|
||||
|
||||
# PUBSPEC CHECKSUM: f8b4
|
||||
# PUBSPEC CHECKSUM: c2b5
|
||||
|
|
|
@ -27,7 +27,7 @@ dependencies:
|
|||
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
sync_http: 0.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webdriver: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
|
@ -85,4 +85,4 @@ flutter:
|
|||
- packages/flutter_gallery_assets/people/square/ali.png
|
||||
- packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
|
||||
|
||||
# PUBSPEC CHECKSUM: cec3
|
||||
# PUBSPEC CHECKSUM: b8c4
|
||||
|
|
|
@ -27,7 +27,7 @@ dependencies:
|
|||
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
sync_http: 0.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webdriver: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
|
@ -211,4 +211,4 @@ flutter:
|
|||
fonts:
|
||||
- asset: packages/flutter_gallery_assets/fonts/GalleryIcons.ttf
|
||||
|
||||
# PUBSPEC CHECKSUM: cec3
|
||||
# PUBSPEC CHECKSUM: b8c4
|
||||
|
|
|
@ -61,7 +61,7 @@ dependencies:
|
|||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -71,4 +71,4 @@ dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: 326c
|
||||
# PUBSPEC CHECKSUM: fb6d
|
||||
|
|
|
@ -16,7 +16,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
@ -26,4 +26,4 @@ flutter:
|
|||
androidPackage: com.example.multiple_flutters_module
|
||||
iosBundleIdentifier: com.example.multipleFluttersModule
|
||||
|
||||
# PUBSPEC CHECKSUM: ab14
|
||||
# PUBSPEC CHECKSUM: ac15
|
||||
|
|
|
@ -58,7 +58,7 @@ dependencies:
|
|||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -75,4 +75,4 @@ dev_dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: 1c5a
|
||||
# PUBSPEC CHECKSUM: e55b
|
||||
|
|
|
@ -27,7 +27,7 @@ dependencies:
|
|||
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
sync_http: 0.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webdriver: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
|
@ -83,4 +83,4 @@ flutter:
|
|||
- packages/flutter_gallery_assets/people/square/ali.png
|
||||
- packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
|
||||
|
||||
# PUBSPEC CHECKSUM: cec3
|
||||
# PUBSPEC CHECKSUM: b8c4
|
||||
|
|
|
@ -27,7 +27,7 @@ dependencies:
|
|||
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
sync_http: 0.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webdriver: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
|
@ -83,4 +83,4 @@ flutter:
|
|||
- packages/flutter_gallery_assets/people/square/ali.png
|
||||
- packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
|
||||
|
||||
# PUBSPEC CHECKSUM: cec3
|
||||
# PUBSPEC CHECKSUM: b8c4
|
||||
|
|
|
@ -25,7 +25,7 @@ dependencies:
|
|||
string_scanner: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
term_glyph: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -78,4 +78,4 @@ dev_dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: e0e0
|
||||
# PUBSPEC CHECKSUM: cae1
|
||||
|
|
|
@ -16,7 +16,7 @@ dependencies:
|
|||
process: 4.2.3
|
||||
test: 1.17.12
|
||||
|
||||
_discoveryapis_commons: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
_discoveryapis_commons: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
_fe_analyzer_shared: 26.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
analyzer: 2.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
archive: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -31,7 +31,7 @@ dependencies:
|
|||
equatable: 2.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
file: 6.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
frontend_server_client: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
gcloud: 0.8.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
gcloud: 0.8.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
glob: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
googleapis: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
googleapis_auth: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -72,4 +72,4 @@ dependencies:
|
|||
dev_dependencies:
|
||||
test_api: 0.4.3
|
||||
|
||||
# PUBSPEC CHECKSUM: 9735
|
||||
# PUBSPEC CHECKSUM: 9337
|
||||
|
|
|
@ -679,6 +679,24 @@ Future<void> _runFrameworkTests() async {
|
|||
}
|
||||
}
|
||||
|
||||
Future<void> runExampleTests() async {
|
||||
// TODO(gspencergoog): Currently Linux LUCI bots can't run desktop Flutter applications, https://github.com/flutter/flutter/issues/90676
|
||||
if (!Platform.isLinux || ciProvider != CiProviders.luci) {
|
||||
await runCommand(
|
||||
flutter,
|
||||
<String>['config', '--enable-${Platform.operatingSystem}-desktop'],
|
||||
workingDirectory: flutterRoot,
|
||||
);
|
||||
await runCommand(
|
||||
dart,
|
||||
<String>[path.join(flutterRoot, 'dev', 'tools', 'examples_smoke_test.dart')],
|
||||
workingDirectory: path.join(flutterRoot, 'examples', 'api'),
|
||||
);
|
||||
}
|
||||
await _runFlutterTest(path.join(flutterRoot, 'examples', 'hello_world'), options: soundNullSafetyOptions);
|
||||
await _runFlutterTest(path.join(flutterRoot, 'examples', 'layers'), options: soundNullSafetyOptions);
|
||||
}
|
||||
|
||||
Future<void> runFixTests() async {
|
||||
final List<String> args = <String>[
|
||||
'fix',
|
||||
|
@ -726,6 +744,7 @@ Future<void> _runFrameworkTests() async {
|
|||
|
||||
Future<void> runMisc() async {
|
||||
print('${green}Running package tests$reset for directories other than packages/flutter');
|
||||
await runExampleTests();
|
||||
await _pubRunTest(path.join(flutterRoot, 'dev', 'bots'));
|
||||
await _pubRunTest(path.join(flutterRoot, 'dev', 'devicelab'), ensurePrecompiledTool: false); // See https://github.com/flutter/flutter/issues/86209
|
||||
await _pubRunTest(path.join(flutterRoot, 'dev', 'conductor', 'core'), forceSingleCore: true);
|
||||
|
@ -734,8 +753,6 @@ Future<void> _runFrameworkTests() async {
|
|||
await _runFlutterTest(path.join(flutterRoot, 'dev', 'manual_tests'));
|
||||
await _runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'vitool'));
|
||||
await _runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'gen_keycodes'));
|
||||
await _runFlutterTest(path.join(flutterRoot, 'examples', 'hello_world'), options: soundNullSafetyOptions);
|
||||
await _runFlutterTest(path.join(flutterRoot, 'examples', 'layers'), options: soundNullSafetyOptions);
|
||||
await _runFlutterTest(path.join(flutterRoot, 'dev', 'benchmarks', 'test_apps', 'stocks'));
|
||||
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_driver'), tests: <String>[path.join('test', 'src', 'real_tests')], options: soundNullSafetyOptions);
|
||||
await _runFlutterTest(path.join(flutterRoot, 'packages', 'integration_test'));
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# for performing pushes to production, and so this image is quite a bit larger
|
||||
# than strictly needed for just building Flutter apps.
|
||||
|
||||
# Last manual update 2021-09-01 (changing this comment will re-build image)
|
||||
# Last manual update 2021-09-24 (changing this comment will re-build image)
|
||||
|
||||
FROM debian:bullseye
|
||||
MAINTAINER Flutter Developers <flutter-dev@googlegroups.com>
|
||||
|
@ -131,7 +131,10 @@ RUN apt-get install -y --no-install-recommends \
|
|||
cmake \
|
||||
libgtk-3-dev \
|
||||
ninja-build \
|
||||
pkg-config && \
|
||||
pkg-config \
|
||||
x11-xserver-utils \
|
||||
xauth \
|
||||
xvfb && \
|
||||
apt-get upgrade -y --no-install-recommends && \
|
||||
apt-get clean
|
||||
|
||||
|
|
|
@ -20,14 +20,14 @@ dependencies:
|
|||
|
||||
logging: 1.0.2
|
||||
|
||||
_discoveryapis_commons: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
_discoveryapis_commons: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
async: 2.8.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
charcode: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
checked_yaml: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
crypto: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
equatable: 2.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
gcloud: 0.8.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
gcloud: 0.8.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
googleapis: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
googleapis_auth: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http_parser: 4.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -73,4 +73,4 @@ dev_dependencies:
|
|||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webkit_inspection_protocol: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: 9735
|
||||
# PUBSPEC CHECKSUM: 9337
|
||||
|
|
|
@ -14,9 +14,9 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: d76e
|
||||
# PUBSPEC CHECKSUM: d86f
|
||||
|
|
|
@ -33,7 +33,7 @@ dependencies:
|
|||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
plugin_platform_interface: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -96,4 +96,4 @@ flutter:
|
|||
# For details regarding fonts from package dependencies,
|
||||
# see https://flutter.dev/custom-fonts/#from-packages
|
||||
|
||||
# PUBSPEC CHECKSUM: bde4
|
||||
# PUBSPEC CHECKSUM: bee5
|
||||
|
|
|
@ -55,7 +55,7 @@ dependencies:
|
|||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -66,4 +66,4 @@ dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: f86f
|
||||
# PUBSPEC CHECKSUM: e270
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
sdk: flutter
|
||||
flutter_driver:
|
||||
sdk: flutter
|
||||
path_provider: 2.0.4
|
||||
path_provider: 2.0.5
|
||||
collection: 1.15.0
|
||||
assets_for_android_views:
|
||||
git:
|
||||
|
@ -37,7 +37,7 @@ dependencies:
|
|||
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
sync_http: 0.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webdriver: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
win32: 2.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -92,4 +92,4 @@ dev_dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: db38
|
||||
# PUBSPEC CHECKSUM: 823a
|
||||
|
|
|
@ -56,7 +56,7 @@ dependencies:
|
|||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -67,4 +67,4 @@ dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: f86f
|
||||
# PUBSPEC CHECKSUM: e270
|
||||
|
|
|
@ -22,7 +22,7 @@ dependencies:
|
|||
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
sync_http: 0.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webdriver: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
|
@ -82,4 +82,4 @@ flutter:
|
|||
assets:
|
||||
- customassets/flutter_logo.png
|
||||
|
||||
# PUBSPEC CHECKSUM: d229
|
||||
# PUBSPEC CHECKSUM: bc2a
|
||||
|
|
|
@ -56,7 +56,7 @@ dependencies:
|
|||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -67,4 +67,4 @@ dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: f86f
|
||||
# PUBSPEC CHECKSUM: e270
|
||||
|
|
|
@ -56,7 +56,7 @@ dependencies:
|
|||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -67,4 +67,4 @@ dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: f86f
|
||||
# PUBSPEC CHECKSUM: e270
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
intl: 0.17.0
|
||||
connectivity: 3.0.6
|
||||
string_scanner: 1.1.0
|
||||
url_launcher: 6.0.10
|
||||
url_launcher: 6.0.11
|
||||
cupertino_icons: 1.0.3
|
||||
video_player: 2.1.1
|
||||
scoped_model:
|
||||
|
@ -50,7 +50,7 @@ dependencies:
|
|||
url_launcher_platform_interface: 2.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
url_launcher_web: 2.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
url_launcher_windows: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
video_player_platform_interface: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
video_player_web: 2.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
|
@ -274,4 +274,4 @@ flutter:
|
|||
- asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf
|
||||
- asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf
|
||||
|
||||
# PUBSPEC CHECKSUM: 8b79
|
||||
# PUBSPEC CHECKSUM: d97b
|
||||
|
|
|
@ -7,13 +7,15 @@ environment:
|
|||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
camera: 0.9.3
|
||||
camera: 0.9.4
|
||||
|
||||
camera_platform_interface: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
camera_platform_interface: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
camera_web: 0.2.1+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
characters: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
cross_file: 0.3.1+5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
flutter_plugin_android_lifecycle: 2.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
js: 0.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
matcher: 0.12.11 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
path: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -23,9 +25,9 @@ dependencies:
|
|||
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
stream_transform: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: 7848
|
||||
# PUBSPEC CHECKSUM: 452a
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
sdk: flutter
|
||||
flutter_driver:
|
||||
sdk: flutter
|
||||
path_provider: 2.0.4
|
||||
path_provider: 2.0.5
|
||||
collection: 1.15.0
|
||||
assets_for_android_views:
|
||||
git:
|
||||
|
@ -37,7 +37,7 @@ dependencies:
|
|||
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
sync_http: 0.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webdriver: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
win32: 2.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -92,4 +92,4 @@ dev_dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: db38
|
||||
# PUBSPEC CHECKSUM: 823a
|
||||
|
|
|
@ -28,7 +28,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -99,4 +99,4 @@ flutter:
|
|||
androidPackage: com.example.iosadd2appflutter
|
||||
iosBundleIdentifier: com.example.iosAdd2appFlutter
|
||||
|
||||
# PUBSPEC CHECKSUM: b7be
|
||||
# PUBSPEC CHECKSUM: b8bf
|
||||
|
|
|
@ -28,7 +28,7 @@ dependencies:
|
|||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
plugin_platform_interface: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -91,4 +91,4 @@ flutter:
|
|||
# For details regarding fonts from package dependencies,
|
||||
# see https://flutter.dev/custom-fonts/#from-packages
|
||||
|
||||
# PUBSPEC CHECKSUM: c841
|
||||
# PUBSPEC CHECKSUM: c942
|
||||
|
|
|
@ -13,7 +13,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -79,4 +79,4 @@ flutter:
|
|||
# the material Icons class.
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: d229
|
||||
# PUBSPEC CHECKSUM: bc2a
|
||||
|
|
|
@ -16,7 +16,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -39,4 +39,4 @@ dev_dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: b7be
|
||||
# PUBSPEC CHECKSUM: b8bf
|
||||
|
|
|
@ -56,7 +56,7 @@ dependencies:
|
|||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -67,4 +67,4 @@ dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: f86f
|
||||
# PUBSPEC CHECKSUM: e270
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -34,4 +34,4 @@ dev_dependencies:
|
|||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: f0a1
|
||||
# PUBSPEC CHECKSUM: 14a2
|
||||
|
|
|
@ -8,7 +8,7 @@ environment:
|
|||
# It can probably be removed, see the comment in that file.
|
||||
|
||||
dependencies:
|
||||
image: 3.0.4
|
||||
image: 3.0.5
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_driver:
|
||||
|
@ -62,7 +62,7 @@ dependencies:
|
|||
term_glyph: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -82,4 +82,4 @@ dev_dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: 6f24
|
||||
# PUBSPEC CHECKSUM: 6526
|
||||
|
|
|
@ -17,6 +17,6 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: d76e
|
||||
# PUBSPEC CHECKSUM: d86f
|
||||
|
|
|
@ -10,6 +10,6 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: d76e
|
||||
# PUBSPEC CHECKSUM: d86f
|
||||
|
|
|
@ -21,7 +21,7 @@ dependencies:
|
|||
js: 0.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_driver:
|
||||
|
@ -86,4 +86,4 @@ dev_dependencies:
|
|||
webkit_inspection_protocol: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 3.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: 1e0b
|
||||
# PUBSPEC CHECKSUM: 080c
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -34,4 +34,4 @@ dev_dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: 9119
|
||||
# PUBSPEC CHECKSUM: 921a
|
||||
|
|
|
@ -16,6 +16,10 @@ FakeHttpClient createMockImageHttpClient(SecurityContext? _) {
|
|||
}
|
||||
|
||||
class FakeHttpClient extends Fake implements HttpClient {
|
||||
FakeHttpClient([this.context]);
|
||||
|
||||
SecurityContext? context;
|
||||
|
||||
@override
|
||||
bool autoUncompress = false;
|
||||
|
||||
|
|
|
@ -17,14 +17,15 @@ class MyApp extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return WidgetsApp(
|
||||
title: 'Flutter Code Sample',
|
||||
home: const Center(
|
||||
child: MyStatefulWidget(restorationId: 'main'),
|
||||
),
|
||||
color: const Color(0xffffffff),
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return const Center(
|
||||
child: MyStatefulWidget(restorationId: 'main'),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
{{code-preamble}}
|
||||
|
||||
/// This is the stateful widget that the main application instantiates.
|
||||
|
|
253
dev/tools/examples_smoke_test.dart
Normal file
253
dev/tools/examples_smoke_test.dart
Normal file
|
@ -0,0 +1,253 @@
|
|||
// 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.
|
||||
|
||||
// This test builds an integration test from the list of samples in the
|
||||
// examples/api/lib directory, and then runs it. The tests are just smoke tests,
|
||||
// designed to start up each example and run it for a couple of frames to make
|
||||
// sure it doesn't throw an exception or fail to compile.
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io' show stdout, stderr, exitCode, Process, ProcessException;
|
||||
|
||||
import 'package:file/file.dart';
|
||||
import 'package:file/local.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:platform/platform.dart';
|
||||
import 'package:process/process.dart';
|
||||
|
||||
const bool kIsWeb = identical(0, 0.0);
|
||||
FileSystem filesystem = const LocalFileSystem();
|
||||
ProcessManager processManager = const LocalProcessManager();
|
||||
Platform platform = const LocalPlatform();
|
||||
|
||||
FutureOr<dynamic> main() async {
|
||||
if (!platform.isLinux && !platform.isWindows && !platform.isMacOS) {
|
||||
stderr.writeln('Example smoke tests are only designed to run on desktop platforms');
|
||||
exitCode = 4;
|
||||
return;
|
||||
}
|
||||
final Directory flutterDir = filesystem.directory(
|
||||
path.absolute(
|
||||
path.dirname(
|
||||
path.dirname(
|
||||
path.dirname(platform.script.toFilePath()),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
final Directory apiDir = flutterDir.childDirectory('examples').childDirectory('api');
|
||||
final File integrationTest = await generateTest(apiDir);
|
||||
try {
|
||||
await runSmokeTests(flutterDir: flutterDir, integrationTest: integrationTest, apiDir: apiDir);
|
||||
} finally {
|
||||
await cleanUp(integrationTest);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> cleanUp(File integrationTest) async {
|
||||
try {
|
||||
await integrationTest.delete();
|
||||
// Delete the integration_test directory if it is empty.
|
||||
await integrationTest.parent.delete(recursive: false);
|
||||
} on FileSystemException {
|
||||
// Ignore, there might be other files in there preventing it from
|
||||
// being removed, or it might not exist.
|
||||
}
|
||||
}
|
||||
|
||||
// Executes the generated smoke test.
|
||||
Future<void> runSmokeTests({
|
||||
required Directory flutterDir,
|
||||
required File integrationTest,
|
||||
required Directory apiDir,
|
||||
}) async {
|
||||
final File flutterExe =
|
||||
flutterDir.childDirectory('bin').childFile(platform.isWindows ? 'flutter.bat' : 'flutter');
|
||||
final List<String> cmd = <String>[
|
||||
// If we're in a container with no X display, then use the virtual framebuffer.
|
||||
if (platform.isLinux &&
|
||||
(platform.environment['DISPLAY'] == null ||
|
||||
platform.environment['DISPLAY']!.isEmpty)) '/usr/bin/xvfb-run',
|
||||
flutterExe.absolute.path,
|
||||
'test',
|
||||
'--reporter=expanded',
|
||||
'--device-id=${platform.operatingSystem}',
|
||||
integrationTest.absolute.path,
|
||||
];
|
||||
await runCommand(cmd, workingDirectory: apiDir);
|
||||
}
|
||||
|
||||
// A class to hold information related to an example, used to generate names
|
||||
// from for the tests.
|
||||
class ExampleInfo {
|
||||
ExampleInfo(this.file, Directory examplesLibDir)
|
||||
: importPath = _getImportPath(file, examplesLibDir),
|
||||
importName = '' {
|
||||
importName = importPath.replaceAll(RegExp(r'\.dart$'), '').replaceAll(RegExp(r'\W'), '_');
|
||||
}
|
||||
|
||||
final File file;
|
||||
final String importPath;
|
||||
String importName;
|
||||
|
||||
static String _getImportPath(File example, Directory examplesLibDir) {
|
||||
final String relativePath =
|
||||
path.relative(example.absolute.path, from: examplesLibDir.absolute.path);
|
||||
// So that Windows paths are proper URIs in the import statements.
|
||||
return path.toUri(relativePath).toFilePath(windows: false);
|
||||
}
|
||||
}
|
||||
|
||||
// Generates the combined smoke test.
|
||||
Future<File> generateTest(Directory apiDir) async {
|
||||
final Directory examplesLibDir = apiDir.childDirectory('lib');
|
||||
|
||||
// Get files from git, to avoid any non-repo files that might be in someone's
|
||||
// workspace.
|
||||
final List<String> gitFiles = (await runCommand(
|
||||
<String>['git', 'ls-files', '**/*.dart'],
|
||||
workingDirectory: examplesLibDir,
|
||||
quiet: true,
|
||||
)).replaceAll(r'\', '/')
|
||||
.trim()
|
||||
.split('\n');
|
||||
final Iterable<File> examples = gitFiles.map<File>((String examplePath) {
|
||||
return filesystem.file(path.join(examplesLibDir.absolute.path, examplePath));
|
||||
});
|
||||
|
||||
// Collect the examples, and import them all as separate symbols.
|
||||
final List<String> imports = <String>[];
|
||||
imports.add('''import 'package:flutter/widgets.dart';''');
|
||||
imports.add('''import 'package:flutter_test/flutter_test.dart';''');
|
||||
imports.add('''import 'package:integration_test/integration_test.dart';''');
|
||||
final List<ExampleInfo> infoList = <ExampleInfo>[];
|
||||
for (final File example in examples) {
|
||||
final ExampleInfo info = ExampleInfo(example, examplesLibDir);
|
||||
infoList.add(info);
|
||||
imports.add('''import 'package:flutter_api_samples/${info.importPath}' as ${info.importName};''');
|
||||
}
|
||||
imports.sort();
|
||||
infoList.sort((ExampleInfo a, ExampleInfo b) => a.importPath.compareTo(b.importPath));
|
||||
|
||||
final StringBuffer buffer = StringBuffer();
|
||||
buffer.writeln('// Temporary generated file. Do not commit.');
|
||||
buffer.writeln("import 'dart:io';");
|
||||
buffer.writeAll(imports, '\n');
|
||||
buffer.writeln(r'''
|
||||
|
||||
|
||||
import '../../../dev/manual_tests/test/mock_image_http.dart';
|
||||
|
||||
void main() {
|
||||
IntegrationTestWidgetsFlutterBinding? binding;
|
||||
try {
|
||||
binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized() as IntegrationTestWidgetsFlutterBinding;
|
||||
} catch (e) {
|
||||
stderr.writeln('Unable to initialize binding${binding == null ? '' : ' $binding'}: $e');
|
||||
exitCode = 128;
|
||||
return;
|
||||
}
|
||||
|
||||
''');
|
||||
for (final ExampleInfo info in infoList) {
|
||||
buffer.writeln('''
|
||||
testWidgets(
|
||||
'Smoke test ${info.importPath}',
|
||||
(WidgetTester tester) async {
|
||||
final ErrorWidgetBuilder originalBuilder = ErrorWidget.builder;
|
||||
try {
|
||||
HttpOverrides.runZoned(() {
|
||||
${info.importName}.main();
|
||||
}, createHttpClient: (SecurityContext? context) => FakeHttpClient(context));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(find.byType(WidgetsApp), findsOneWidget);
|
||||
} finally {
|
||||
ErrorWidget.builder = originalBuilder;
|
||||
}
|
||||
},
|
||||
);
|
||||
''');
|
||||
}
|
||||
buffer.writeln('}');
|
||||
|
||||
final File integrationTest =
|
||||
apiDir.childDirectory('integration_test').childFile('smoke_integration_test.dart');
|
||||
integrationTest.createSync(recursive: true);
|
||||
integrationTest.writeAsStringSync(buffer.toString());
|
||||
return integrationTest;
|
||||
}
|
||||
|
||||
// Run a command, and optionally stream the output as it runs, returning the
|
||||
// stdout.
|
||||
Future<String> runCommand(
|
||||
List<String> cmd, {
|
||||
required Directory workingDirectory,
|
||||
bool quiet = false,
|
||||
List<String>? output,
|
||||
Map<String, String>? environment,
|
||||
}) async {
|
||||
final List<int> stdoutOutput = <int>[];
|
||||
final List<int> combinedOutput = <int>[];
|
||||
final Completer<void> stdoutComplete = Completer<void>();
|
||||
final Completer<void> stderrComplete = Completer<void>();
|
||||
|
||||
late Process process;
|
||||
Future<int> allComplete() async {
|
||||
await stderrComplete.future;
|
||||
await stdoutComplete.future;
|
||||
return process.exitCode;
|
||||
}
|
||||
|
||||
try {
|
||||
process = await processManager.start(
|
||||
cmd,
|
||||
workingDirectory: workingDirectory.absolute.path,
|
||||
includeParentEnvironment: true,
|
||||
environment: environment,
|
||||
);
|
||||
process.stdout.listen(
|
||||
(List<int> event) {
|
||||
stdoutOutput.addAll(event);
|
||||
combinedOutput.addAll(event);
|
||||
if (!quiet) {
|
||||
stdout.add(event);
|
||||
}
|
||||
},
|
||||
onDone: () async => stdoutComplete.complete(),
|
||||
);
|
||||
process.stderr.listen(
|
||||
(List<int> event) {
|
||||
combinedOutput.addAll(event);
|
||||
if (!quiet) {
|
||||
stderr.add(event);
|
||||
}
|
||||
},
|
||||
onDone: () async => stderrComplete.complete(),
|
||||
);
|
||||
} on ProcessException catch (e) {
|
||||
stderr.writeln('Running "${cmd.join(' ')}" in ${workingDirectory.path} '
|
||||
'failed with:\n${e.toString()}');
|
||||
exitCode = 2;
|
||||
return utf8.decode(stdoutOutput);
|
||||
} on ArgumentError catch (e) {
|
||||
stderr.writeln('Running "${cmd.join(' ')}" in ${workingDirectory.path} '
|
||||
'failed with:\n${e.toString()}');
|
||||
exitCode = 3;
|
||||
return utf8.decode(stdoutOutput);
|
||||
}
|
||||
|
||||
final int processExitCode = await allComplete();
|
||||
if (processExitCode != 0) {
|
||||
stderr.writeln('Running "${cmd.join(' ')}" in ${workingDirectory.path} exited with code $processExitCode');
|
||||
exitCode = processExitCode;
|
||||
}
|
||||
|
||||
if (output != null) {
|
||||
output.addAll(utf8.decode(combinedOutput).split('\n'));
|
||||
}
|
||||
|
||||
return utf8.decode(stdoutOutput);
|
||||
}
|
|
@ -8,7 +8,7 @@ environment:
|
|||
|
||||
dependencies:
|
||||
args: 2.3.0
|
||||
vector_math: 2.1.0
|
||||
vector_math: 2.1.1
|
||||
xml: 5.3.0
|
||||
|
||||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
@ -33,4 +33,4 @@ dev_dependencies:
|
|||
term_glyph: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: 03de
|
||||
# PUBSPEC CHECKSUM: 18df
|
||||
|
|
|
@ -14,7 +14,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -34,4 +34,4 @@ dev_dependencies:
|
|||
term_glyph: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: f0a1
|
||||
# PUBSPEC CHECKSUM: 14a2
|
||||
|
|
|
@ -47,7 +47,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "dev.flutter.dartpad_curve2_d_0"
|
||||
applicationId "dev.flutter.flutter_api_samples"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
|
|
|
@ -3,7 +3,7 @@ Use of this source code is governed by a BSD-style license that can be
|
|||
found in the LICENSE file. -->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="dev.flutter.dartpad_curve2_d_0">
|
||||
package="dev.flutter.flutter_api_samples">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
|
|
@ -3,9 +3,9 @@ Use of this source code is governed by a BSD-style license that can be
|
|||
found in the LICENSE file. -->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="dev.flutter.dartpad_curve2_d_0">
|
||||
package="dev.flutter.flutter_api_samples">
|
||||
<application
|
||||
android:label="dartpad_curve2_d_0"
|
||||
android:label="flutter_api_samples"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package dev.flutter.dartpad_curve2_d_0
|
||||
package dev.flutter.flutter_api_samples
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
|
@ -3,7 +3,7 @@ Use of this source code is governed by a BSD-style license that can be
|
|||
found in the LICENSE file. -->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="dev.flutter.dartpad_curve2_d_0">
|
||||
package="dev.flutter.flutter_api_samples">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>dartpad_curve2_d_0</string>
|
||||
<string>flutter_api_samples</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
|
|
|
@ -98,9 +98,9 @@ class _FollowCurve2DState extends State<FollowCurve2D>
|
|||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
// Always have to dispose of animation controllers when done.
|
||||
controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -64,32 +64,39 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CupertinoApp(
|
||||
home: CupertinoPageScaffold(
|
||||
child: CustomScrollView(
|
||||
physics:
|
||||
const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
|
||||
slivers: <Widget>[
|
||||
const CupertinoSliverNavigationBar(largeTitle: Text('Scroll down')),
|
||||
CupertinoSliverRefreshControl(
|
||||
refreshTriggerPullDistance: 100.0,
|
||||
refreshIndicatorExtent: 60.0,
|
||||
onRefresh: () async {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 1000));
|
||||
setState(() {
|
||||
items.insert(
|
||||
0, Container(color: colors[items.length % 3], height: 100.0));
|
||||
});
|
||||
},
|
||||
return CupertinoPageScaffold(
|
||||
child: CustomScrollView(
|
||||
physics: const BouncingScrollPhysics(
|
||||
parent: AlwaysScrollableScrollPhysics(),
|
||||
),
|
||||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(BuildContext context, int index) => items[index],
|
||||
childCount: items.length,
|
||||
slivers: <Widget>[
|
||||
const CupertinoSliverNavigationBar(
|
||||
largeTitle: Text('Scroll down'),
|
||||
),
|
||||
),
|
||||
],
|
||||
)));
|
||||
CupertinoSliverRefreshControl(
|
||||
refreshTriggerPullDistance: 100.0,
|
||||
refreshIndicatorExtent: 60.0,
|
||||
onRefresh: () async {
|
||||
await Future<void>.delayed(
|
||||
const Duration(milliseconds: 1000),
|
||||
);
|
||||
setState(() {
|
||||
items.insert(
|
||||
0,
|
||||
Container(color: colors[items.length % 3], height: 100.0),
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(BuildContext context, int index) => items[index],
|
||||
childCount: items.length,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/stateful_widget_material.tmpl
|
||||
// Template: dev/snippets/config/templates/stateful_widget_scaffold_center.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
|
@ -30,9 +30,14 @@ class MyApp extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: MyStatefulWidget(),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const Center(
|
||||
child: MyStatefulWidget(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/stateless_widget_material.tmpl
|
||||
// Template: dev/snippets/config/templates/freeform.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
|
@ -12,12 +12,12 @@
|
|||
//***************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ description ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
// This example shows how to use this animation to create a
|
||||
// [FloatingActionButton] that animates itself between the normal and
|
||||
// extended states of the [NavigationRail].
|
||||
// This example shows how to use this animation to create a [FloatingActionButton]
|
||||
// that animates itself between the normal and extended states of the
|
||||
// [NavigationRail].
|
||||
//
|
||||
// An instance of `ExtendableFab` would be created for
|
||||
// [NavigationRail.leading].
|
||||
// An instance of `MyNavigationRailFab` is created for [NavigationRail.leading].
|
||||
// Pressing the FAB button toggles the "extended" state of the [NavigationRail].
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ description ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//***************************************************************************
|
||||
|
@ -32,34 +32,107 @@ import 'dart:ui';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
//********************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code-main ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
/// This is the main application widget.
|
||||
//* ▲▲▲▲▲▲▲▲ code-main ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//********************************************************************************
|
||||
|
||||
//********************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code-preamble ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
static const String _title = 'NavigationRail.extendedAnimation Sample';
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: MyStatelessWidget(),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const MyNavigationRail(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// This is the stateless widget that the main application instantiates.
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
class MyNavigationRail extends StatefulWidget {
|
||||
const MyNavigationRail({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MyNavigationRail> createState() => _MyNavigationRailState();
|
||||
}
|
||||
|
||||
class _MyNavigationRailState extends State<MyNavigationRail> {
|
||||
int _selectedIndex = 0;
|
||||
bool _extended = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: <Widget>[
|
||||
NavigationRail(
|
||||
selectedIndex: _selectedIndex,
|
||||
extended: _extended,
|
||||
leading: MyNavigationRailFab(onPressed: () {
|
||||
setState(() {
|
||||
_extended = !_extended;
|
||||
});
|
||||
}),
|
||||
onDestinationSelected: (int index) {
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
});
|
||||
},
|
||||
labelType: NavigationRailLabelType.none,
|
||||
destinations: const <NavigationRailDestination>[
|
||||
NavigationRailDestination(
|
||||
icon: Icon(Icons.favorite_border),
|
||||
selectedIcon: Icon(Icons.favorite),
|
||||
label: Text('First'),
|
||||
),
|
||||
NavigationRailDestination(
|
||||
icon: Icon(Icons.bookmark_border),
|
||||
selectedIcon: Icon(Icons.book),
|
||||
label: Text('Second'),
|
||||
),
|
||||
NavigationRailDestination(
|
||||
icon: Icon(Icons.star_border),
|
||||
selectedIcon: Icon(Icons.star),
|
||||
label: Text('Third'),
|
||||
),
|
||||
],
|
||||
),
|
||||
const VerticalDivider(thickness: 1, width: 1),
|
||||
// This is the main content.
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Text('selectedIndex: $_selectedIndex'),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code-preamble ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//********************************************************************************
|
||||
|
||||
//********************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
class MyNavigationRailFab extends StatelessWidget {
|
||||
const MyNavigationRailFab({Key? key, this.onPressed}) : super(key: key);
|
||||
|
||||
final VoidCallback? onPressed;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Animation<double> animation =
|
||||
NavigationRail.extendedAnimation(context);
|
||||
final Animation<double> animation = NavigationRail.extendedAnimation(context);
|
||||
return AnimatedBuilder(
|
||||
animation: animation,
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
|
@ -72,7 +145,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
child: animation.value == 0
|
||||
? FloatingActionButton(
|
||||
child: const Icon(Icons.add),
|
||||
onPressed: () {},
|
||||
onPressed: onPressed,
|
||||
)
|
||||
: Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
|
@ -82,7 +155,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
child: FloatingActionButton.extended(
|
||||
icon: const Icon(Icons.add),
|
||||
label: const Text('CREATE'),
|
||||
onPressed: () {},
|
||||
onPressed: onPressed,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -90,8 +163,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//********************************************************************
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/stateful_widget_material.tmpl
|
||||
// Template: dev/snippets/config/templates/stateful_widget_scaffold_center.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
|
@ -29,9 +29,14 @@ class MyApp extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: MyStatefulWidget(),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const Center(
|
||||
child: MyStatefulWidget(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
//****************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code-imports ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
|
@ -33,15 +34,29 @@ import 'package:flutter/widgets.dart';
|
|||
|
||||
void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
print(measureWidget(const SizedBox(width: 640, height: 480)));
|
||||
final Size size = measureWidget(const SizedBox(width: 640, height: 480));
|
||||
|
||||
// Just displays the size calculated above.
|
||||
runApp(
|
||||
WidgetsApp(
|
||||
title: 'BuildOwner Sample',
|
||||
color: const Color(0xff000000),
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Text(size.toString()),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Size measureWidget(Widget widget) {
|
||||
final PipelineOwner pipelineOwner = PipelineOwner();
|
||||
final MeasurementView rootView = pipelineOwner.rootNode = MeasurementView();
|
||||
final BuildOwner buildOwner = BuildOwner(focusManager: FocusManager());
|
||||
final RenderObjectToWidgetElement<RenderBox> element =
|
||||
RenderObjectToWidgetAdapter<RenderBox>(
|
||||
final RenderObjectToWidgetElement<RenderBox> element = RenderObjectToWidgetAdapter<RenderBox>(
|
||||
container: rootView,
|
||||
debugShortDescription: '[root]',
|
||||
child: widget,
|
||||
|
@ -57,8 +72,7 @@ Size measureWidget(Widget widget) {
|
|||
}
|
||||
}
|
||||
|
||||
class MeasurementView extends RenderBox
|
||||
with RenderObjectWithChildMixin<RenderBox> {
|
||||
class MeasurementView extends RenderBox with RenderObjectWithChildMixin<RenderBox> {
|
||||
@override
|
||||
void performLayout() {
|
||||
assert(child != null);
|
||||
|
|
|
@ -12,45 +12,94 @@
|
|||
//***************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ description ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
// This example shows how to override the standard error widget builder in release
|
||||
// mode, but use the standard one in debug mode.
|
||||
//
|
||||
// The error occurs when you click the "Error Prone" button.
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ description ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//***************************************************************************
|
||||
|
||||
//********************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
//*************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code-imports ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code-imports ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//*************************************************************************
|
||||
|
||||
//********************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
void main() {
|
||||
// Set the ErrorWidget's builder before the app is started.
|
||||
ErrorWidget.builder = (FlutterErrorDetails details) {
|
||||
// This is how to tell if you're in debug mode: Assertions are only executed in
|
||||
// debug mode.
|
||||
bool inDebug = false;
|
||||
assert(() {
|
||||
inDebug = true;
|
||||
return true;
|
||||
}());
|
||||
// In debug mode, use the normal error widget which shows
|
||||
// the error message:
|
||||
// If we're in debug mode, use the normal error widget which shows the error
|
||||
// message:
|
||||
if (inDebug) {
|
||||
return ErrorWidget(details.exception);
|
||||
}
|
||||
// In release builds, show a yellow-on-blue message instead:
|
||||
return Container(
|
||||
alignment: Alignment.center,
|
||||
child: const Text(
|
||||
'Error!',
|
||||
style: TextStyle(color: Colors.yellow),
|
||||
child: Text(
|
||||
'Error!\n${details.exception}',
|
||||
style: const TextStyle(color: Colors.yellow),
|
||||
textAlign: TextAlign.center,
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
);
|
||||
};
|
||||
// Here we would normally runApp() the root widget, but to demonstrate
|
||||
// the error handling we artificially fail:
|
||||
return runApp(Builder(
|
||||
builder: (BuildContext context) {
|
||||
throw 'oh no, an error';
|
||||
},
|
||||
));
|
||||
|
||||
// Start the app.
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
static const String _title = 'ErrorWidget Sample';
|
||||
|
||||
@override
|
||||
State<MyApp> createState() => _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
bool throwError = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (throwError) {
|
||||
// Since the error widget is only used during a build, in this contrived example,
|
||||
// we purposely throw an exception in a build function.
|
||||
return Builder(
|
||||
builder: (BuildContext context) {
|
||||
throw Exception('oh no, an error');
|
||||
},
|
||||
);
|
||||
} else {
|
||||
return MaterialApp(
|
||||
title: MyApp._title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(MyApp._title)),
|
||||
body: Center(
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
setState(() { throwError = true; });
|
||||
},
|
||||
child: const Text('Error Prone')),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/stateless_widget_material.tmpl
|
||||
// Template: dev/snippets/config/templates/stateless_widget_scaffold_center.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
|
@ -38,9 +38,14 @@ class MyApp extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: MyStatelessWidget(),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const Center(
|
||||
child: MyStatelessWidget(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/stateless_widget_material.tmpl
|
||||
// Template: dev/snippets/config/templates/stateless_widget_scaffold_center.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
|
@ -32,7 +32,11 @@ class MyApp extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
title: _title,
|
||||
home: MyStatelessWidget(),
|
||||
home: Scaffold(
|
||||
body: Center(
|
||||
child: MyStatelessWidget(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Image.network(
|
||||
'https://example.com/image.jpg',
|
||||
'https://flutter.github.io/assets-for-api-docs/assets/widgets/falcon.jpg',
|
||||
loadingBuilder: (BuildContext context, Widget child,
|
||||
ImageChunkEvent? loadingProgress) {
|
||||
if (loadingProgress == null) {
|
||||
|
|
|
@ -46,7 +46,7 @@ class IVBuilderExampleApp extends StatelessWidget {
|
|||
|
||||
class _IVBuilderExample extends StatefulWidget {
|
||||
@override
|
||||
_IVBuilderExampleState createState() => _IVBuilderExampleState();
|
||||
State<_IVBuilderExample> createState() => _IVBuilderExampleState();
|
||||
}
|
||||
|
||||
class _IVBuilderExampleState extends State<_IVBuilderExample> {
|
||||
|
@ -58,7 +58,7 @@ class _IVBuilderExampleState extends State<_IVBuilderExample> {
|
|||
|
||||
// Returns true iff the given cell is currently visible. Caches viewport
|
||||
// calculations.
|
||||
late Quad _cachedViewport;
|
||||
Quad? _cachedViewport;
|
||||
late int _firstVisibleRow;
|
||||
late int _firstVisibleColumn;
|
||||
late int _lastVisibleRow;
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
// 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.
|
||||
|
||||
// Template: dev/snippets/config/templates/freeform.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
|
||||
// Flutter code sample for TransitionDelegate
|
||||
//
|
||||
//***************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ description ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
// The following example demonstrates how to implement a subclass that always
|
||||
// removes or adds routes without animated transitions and puts the removed
|
||||
// routes at the top of the list.
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ description ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//***************************************************************************
|
||||
|
||||
//****************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code-imports ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code-imports ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//****************************************************************************
|
||||
|
||||
//********************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
class NoAnimationTransitionDelegate extends TransitionDelegate<void> {
|
||||
@override
|
||||
Iterable<RouteTransitionRecord> resolve({
|
||||
required List<RouteTransitionRecord> newPageRouteHistory,
|
||||
required Map<RouteTransitionRecord?, RouteTransitionRecord>
|
||||
locationToExitingPageRoute,
|
||||
required Map<RouteTransitionRecord?, List<RouteTransitionRecord>>
|
||||
pageRouteToPagelessRoutes,
|
||||
}) {
|
||||
final List<RouteTransitionRecord> results = <RouteTransitionRecord>[];
|
||||
|
||||
for (final RouteTransitionRecord pageRoute in newPageRouteHistory) {
|
||||
if (pageRoute.isWaitingForEnteringDecision) {
|
||||
pageRoute.markForAdd();
|
||||
}
|
||||
results.add(pageRoute);
|
||||
}
|
||||
for (final RouteTransitionRecord exitingPageRoute
|
||||
in locationToExitingPageRoute.values) {
|
||||
if (exitingPageRoute.isWaitingForExitingDecision) {
|
||||
exitingPageRoute.markForRemove();
|
||||
final List<RouteTransitionRecord>? pagelessRoutes =
|
||||
pageRouteToPagelessRoutes[exitingPageRoute];
|
||||
if (pagelessRoutes != null) {
|
||||
for (final RouteTransitionRecord pagelessRoute in pagelessRoutes) {
|
||||
pagelessRoute.markForRemove();
|
||||
}
|
||||
}
|
||||
}
|
||||
results.add(exitingPageRoute);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
}
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//********************************************************************
|
|
@ -29,10 +29,12 @@ class MyApp extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return WidgetsApp(
|
||||
title: 'Flutter Code Sample',
|
||||
home: const Center(
|
||||
child: MyStatefulWidget(restorationId: 'main'),
|
||||
),
|
||||
color: const Color(0xffffffff),
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return const Center(
|
||||
child: MyStatefulWidget(restorationId: 'main'),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
|||
).animate(CurvedAnimation(
|
||||
parent: _controller,
|
||||
curve: Curves.elasticInOut,
|
||||
)) as Animation<Rect>,
|
||||
)),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(8), child: FlutterLogo()),
|
||||
),
|
||||
|
|
|
@ -63,8 +63,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
|||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -64,8 +64,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
|||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -70,8 +70,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
|||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -78,6 +78,12 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
|||
controller.forward();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomScrollView(slivers: <Widget>[
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
set(BINARY_NAME "dartpad_curve2_d_0")
|
||||
set(APPLICATION_ID "dev.flutter.dartpad_curve2_d_0")
|
||||
set(BINARY_NAME "flutter_api_samples")
|
||||
set(APPLICATION_ID "dev.flutter.flutter_api_samples")
|
||||
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
// 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.
|
||||
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
|
|
@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) {
|
|||
if (use_header_bar) {
|
||||
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
||||
gtk_widget_show(GTK_WIDGET(header_bar));
|
||||
gtk_header_bar_set_title(header_bar, "dartpad_curve2_d_0");
|
||||
gtk_header_bar_set_title(header_bar, "flutter_api_samples");
|
||||
gtk_header_bar_set_show_close_button(header_bar, TRUE);
|
||||
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
|
||||
} else {
|
||||
gtk_window_set_title(window, "dartpad_curve2_d_0");
|
||||
gtk_window_set_title(window, "flutter_api_samples");
|
||||
}
|
||||
|
||||
gtk_window_set_default_size(window, 1280, 720);
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||
950C239DEA05231F26974A10 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 639541EE500E1E798CB69526 /* Pods_Runner.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
@ -52,9 +53,11 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
277104DEA919A7BC0A865477 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
29AD1BE7CDBB31470316D7C5 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||
33CC10ED2044A3C60003C045 /* dartpad_curve2_d_0.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "dartpad_curve2_d_0.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33CC10ED2044A3C60003C045 /* flutter_api_samples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = flutter_api_samples.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
|
@ -66,8 +69,10 @@
|
|||
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
||||
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
||||
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
||||
639541EE500E1E798CB69526 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
||||
E2F543B6F3F601B2108EAB46 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -75,12 +80,24 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
950C239DEA05231F26974A10 /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
02C0718F439899652B288987 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29AD1BE7CDBB31470316D7C5 /* Pods-Runner.debug.xcconfig */,
|
||||
277104DEA919A7BC0A865477 /* Pods-Runner.release.xcconfig */,
|
||||
E2F543B6F3F601B2108EAB46 /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
33BA886A226E78AF003329D5 /* Configs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -99,13 +116,14 @@
|
|||
33CEB47122A05771004F2AC0 /* Flutter */,
|
||||
33CC10EE2044A3C60003C045 /* Products */,
|
||||
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
||||
02C0718F439899652B288987 /* Pods */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
33CC10EE2044A3C60003C045 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
33CC10ED2044A3C60003C045 /* dartpad_curve2_d_0.app */,
|
||||
33CC10ED2044A3C60003C045 /* flutter_api_samples.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -148,6 +166,7 @@
|
|||
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
639541EE500E1E798CB69526 /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
|
@ -159,6 +178,7 @@
|
|||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
6365747C9AFB9FD3319FF0D0 /* [CP] Check Pods Manifest.lock */,
|
||||
33CC10E92044A3C60003C045 /* Sources */,
|
||||
33CC10EA2044A3C60003C045 /* Frameworks */,
|
||||
33CC10EB2044A3C60003C045 /* Resources */,
|
||||
|
@ -172,7 +192,7 @@
|
|||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 33CC10ED2044A3C60003C045 /* dartpad_curve2_d_0.app */;
|
||||
productReference = 33CC10ED2044A3C60003C045 /* flutter_api_samples.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
@ -270,6 +290,28 @@
|
|||
shellPath = /bin/sh;
|
||||
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
||||
};
|
||||
6365747C9AFB9FD3319FF0D0 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "dartpad_curve2_d_0.app"
|
||||
BuildableName = "flutter_api_samples.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "dartpad_curve2_d_0.app"
|
||||
BuildableName = "flutter_api_samples.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -54,7 +54,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "dartpad_curve2_d_0.app"
|
||||
BuildableName = "flutter_api_samples.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "dartpad_curve2_d_0.app"
|
||||
BuildableName = "flutter_api_samples.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
|
|
@ -4,4 +4,7 @@
|
|||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// 'flutter create' template.
|
||||
|
||||
// The application's name. By default this is also the title of the Flutter window.
|
||||
PRODUCT_NAME = dartpad_curve2_d_0
|
||||
PRODUCT_NAME = flutter_api_samples
|
||||
|
||||
// The application's bundle identifier
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.dartpadCurve2D0
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<false/>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -12,29 +12,73 @@ dependencies:
|
|||
cupertino_icons: 1.0.3
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
characters: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
integration_test:
|
||||
sdk: flutter
|
||||
flutter_driver:
|
||||
sdk: flutter
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
test: 1.17.12
|
||||
|
||||
_fe_analyzer_shared: 26.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
analyzer: 2.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
archive: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
args: 2.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
async: 2.8.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
characters: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
charcode: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
cli_util: 0.3.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
clock: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
convert: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
coverage: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
crypto: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
fake_async: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
file: 6.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
frontend_server_client: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
glob: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http_multi_server: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http_parser: 4.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
io: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
js: 0.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
logging: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
matcher: 0.12.11 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
mime: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
node_preamble: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
package_config: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
path: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
pedantic: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
pool: 1.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
pub_semver: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf: 1.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_packages_handler: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_static: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_web_socket: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_map_stack_trace: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_maps: 0.10.10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_span: 1.8.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
stream_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
string_scanner: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
sync_http: 0.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
term_glyph: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webdriver: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webkit_inspection_protocol: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 3.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: b7be
|
||||
# PUBSPEC CHECKSUM: e9cf
|
||||
|
|
7
examples/api/test_driver/integration_test.dart
Normal file
7
examples/api/test_driver/integration_test.dart
Normal file
|
@ -0,0 +1,7 @@
|
|||
// 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 'package:integration_test/integration_test_driver.dart';
|
||||
|
||||
Future<void> main() => integrationDriver();
|
|
@ -26,10 +26,10 @@ found in the LICENSE file. -->
|
|||
<!-- iOS meta tags & icons -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="dartpad_curve2_d_0">
|
||||
<meta name="apple-mobile-web-app-title" content="flutter_api_samples">
|
||||
<link rel="apple-touch-icon" href="icons/Icon-192.png">
|
||||
|
||||
<title>dartpad_curve2_d_0</title>
|
||||
<title>flutter_api_samples</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "dartpad_curve2_d_0",
|
||||
"short_name": "dartpad_curve2_d_0",
|
||||
"name": "flutter_api_samples",
|
||||
"short_name": "flutter_api_samples",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#0175C2",
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
// 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.
|
||||
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
|
|
@ -92,10 +92,10 @@ BEGIN
|
|||
VALUE "CompanyName", "dev.flutter" "\0"
|
||||
VALUE "FileDescription", "A temporary code sample for Curve2D" "\0"
|
||||
VALUE "FileVersion", VERSION_AS_STRING "\0"
|
||||
VALUE "InternalName", "dartpad_curve2_d_0" "\0"
|
||||
VALUE "InternalName", "flutter_api_samples" "\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2021 dev.flutter. All rights reserved." "\0"
|
||||
VALUE "OriginalFilename", "dartpad_curve2_d_0.exe" "\0"
|
||||
VALUE "ProductName", "dartpad_curve2_d_0" "\0"
|
||||
VALUE "OriginalFilename", "flutter_api_samples.exe" "\0"
|
||||
VALUE "ProductName", "flutter_api_samples" "\0"
|
||||
VALUE "ProductVersion", VERSION_AS_STRING "\0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|||
FlutterWindow window(project);
|
||||
Win32Window::Point origin(10, 10);
|
||||
Win32Window::Size size(1280, 720);
|
||||
if (!window.CreateAndShow(L"dartpad_curve2_d_0", origin, size)) {
|
||||
if (!window.CreateAndShow(L"flutter_api_samples", origin, size)) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
window.SetQuitOnClose(true);
|
||||
|
|
|
@ -12,11 +12,11 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
assets:
|
||||
- assets/flutter-mark-square-64.png
|
||||
|
||||
# PUBSPEC CHECKSUM: d76e
|
||||
# PUBSPEC CHECKSUM: d86f
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_driver:
|
||||
|
@ -70,4 +70,4 @@ dev_dependencies:
|
|||
webkit_inspection_protocol: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 3.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: d229
|
||||
# PUBSPEC CHECKSUM: bc2a
|
||||
|
|
|
@ -18,7 +18,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -54,4 +54,4 @@ flutter:
|
|||
assets:
|
||||
- images/coast.jpg
|
||||
|
||||
# PUBSPEC CHECKSUM: b7be
|
||||
# PUBSPEC CHECKSUM: b8bf
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -36,4 +36,4 @@ flutter:
|
|||
- services/data.json
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: 9119
|
||||
# PUBSPEC CHECKSUM: 921a
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -73,4 +73,4 @@ dev_dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: d229
|
||||
# PUBSPEC CHECKSUM: bc2a
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -73,4 +73,4 @@ dev_dependencies:
|
|||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: d229
|
||||
# PUBSPEC CHECKSUM: bc2a
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
flutter:
|
||||
|
||||
|
@ -19,4 +19,4 @@ flutter:
|
|||
assets:
|
||||
- assets/flutter-mark-square-64.png
|
||||
|
||||
# PUBSPEC CHECKSUM: d76e
|
||||
# PUBSPEC CHECKSUM: d86f
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -31,4 +31,4 @@ dev_dependencies:
|
|||
term_glyph: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: 9119
|
||||
# PUBSPEC CHECKSUM: 921a
|
||||
|
|
|
@ -284,7 +284,7 @@ class _EnabledAndDisabledMouseCursor extends MaterialStateMouseCursor {
|
|||
/// property values. [MaterialStateBorderSide] should only be used with widgets that document
|
||||
/// their support, like [ActionChip.side].
|
||||
///
|
||||
/// {@tool dartpad --template=stateful_widget_material}
|
||||
/// {@tool dartpad --template=stateful_widget_scaffold_center}
|
||||
/// This example defines a subclass of [MaterialStateBorderSide], that resolves
|
||||
/// to a red border side when its widget is selected.
|
||||
///
|
||||
|
|
|
@ -284,13 +284,13 @@ class NavigationRail extends StatefulWidget {
|
|||
/// This can be used to synchronize animations in the [leading] or [trailing]
|
||||
/// widget, such as an animated menu or a [FloatingActionButton] animation.
|
||||
///
|
||||
/// {@tool dartpad --template=stateless_widget_material}
|
||||
/// This example shows how to use this animation to create a
|
||||
/// [FloatingActionButton] that animates itself between the normal and
|
||||
/// extended states of the [NavigationRail].
|
||||
/// {@tool dartpad --template=freeform}
|
||||
/// This example shows how to use this animation to create a [FloatingActionButton]
|
||||
/// that animates itself between the normal and extended states of the
|
||||
/// [NavigationRail].
|
||||
///
|
||||
/// An instance of `ExtendableFab` would be created for
|
||||
/// [NavigationRail.leading].
|
||||
/// An instance of `MyNavigationRailFab` is created for [NavigationRail.leading].
|
||||
/// Pressing the FAB button toggles the "extended" state of the [NavigationRail].
|
||||
///
|
||||
/// ** See code in examples/api/lib/material/navigation_rail/navigation_rail.extended_animation.0.dart **
|
||||
/// {@end-tool}
|
||||
|
|
|
@ -96,7 +96,7 @@ class NetworkImage extends image_provider.ImageProvider<image_provider.NetworkIm
|
|||
// The network may be only temporarily unavailable, or the file will be
|
||||
// added on the server later. Avoid having future calls to resolve
|
||||
// fail to check the network again.
|
||||
await response.drain<List<int>>();
|
||||
await response.drain<List<int>>(<int>[]);
|
||||
throw image_provider.NetworkImageLoadException(statusCode: response.statusCode, uri: resolved);
|
||||
}
|
||||
|
||||
|
|
|
@ -4371,8 +4371,11 @@ typedef ErrorWidgetBuilder = Widget Function(FlutterErrorDetails details);
|
|||
///
|
||||
/// It is possible to override this widget.
|
||||
///
|
||||
/// {@tool sample --template=freeform}
|
||||
/// {@tool dartpad --template=freeform}
|
||||
/// This example shows how to override the standard error widget builder in release
|
||||
/// mode, but use the standard one in debug mode.
|
||||
///
|
||||
/// The error occurs when you click the "Error Prone" button.
|
||||
///
|
||||
/// ** See code in examples/api/lib/widgets/framework/error_widget.0.dart **
|
||||
/// {@end-tool}
|
||||
|
|
|
@ -101,7 +101,7 @@ enum HeroFlightDirection {
|
|||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=Be9UH1kXFDw}
|
||||
///
|
||||
/// {@tool dartpad --template=stateless_widget_material}
|
||||
/// {@tool dartpad --template=stateless_widget_scaffold_center}
|
||||
/// This sample shows a [Hero] used within a [ListTile].
|
||||
///
|
||||
/// Tapping on the Hero-wrapped rectangle triggers a hero
|
||||
|
|
|
@ -816,7 +816,7 @@ class Image extends StatefulWidget {
|
|||
/// [FlutterError.onError]. If it is provided, the caller should either handle
|
||||
/// the exception by providing a replacement widget, or rethrow the exception.
|
||||
///
|
||||
/// {@tool dartpad --template=stateless_widget_material}
|
||||
/// {@tool dartpad --template=stateless_widget_scaffold_center}
|
||||
/// The following sample uses [errorBuilder] to show a '😢' in place of the
|
||||
/// image that fails to load, and prints the error to the console.
|
||||
///
|
||||
|
|
|
@ -758,12 +758,46 @@ abstract class RouteTransitionRecord {
|
|||
///
|
||||
/// To make route transition decisions, subclass must implement [resolve].
|
||||
///
|
||||
/// {@tool sample --template=freeform}
|
||||
/// {@tool snippet}
|
||||
/// The following example demonstrates how to implement a subclass that always
|
||||
/// removes or adds routes without animated transitions and puts the removed
|
||||
/// routes at the top of the list.
|
||||
///
|
||||
/// ** See code in examples/api/lib/widgets/navigator/transition_delegate.0.dart **
|
||||
/// ```dart
|
||||
/// class NoAnimationTransitionDelegate extends TransitionDelegate<void> {
|
||||
/// @override
|
||||
/// Iterable<RouteTransitionRecord> resolve({
|
||||
/// required List<RouteTransitionRecord> newPageRouteHistory,
|
||||
/// required Map<RouteTransitionRecord?, RouteTransitionRecord> locationToExitingPageRoute,
|
||||
/// required Map<RouteTransitionRecord?, List<RouteTransitionRecord>> pageRouteToPagelessRoutes,
|
||||
/// }) {
|
||||
/// final List<RouteTransitionRecord> results = <RouteTransitionRecord>[];
|
||||
///
|
||||
/// for (final RouteTransitionRecord pageRoute in newPageRouteHistory) {
|
||||
/// if (pageRoute.isWaitingForEnteringDecision) {
|
||||
/// pageRoute.markForAdd();
|
||||
/// }
|
||||
/// results.add(pageRoute);
|
||||
///
|
||||
/// }
|
||||
/// for (final RouteTransitionRecord exitingPageRoute in locationToExitingPageRoute.values) {
|
||||
/// if (exitingPageRoute.isWaitingForExitingDecision) {
|
||||
/// exitingPageRoute.markForRemove();
|
||||
/// final List<RouteTransitionRecord>? pagelessRoutes = pageRouteToPagelessRoutes[exitingPageRoute];
|
||||
/// if (pagelessRoutes != null) {
|
||||
/// for (final RouteTransitionRecord pagelessRoute in pagelessRoutes) {
|
||||
/// pagelessRoute.markForRemove();
|
||||
/// }
|
||||
/// }
|
||||
/// }
|
||||
/// results.add(exitingPageRoute);
|
||||
///
|
||||
/// }
|
||||
/// return results;
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// ```
|
||||
/// {@end-tool}
|
||||
///
|
||||
/// See also:
|
||||
|
|
|
@ -722,7 +722,7 @@ class RelativePositionedTransition extends AnimatedWidget {
|
|||
/// [size]. Both [rect] and [size] must not be null.
|
||||
const RelativePositionedTransition({
|
||||
Key? key,
|
||||
required Animation<Rect> rect,
|
||||
required Animation<Rect?> rect,
|
||||
required this.size,
|
||||
required this.child,
|
||||
}) : assert(rect != null),
|
||||
|
@ -732,11 +732,13 @@ class RelativePositionedTransition extends AnimatedWidget {
|
|||
|
||||
/// The animation that controls the child's size and position.
|
||||
///
|
||||
/// If the animation returns a null [Rect], the rect is assumed to be [Rect.zero].
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [size], which gets the size of the box that the [Positioned] widget's
|
||||
/// offsets are relative to.
|
||||
Animation<Rect> get rect => listenable as Animation<Rect>;
|
||||
Animation<Rect?> get rect => listenable as Animation<Rect?>;
|
||||
|
||||
/// The [Positioned] widget's offsets are relative to a box of this
|
||||
/// size whose origin is 0,0.
|
||||
|
@ -749,7 +751,7 @@ class RelativePositionedTransition extends AnimatedWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final RelativeRect offsets = RelativeRect.fromSize(rect.value, size);
|
||||
final RelativeRect offsets = RelativeRect.fromSize(rect.value ?? Rect.zero, size);
|
||||
return Positioned(
|
||||
top: offsets.top,
|
||||
right: offsets.right,
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue