From 547de47a93f73b4a454b5505b38b08fdbf03ec4d Mon Sep 17 00:00:00 2001 From: engine-flutter-autoroll Date: Wed, 7 Sep 2022 12:03:32 -0400 Subject: [PATCH 01/32] Roll Flutter Engine from d94d3d5dd807 to c0a06da6b228 (1 revision) (#111093) --- bin/internal/engine.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/internal/engine.version b/bin/internal/engine.version index 6274c379ed4fc..789e74016159b 100644 --- a/bin/internal/engine.version +++ b/bin/internal/engine.version @@ -1 +1 @@ -d94d3d5dd80729f7db0d14b562291f0a8f7c3c4a +c0a06da6b228eb8c777f99cbab401d2f644fbc68 From d5f372bccd77880ab34cd3daff625095b9288da5 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Wed, 7 Sep 2022 12:54:06 -0400 Subject: [PATCH 02/32] Request `DartPerformanceMode.latency` during transitions (#110600) --- .../flutter/lib/src/scheduler/binding.dart | 97 ++++++++++++++++++- packages/flutter/lib/src/widgets/routes.dart | 17 ++++ .../cupertino/nav_bar_transition_test.dart | 23 +++++ .../test/scheduler/performance_mode_test.dart | 56 +++++++++++ packages/flutter_test/lib/src/binding.dart | 3 + .../integration_test/test/binding_test.dart | 1 + 6 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 packages/flutter/test/scheduler/performance_mode_test.dart diff --git a/packages/flutter/lib/src/scheduler/binding.dart b/packages/flutter/lib/src/scheduler/binding.dart index 41dce5f7ff850..d06f4bbd28710 100644 --- a/packages/flutter/lib/src/scheduler/binding.dart +++ b/packages/flutter/lib/src/scheduler/binding.dart @@ -5,7 +5,7 @@ import 'dart:async'; import 'dart:collection'; import 'dart:developer' show Flow, Timeline, TimelineTask; -import 'dart:ui' show AppLifecycleState, FramePhase, FrameTiming, PlatformDispatcher, TimingsCallback; +import 'dart:ui' show AppLifecycleState, DartPerformanceMode, FramePhase, FrameTiming, PlatformDispatcher, TimingsCallback; import 'package:collection/collection.dart' show HeapPriorityQueue, PriorityQueue; import 'package:flutter/foundation.dart'; @@ -183,6 +183,34 @@ enum SchedulerPhase { postFrameCallbacks, } +/// This callback is invoked when a request for [DartPerformanceMode] is disposed. +/// +/// See also: +/// +/// * [PerformanceModeRequestHandle] for more information on the lifecycle of the handle. +typedef _PerformanceModeCleaupCallback = VoidCallback; + +/// An opaque handle that keeps a request for [DartPerformanceMode] active until +/// disposed. +/// +/// To create a [PerformanceModeRequestHandle], use [SchedulerBinding.requestPerformanceMode]. +/// The component that makes the request is responsible for disposing the handle. +class PerformanceModeRequestHandle { + PerformanceModeRequestHandle._(_PerformanceModeCleaupCallback this._cleanup); + + _PerformanceModeCleaupCallback? _cleanup; + + /// Call this method to signal to [SchedulerBinding] that a request for a [DartPerformanceMode] + /// is no longer needed. + /// + /// This method must only be called once per object. + void dispose() { + assert(_cleanup != null); + _cleanup!(); + _cleanup = null; + } +} + /// Scheduler for running the following: /// /// * _Transient callbacks_, triggered by the system's @@ -605,6 +633,20 @@ mixin SchedulerBinding on BindingBase { return true; } + /// Asserts that there are no pending performance mode requests in debug mode. + /// + /// Throws a [FlutterError] if there are pending performance mode requests, + /// as this indicates a potential memory leak. + bool debugAssertNoPendingPerformanceModeRequests(String reason) { + assert(() { + if (_performanceMode != null) { + throw FlutterError(reason); + } + return true; + }()); + return true; + } + /// Prints the stack for where the current transient callback was registered. /// /// A transient frame callback is one that was registered with @@ -1085,6 +1127,59 @@ mixin SchedulerBinding on BindingBase { } } + DartPerformanceMode? _performanceMode; + int _numPerformanceModeRequests = 0; + + /// Request a specific [DartPerformanceMode]. + /// + /// Returns `null` if the request was not successful due to conflicting performance mode requests. + /// Two requests are said to be in conflict if they are not of the same [DartPerformanceMode] type, + /// and an explicit request for a performance mode has been made prior. + /// + /// Requestor is responsible for calling [PerformanceModeRequestHandle.dispose] when it no longer + /// requires the performance mode. + PerformanceModeRequestHandle? requestPerformanceMode(DartPerformanceMode mode) { + // conflicting requests are not allowed. + if (_performanceMode != null && _performanceMode != mode) { + return null; + } + + if (_performanceMode == mode) { + assert(_numPerformanceModeRequests > 0); + _numPerformanceModeRequests++; + } else if (_performanceMode == null) { + assert(_numPerformanceModeRequests == 0); + _performanceMode = mode; + _numPerformanceModeRequests = 1; + } + + return PerformanceModeRequestHandle._(_disposePerformanceModeRequest); + } + + /// Remove a request for a specific [DartPerformanceMode]. + /// + /// If all the pending requests have been disposed, the engine will revert to the + /// [DartPerformanceMode.balanced] performance mode. + void _disposePerformanceModeRequest() { + _numPerformanceModeRequests--; + if (_numPerformanceModeRequests == 0) { + _performanceMode = null; + PlatformDispatcher.instance.requestDartPerformanceMode(DartPerformanceMode.balanced); + } + } + + /// Returns the current [DartPerformanceMode] requested or `null` if no requests have + /// been made. + /// + /// This is only supported in debug and profile modes, returns `null` in release mode. + DartPerformanceMode? debugGetRequestedPerformanceMode() { + if (!(kDebugMode || kProfileMode)) { + return null; + } else { + return _performanceMode; + } + } + /// Called by the engine to produce a new frame. /// /// This method is called immediately after [handleBeginFrame]. It calls all diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart index e0606556aa237..b258842b620b3 100644 --- a/packages/flutter/lib/src/widgets/routes.dart +++ b/packages/flutter/lib/src/widgets/routes.dart @@ -108,6 +108,14 @@ abstract class TransitionRoute extends OverlayRoute { Future get completed => _transitionCompleter.future; final Completer _transitionCompleter = Completer(); + /// Handle to the performance mode request. + /// + /// When the route is animating, the performance mode is requested. It is then + /// disposed when the animation ends. Requesting [DartPerformanceMode.latency] + /// indicates to the engine that the transition is latency sensitive and to delay + /// non-essential work while this handle is active. + PerformanceModeRequestHandle? _performanceModeRequestHandle; + /// {@template flutter.widgets.TransitionRoute.transitionDuration} /// The duration the transition going forwards. /// @@ -221,12 +229,17 @@ abstract class TransitionRoute extends OverlayRoute { if (overlayEntries.isNotEmpty) { overlayEntries.first.opaque = opaque; } + _performanceModeRequestHandle?.dispose(); + _performanceModeRequestHandle = null; break; case AnimationStatus.forward: case AnimationStatus.reverse: if (overlayEntries.isNotEmpty) { overlayEntries.first.opaque = false; } + _performanceModeRequestHandle ??= + SchedulerBinding.instance + .requestPerformanceMode(ui.DartPerformanceMode.latency); break; case AnimationStatus.dismissed: // We might still be an active route if a subclass is controlling the @@ -236,6 +249,8 @@ abstract class TransitionRoute extends OverlayRoute { if (!isActive) { navigator!.finalizeRoute(this); _popFinalized = true; + _performanceModeRequestHandle?.dispose(); + _performanceModeRequestHandle = null; } break; } @@ -465,6 +480,8 @@ abstract class TransitionRoute extends OverlayRoute { void dispose() { assert(!_transitionCompleter.isCompleted, 'Cannot dispose a $runtimeType twice.'); _animation?.removeStatusListener(_handleStatusChanged); + _performanceModeRequestHandle?.dispose(); + _performanceModeRequestHandle = null; if (willDisposeAnimationController) { _controller?.dispose(); } diff --git a/packages/flutter/test/cupertino/nav_bar_transition_test.dart b/packages/flutter/test/cupertino/nav_bar_transition_test.dart index dc4dbebc38ff8..f739bc5759d28 100644 --- a/packages/flutter/test/cupertino/nav_bar_transition_test.dart +++ b/packages/flutter/test/cupertino/nav_bar_transition_test.dart @@ -9,8 +9,11 @@ // Fails with "flutter test --test-randomize-ordering-seed=456" @Tags(['no-shuffle']) +import 'dart:ui'; + import 'package:flutter/cupertino.dart'; import 'package:flutter/rendering.dart'; +import 'package:flutter/scheduler.dart'; import 'package:flutter_test/flutter_test.dart'; Future startTransitionBetween( @@ -443,6 +446,26 @@ void main() { ); }); + testWidgets('DartPerformanceMode is latency mid-animation', (WidgetTester tester) async { + DartPerformanceMode? mode; + + // before the animation starts, no requests are active. + mode = SchedulerBinding.instance.debugGetRequestedPerformanceMode(); + expect(mode, isNull); + + await startTransitionBetween(tester, fromTitle: 'Page 1'); + + // mid-transition, latency mode is expected. + await tester.pump(const Duration(milliseconds: 50)); + mode = SchedulerBinding.instance.debugGetRequestedPerformanceMode(); + expect(mode, equals(DartPerformanceMode.latency)); + + // end of transitio, go back to no requests active. + await tester.pump(const Duration(milliseconds: 500)); + mode = SchedulerBinding.instance.debugGetRequestedPerformanceMode(); + expect(mode, isNull); + }); + testWidgets('Multiple nav bars tags do not conflict if in different navigators', (WidgetTester tester) async { await tester.pumpWidget( CupertinoApp( diff --git a/packages/flutter/test/scheduler/performance_mode_test.dart b/packages/flutter/test/scheduler/performance_mode_test.dart new file mode 100644 index 0000000000000..7a44796cd0044 --- /dev/null +++ b/packages/flutter/test/scheduler/performance_mode_test.dart @@ -0,0 +1,56 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:ui'; + +import 'package:flutter/scheduler.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + late SchedulerBinding binding; + + setUpAll(() { + WidgetsFlutterBinding.ensureInitialized(); + binding = SchedulerBinding.instance; + }); + + test('PerformanceModeHandler make one request', () async { + final PerformanceModeRequestHandle? requestHandle = binding.requestPerformanceMode(DartPerformanceMode.latency); + expect(requestHandle, isNotNull); + expect(binding.debugGetRequestedPerformanceMode(), equals(DartPerformanceMode.latency)); + requestHandle?.dispose(); + expect(binding.debugGetRequestedPerformanceMode(), isNull); + }); + + test('PerformanceModeHandler make conflicting requests', () async { + final PerformanceModeRequestHandle? requestHandle1 = binding.requestPerformanceMode(DartPerformanceMode.latency); + expect(requestHandle1, isNotNull); + + final PerformanceModeRequestHandle? requestHandle2 = binding.requestPerformanceMode(DartPerformanceMode.throughput); + expect(requestHandle2, isNull); + + expect(binding.debugGetRequestedPerformanceMode(), equals(DartPerformanceMode.latency)); + + requestHandle1?.dispose(); + expect(binding.debugGetRequestedPerformanceMode(), isNull); + }); + + test('PerformanceModeHandler revert only after last requestor disposed', + () async { + final PerformanceModeRequestHandle? requestHandle1 = binding.requestPerformanceMode(DartPerformanceMode.latency); + expect(requestHandle1, isNotNull); + + expect(binding.debugGetRequestedPerformanceMode(), equals(DartPerformanceMode.latency)); + + final PerformanceModeRequestHandle? requestHandle2 = binding.requestPerformanceMode(DartPerformanceMode.latency); + expect(requestHandle2, isNotNull); + + expect(binding.debugGetRequestedPerformanceMode(), equals(DartPerformanceMode.latency)); + requestHandle1?.dispose(); + expect(binding.debugGetRequestedPerformanceMode(), equals(DartPerformanceMode.latency)); + requestHandle2?.dispose(); + expect(binding.debugGetRequestedPerformanceMode(), isNull); + }); +} diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart index a20d6fce2445e..758b32ce0abde 100644 --- a/packages/flutter_test/lib/src/binding.dart +++ b/packages/flutter_test/lib/src/binding.dart @@ -885,6 +885,9 @@ abstract class TestWidgetsFlutterBinding extends BindingBase assert(debugAssertNoTransientCallbacks( 'An animation is still running even after the widget tree was disposed.' )); + assert(debugAssertNoPendingPerformanceModeRequests( + 'A performance mode was requested and not disposed by a test.' + )); assert(debugAssertAllFoundationVarsUnset( 'The value of a foundation debug variable was changed by the test.', debugPrintOverride: debugPrintOverride, diff --git a/packages/integration_test/test/binding_test.dart b/packages/integration_test/test/binding_test.dart index 79e2b6b4a2dad..b8ad8fe1ff095 100644 --- a/packages/integration_test/test/binding_test.dart +++ b/packages/integration_test/test/binding_test.dart @@ -39,6 +39,7 @@ Future main() async { )); expect(tester.binding, binding); binding.reportData = {'answer': 42}; + await tester.pump(); }); testWidgets('hitTesting works when using setSurfaceSize', (WidgetTester tester) async { From de0dd063b4858e9da5dd7071c5f647f9627f64fe Mon Sep 17 00:00:00 2001 From: Flutter GitHub Bot Date: Wed, 7 Sep 2022 10:09:18 -0700 Subject: [PATCH 03/32] Marks Mac_ios complex_layout_scroll_perf_bad_impeller_ios__timeline_summary to be unflaky (#111106) --- .ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.ci.yaml b/.ci.yaml index ab41655fc1229..87286ad6de6d6 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -3221,7 +3221,6 @@ targets: - name: Mac_ios complex_layout_scroll_perf_bad_impeller_ios__timeline_summary recipe: devicelab/devicelab_drone presubmit: false - bringup: true timeout: 60 properties: tags: > From ad1e76a2093970d0fc99a198d7d3381bbbca0f34 Mon Sep 17 00:00:00 2001 From: Flutter GitHub Bot Date: Wed, 7 Sep 2022 10:22:07 -0700 Subject: [PATCH 04/32] Marks Mac_ios native_platform_view_ui_tests_ios to be unflaky (#111107) --- .ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.ci.yaml b/.ci.yaml index 87286ad6de6d6..6024a16ff0aaf 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -3533,7 +3533,6 @@ targets: task_name: microbenchmarks_impeller_ios - name: Mac_ios native_platform_view_ui_tests_ios - bringup: true recipe: devicelab/devicelab_drone presubmit: false timeout: 60 From fb2f4c9cb9b1fc503a6eed81fc21a899cbc31150 Mon Sep 17 00:00:00 2001 From: Pierre-Louis <6655696+guidezpl@users.noreply.github.com> Date: Wed, 7 Sep 2022 19:32:51 +0200 Subject: [PATCH 05/32] [Fonts] Update icons (#111092) --- bin/internal/material_fonts.version | 2 +- packages/flutter/lib/src/material/icons.dart | 422 +++++++++++++++++- .../flutter/test/material/icons_test.dart | 21 + 3 files changed, 428 insertions(+), 17 deletions(-) diff --git a/bin/internal/material_fonts.version b/bin/internal/material_fonts.version index 677ef0f74ccdc..237bd69c0beb5 100644 --- a/bin/internal/material_fonts.version +++ b/bin/internal/material_fonts.version @@ -1 +1 @@ -flutter_infra_release/flutter/fonts/d76e4de0ef19d04a55bf3117322be9ced21864aa/fonts.zip +flutter_infra_release/flutter/fonts/3012db47f3130e62f7cc0beabff968a33cbec8d8/fonts.zip diff --git a/packages/flutter/lib/src/material/icons.dart b/packages/flutter/lib/src/material/icons.dart index 8355ef34263e4..754ba917e1112 100644 --- a/packages/flutter/lib/src/material/icons.dart +++ b/packages/flutter/lib/src/material/icons.dart @@ -2298,6 +2298,18 @@ class Icons { /// arrow_left — material icon named "arrow left" (outlined). static const IconData arrow_left_outlined = IconData(0xee8e, fontFamily: 'MaterialIcons', matchTextDirection: true); + /// arrow_outward — material icon named "arrow outward". + static const IconData arrow_outward = IconData(0xf0852, fontFamily: 'MaterialIcons'); + + /// arrow_outward — material icon named "arrow outward" (sharp). + static const IconData arrow_outward_sharp = IconData(0xf0834, fontFamily: 'MaterialIcons'); + + /// arrow_outward — material icon named "arrow outward" (round). + static const IconData arrow_outward_rounded = IconData(0xf087d, fontFamily: 'MaterialIcons'); + + /// arrow_outward — material icon named "arrow outward" (outlined). + static const IconData arrow_outward_outlined = IconData(0xf089b, fontFamily: 'MaterialIcons'); + /// arrow_right — material icon named "arrow right". static const IconData arrow_right = IconData(0xe09e, fontFamily: 'MaterialIcons', matchTextDirection: true); @@ -2394,6 +2406,9 @@ class Icons { /// assignment — material icon named "assignment" (outlined). static const IconData assignment_outlined = IconData(0xee98, fontFamily: 'MaterialIcons', matchTextDirection: true); + /// assignment_add — material icon named "assignment add". + static const IconData assignment_add = IconData(0xf0853, fontFamily: 'MaterialIcons'); + /// assignment_ind — material icon named "assignment ind". static const IconData assignment_ind = IconData(0xe0a6, fontFamily: 'MaterialIcons'); @@ -2454,6 +2469,18 @@ class Icons { /// assignment_turned_in — material icon named "assignment turned in" (outlined). static const IconData assignment_turned_in_outlined = IconData(0xee9b, fontFamily: 'MaterialIcons'); + /// assist_walker — material icon named "assist walker". + static const IconData assist_walker = IconData(0xf0854, fontFamily: 'MaterialIcons'); + + /// assist_walker — material icon named "assist walker" (sharp). + static const IconData assist_walker_sharp = IconData(0xf0835, fontFamily: 'MaterialIcons'); + + /// assist_walker — material icon named "assist walker" (round). + static const IconData assist_walker_rounded = IconData(0xf087e, fontFamily: 'MaterialIcons'); + + /// assist_walker — material icon named "assist walker" (outlined). + static const IconData assist_walker_outlined = IconData(0xf089c, fontFamily: 'MaterialIcons'); + /// assistant — material icon named "assistant". static const IconData assistant = IconData(0xe0ab, fontFamily: 'MaterialIcons'); @@ -2913,6 +2940,9 @@ class Icons { /// bar_chart — material icon named "bar chart" (outlined). static const IconData bar_chart_outlined = IconData(0xeebc, fontFamily: 'MaterialIcons'); + /// barcode_reader — material icon named "barcode reader". + static const IconData barcode_reader = IconData(0xf0855, fontFamily: 'MaterialIcons'); + /// batch_prediction — material icon named "batch prediction". static const IconData batch_prediction = IconData(0xe0cd, fontFamily: 'MaterialIcons'); @@ -3249,6 +3279,18 @@ class Icons { /// blender — material icon named "blender" (outlined). static const IconData blender_outlined = IconData(0xeed0, fontFamily: 'MaterialIcons'); + /// blind — material icon named "blind". + static const IconData blind = IconData(0xf0856, fontFamily: 'MaterialIcons'); + + /// blind — material icon named "blind" (sharp). + static const IconData blind_sharp = IconData(0xf0836, fontFamily: 'MaterialIcons'); + + /// blind — material icon named "blind" (round). + static const IconData blind_rounded = IconData(0xf087f, fontFamily: 'MaterialIcons'); + + /// blind — material icon named "blind" (outlined). + static const IconData blind_outlined = IconData(0xf089d, fontFamily: 'MaterialIcons'); + /// blinds — material icon named "blinds". static const IconData blinds = IconData(0xf078f, fontFamily: 'MaterialIcons'); @@ -5535,6 +5577,18 @@ class Icons { /// construction — material icon named "construction" (outlined). static const IconData construction_outlined = IconData(0xef78, fontFamily: 'MaterialIcons'); + /// contact_emergency — material icon named "contact emergency". + static const IconData contact_emergency = IconData(0xf0857, fontFamily: 'MaterialIcons'); + + /// contact_emergency — material icon named "contact emergency" (sharp). + static const IconData contact_emergency_sharp = IconData(0xf0837, fontFamily: 'MaterialIcons'); + + /// contact_emergency — material icon named "contact emergency" (round). + static const IconData contact_emergency_rounded = IconData(0xf0880, fontFamily: 'MaterialIcons'); + + /// contact_emergency — material icon named "contact emergency" (outlined). + static const IconData contact_emergency_outlined = IconData(0xf089e, fontFamily: 'MaterialIcons'); + /// contact_mail — material icon named "contact mail". static const IconData contact_mail = IconData(0xe18a, fontFamily: 'MaterialIcons'); @@ -5727,6 +5781,9 @@ class Icons { /// control_point_duplicate — material icon named "control point duplicate" (outlined). static const IconData control_point_duplicate_outlined = IconData(0xef84, fontFamily: 'MaterialIcons'); + /// conveyor_belt — material icon named "conveyor belt". + static const IconData conveyor_belt = IconData(0xf0858, fontFamily: 'MaterialIcons'); + /// cookie — material icon named "cookie". static const IconData cookie = IconData(0xf04d9, fontFamily: 'MaterialIcons'); @@ -6747,6 +6804,9 @@ class Icons { /// devices_other — material icon named "devices other" (outlined). static const IconData devices_other_outlined = IconData(0xefba, fontFamily: 'MaterialIcons'); + /// dew_point — material icon named "dew point". + static const IconData dew_point = IconData(0xf0859, fontFamily: 'MaterialIcons'); + /// dialer_sip — material icon named "dialer sip". static const IconData dialer_sip = IconData(0xe1cd, fontFamily: 'MaterialIcons'); @@ -7131,6 +7191,42 @@ class Icons { /// display_settings — material icon named "display settings" (outlined). static const IconData display_settings_outlined = IconData(0xf05eb, fontFamily: 'MaterialIcons'); + /// diversity_1 — material icon named "diversity 1". + static const IconData diversity_1 = IconData(0xf085a, fontFamily: 'MaterialIcons'); + + /// diversity_1 — material icon named "diversity 1" (sharp). + static const IconData diversity_1_sharp = IconData(0xf0838, fontFamily: 'MaterialIcons'); + + /// diversity_1 — material icon named "diversity 1" (round). + static const IconData diversity_1_rounded = IconData(0xf0881, fontFamily: 'MaterialIcons'); + + /// diversity_1 — material icon named "diversity 1" (outlined). + static const IconData diversity_1_outlined = IconData(0xf089f, fontFamily: 'MaterialIcons'); + + /// diversity_2 — material icon named "diversity 2". + static const IconData diversity_2 = IconData(0xf085b, fontFamily: 'MaterialIcons'); + + /// diversity_2 — material icon named "diversity 2" (sharp). + static const IconData diversity_2_sharp = IconData(0xf0839, fontFamily: 'MaterialIcons'); + + /// diversity_2 — material icon named "diversity 2" (round). + static const IconData diversity_2_rounded = IconData(0xf0882, fontFamily: 'MaterialIcons'); + + /// diversity_2 — material icon named "diversity 2" (outlined). + static const IconData diversity_2_outlined = IconData(0xf08a0, fontFamily: 'MaterialIcons'); + + /// diversity_3 — material icon named "diversity 3". + static const IconData diversity_3 = IconData(0xf085c, fontFamily: 'MaterialIcons'); + + /// diversity_3 — material icon named "diversity 3" (sharp). + static const IconData diversity_3_sharp = IconData(0xf083a, fontFamily: 'MaterialIcons'); + + /// diversity_3 — material icon named "diversity 3" (round). + static const IconData diversity_3_rounded = IconData(0xf0883, fontFamily: 'MaterialIcons'); + + /// diversity_3 — material icon named "diversity 3" (outlined). + static const IconData diversity_3_outlined = IconData(0xf08a1, fontFamily: 'MaterialIcons'); + /// dnd_forwardslash — material icon named "dnd forwardslash". static const IconData dnd_forwardslash = IconData(0xe1eb, fontFamily: 'MaterialIcons'); @@ -7842,6 +7938,9 @@ class Icons { /// edit_calendar — material icon named "edit calendar" (outlined). static const IconData edit_calendar_outlined = IconData(0xf05ef, fontFamily: 'MaterialIcons'); + /// edit_document — material icon named "edit document". + static const IconData edit_document = IconData(0xf085d, fontFamily: 'MaterialIcons'); + /// edit_location — material icon named "edit location". static const IconData edit_location = IconData(0xe21c, fontFamily: 'MaterialIcons'); @@ -7914,6 +8013,9 @@ class Icons { /// edit_road — material icon named "edit road" (outlined). static const IconData edit_road_outlined = IconData(0xf00e, fontFamily: 'MaterialIcons'); + /// edit_square — material icon named "edit square". + static const IconData edit_square = IconData(0xf085e, fontFamily: 'MaterialIcons'); + /// egg — material icon named "egg". static const IconData egg = IconData(0xf04f8, fontFamily: 'MaterialIcons'); @@ -8682,6 +8784,66 @@ class Icons { /// face — material icon named "face" (outlined). static const IconData face_outlined = IconData(0xf040, fontFamily: 'MaterialIcons'); + /// face_2 — material icon named "face 2". + static const IconData face_2 = IconData(0xf085f, fontFamily: 'MaterialIcons'); + + /// face_2 — material icon named "face 2" (sharp). + static const IconData face_2_sharp = IconData(0xf083b, fontFamily: 'MaterialIcons'); + + /// face_2 — material icon named "face 2" (round). + static const IconData face_2_rounded = IconData(0xf0884, fontFamily: 'MaterialIcons'); + + /// face_2 — material icon named "face 2" (outlined). + static const IconData face_2_outlined = IconData(0xf08a2, fontFamily: 'MaterialIcons'); + + /// face_3 — material icon named "face 3". + static const IconData face_3 = IconData(0xf0860, fontFamily: 'MaterialIcons'); + + /// face_3 — material icon named "face 3" (sharp). + static const IconData face_3_sharp = IconData(0xf083c, fontFamily: 'MaterialIcons'); + + /// face_3 — material icon named "face 3" (round). + static const IconData face_3_rounded = IconData(0xf0885, fontFamily: 'MaterialIcons'); + + /// face_3 — material icon named "face 3" (outlined). + static const IconData face_3_outlined = IconData(0xf08a3, fontFamily: 'MaterialIcons'); + + /// face_4 — material icon named "face 4". + static const IconData face_4 = IconData(0xf0861, fontFamily: 'MaterialIcons'); + + /// face_4 — material icon named "face 4" (sharp). + static const IconData face_4_sharp = IconData(0xf083d, fontFamily: 'MaterialIcons'); + + /// face_4 — material icon named "face 4" (round). + static const IconData face_4_rounded = IconData(0xf0886, fontFamily: 'MaterialIcons'); + + /// face_4 — material icon named "face 4" (outlined). + static const IconData face_4_outlined = IconData(0xf08a4, fontFamily: 'MaterialIcons'); + + /// face_5 — material icon named "face 5". + static const IconData face_5 = IconData(0xf0862, fontFamily: 'MaterialIcons'); + + /// face_5 — material icon named "face 5" (sharp). + static const IconData face_5_sharp = IconData(0xf083e, fontFamily: 'MaterialIcons'); + + /// face_5 — material icon named "face 5" (round). + static const IconData face_5_rounded = IconData(0xf0887, fontFamily: 'MaterialIcons'); + + /// face_5 — material icon named "face 5" (outlined). + static const IconData face_5_outlined = IconData(0xf08a5, fontFamily: 'MaterialIcons'); + + /// face_6 — material icon named "face 6". + static const IconData face_6 = IconData(0xf0863, fontFamily: 'MaterialIcons'); + + /// face_6 — material icon named "face 6" (sharp). + static const IconData face_6_sharp = IconData(0xf083f, fontFamily: 'MaterialIcons'); + + /// face_6 — material icon named "face 6" (round). + static const IconData face_6_rounded = IconData(0xf0888, fontFamily: 'MaterialIcons'); + + /// face_6 — material icon named "face 6" (outlined). + static const IconData face_6_outlined = IconData(0xf08a6, fontFamily: 'MaterialIcons'); + /// face_retouching_natural — material icon named "face retouching natural". static const IconData face_retouching_natural = IconData(0xe253, fontFamily: 'MaterialIcons'); @@ -9075,6 +9237,9 @@ class Icons { /// file_upload — material icon named "file upload" (outlined). static const IconData file_upload_outlined = IconData(0xf05d, fontFamily: 'MaterialIcons'); + /// file_upload_off — material icon named "file upload off". + static const IconData file_upload_off = IconData(0xf0864, fontFamily: 'MaterialIcons'); + /// filter — material icon named "filter". static const IconData filter = IconData(0xe26f, fontFamily: 'MaterialIcons'); @@ -9730,16 +9895,28 @@ class Icons { static const IconData flood_outlined = IconData(0xf06f3, fontFamily: 'MaterialIcons'); /// flourescent — material icon named "flourescent". - static const IconData flourescent = IconData(0xe29f, fontFamily: 'MaterialIcons'); + static const IconData flourescent = IconData(0xf0865, fontFamily: 'MaterialIcons'); /// flourescent — material icon named "flourescent" (sharp). - static const IconData flourescent_sharp = IconData(0xe99a, fontFamily: 'MaterialIcons'); + static const IconData flourescent_sharp = IconData(0xf0840, fontFamily: 'MaterialIcons'); /// flourescent — material icon named "flourescent" (round). - static const IconData flourescent_rounded = IconData(0xf779, fontFamily: 'MaterialIcons'); + static const IconData flourescent_rounded = IconData(0xf0889, fontFamily: 'MaterialIcons'); /// flourescent — material icon named "flourescent" (outlined). - static const IconData flourescent_outlined = IconData(0xf08c, fontFamily: 'MaterialIcons'); + static const IconData flourescent_outlined = IconData(0xf08a7, fontFamily: 'MaterialIcons'); + + /// fluorescent — material icon named "fluorescent". + static const IconData fluorescent = IconData(0xf0865, fontFamily: 'MaterialIcons'); + + /// fluorescent — material icon named "fluorescent" (sharp). + static const IconData fluorescent_sharp = IconData(0xf0840, fontFamily: 'MaterialIcons'); + + /// fluorescent — material icon named "fluorescent" (round). + static const IconData fluorescent_rounded = IconData(0xf0889, fontFamily: 'MaterialIcons'); + + /// fluorescent — material icon named "fluorescent" (outlined). + static const IconData fluorescent_outlined = IconData(0xf08a7, fontFamily: 'MaterialIcons'); /// flutter_dash — material icon named "flutter dash". static const IconData flutter_dash = IconData(0xe2a0, fontFamily: 'MaterialIcons'); @@ -9960,6 +10137,9 @@ class Icons { /// fork_right — material icon named "fork right" (outlined). static const IconData fork_right_outlined = IconData(0xf0605, fontFamily: 'MaterialIcons'); + /// forklift — material icon named "forklift". + static const IconData forklift = IconData(0xf0866, fontFamily: 'MaterialIcons'); + /// format_align_center — material icon named "format align center". static const IconData format_align_center = IconData(0xe2ab, fontFamily: 'MaterialIcons'); @@ -10128,6 +10308,9 @@ class Icons { /// format_list_bulleted — material icon named "format list bulleted" (outlined). static const IconData format_list_bulleted_outlined = IconData(0xf0a5, fontFamily: 'MaterialIcons', matchTextDirection: true); + /// format_list_bulleted_add — material icon named "format list bulleted add". + static const IconData format_list_bulleted_add = IconData(0xf0867, fontFamily: 'MaterialIcons'); + /// format_list_numbered — material icon named "format list numbered". static const IconData format_list_numbered = IconData(0xe2b9, fontFamily: 'MaterialIcons'); @@ -10404,6 +10587,9 @@ class Icons { /// front_hand — material icon named "front hand" (outlined). static const IconData front_hand_outlined = IconData(0xf0609, fontFamily: 'MaterialIcons'); + /// front_loader — material icon named "front loader". + static const IconData front_loader = IconData(0xf0868, fontFamily: 'MaterialIcons'); + /// fullscreen — material icon named "fullscreen". static const IconData fullscreen = IconData(0xe2cb, fontFamily: 'MaterialIcons'); @@ -10908,6 +11094,30 @@ class Icons { /// groups — material icon named "groups" (outlined). static const IconData groups_outlined = IconData(0xf0db, fontFamily: 'MaterialIcons'); + /// groups_2 — material icon named "groups 2". + static const IconData groups_2 = IconData(0xf0869, fontFamily: 'MaterialIcons'); + + /// groups_2 — material icon named "groups 2" (sharp). + static const IconData groups_2_sharp = IconData(0xf0841, fontFamily: 'MaterialIcons'); + + /// groups_2 — material icon named "groups 2" (round). + static const IconData groups_2_rounded = IconData(0xf088a, fontFamily: 'MaterialIcons'); + + /// groups_2 — material icon named "groups 2" (outlined). + static const IconData groups_2_outlined = IconData(0xf08a8, fontFamily: 'MaterialIcons'); + + /// groups_3 — material icon named "groups 3". + static const IconData groups_3 = IconData(0xf086a, fontFamily: 'MaterialIcons'); + + /// groups_3 — material icon named "groups 3" (sharp). + static const IconData groups_3_sharp = IconData(0xf0842, fontFamily: 'MaterialIcons'); + + /// groups_3 — material icon named "groups 3" (round). + static const IconData groups_3_rounded = IconData(0xf088b, fontFamily: 'MaterialIcons'); + + /// groups_3 — material icon named "groups 3" (outlined). + static const IconData groups_3_outlined = IconData(0xf08a9, fontFamily: 'MaterialIcons'); + /// h_mobiledata — material icon named "h mobiledata". static const IconData h_mobiledata = IconData(0xe2ef, fontFamily: 'MaterialIcons'); @@ -13980,6 +14190,18 @@ class Icons { /// lyrics — material icon named "lyrics" (outlined). static const IconData lyrics_outlined = IconData(0xf06f9, fontFamily: 'MaterialIcons'); + /// macro_off — material icon named "macro off". + static const IconData macro_off = IconData(0xf086b, fontFamily: 'MaterialIcons'); + + /// macro_off — material icon named "macro off" (sharp). + static const IconData macro_off_sharp = IconData(0xf0843, fontFamily: 'MaterialIcons'); + + /// macro_off — material icon named "macro off" (round). + static const IconData macro_off_rounded = IconData(0xf088c, fontFamily: 'MaterialIcons'); + + /// macro_off — material icon named "macro off" (outlined). + static const IconData macro_off_outlined = IconData(0xf08aa, fontFamily: 'MaterialIcons'); + /// mail — material icon named "mail". static const IconData mail = IconData(0xe3c3, fontFamily: 'MaterialIcons'); @@ -14040,6 +14262,42 @@ class Icons { /// man — material icon named "man" (outlined). static const IconData man_outlined = IconData(0xf0630, fontFamily: 'MaterialIcons'); + /// man_2 — material icon named "man 2". + static const IconData man_2 = IconData(0xf086c, fontFamily: 'MaterialIcons'); + + /// man_2 — material icon named "man 2" (sharp). + static const IconData man_2_sharp = IconData(0xf0844, fontFamily: 'MaterialIcons'); + + /// man_2 — material icon named "man 2" (round). + static const IconData man_2_rounded = IconData(0xf088d, fontFamily: 'MaterialIcons'); + + /// man_2 — material icon named "man 2" (outlined). + static const IconData man_2_outlined = IconData(0xf08ab, fontFamily: 'MaterialIcons'); + + /// man_3 — material icon named "man 3". + static const IconData man_3 = IconData(0xf086d, fontFamily: 'MaterialIcons'); + + /// man_3 — material icon named "man 3" (sharp). + static const IconData man_3_sharp = IconData(0xf0845, fontFamily: 'MaterialIcons'); + + /// man_3 — material icon named "man 3" (round). + static const IconData man_3_rounded = IconData(0xf088e, fontFamily: 'MaterialIcons'); + + /// man_3 — material icon named "man 3" (outlined). + static const IconData man_3_outlined = IconData(0xf08ac, fontFamily: 'MaterialIcons'); + + /// man_4 — material icon named "man 4". + static const IconData man_4 = IconData(0xf086e, fontFamily: 'MaterialIcons'); + + /// man_4 — material icon named "man 4" (sharp). + static const IconData man_4_sharp = IconData(0xf0846, fontFamily: 'MaterialIcons'); + + /// man_4 — material icon named "man 4" (round). + static const IconData man_4_rounded = IconData(0xf088f, fontFamily: 'MaterialIcons'); + + /// man_4 — material icon named "man 4" (outlined). + static const IconData man_4_outlined = IconData(0xf08ad, fontFamily: 'MaterialIcons'); + /// manage_accounts — material icon named "manage accounts". static const IconData manage_accounts = IconData(0xe3c6, fontFamily: 'MaterialIcons'); @@ -15084,6 +15342,9 @@ class Icons { /// movie_creation — material icon named "movie creation" (outlined). static const IconData movie_creation_outlined = IconData(0xf1f3, fontFamily: 'MaterialIcons'); + /// movie_edit — material icon named "movie edit". + static const IconData movie_edit = IconData(0xf08b9, fontFamily: 'MaterialIcons'); + /// movie_filter — material icon named "movie filter". static const IconData movie_filter = IconData(0xe40f, fontFamily: 'MaterialIcons'); @@ -16434,6 +16695,9 @@ class Icons { /// palette — material icon named "palette" (outlined). static const IconData palette_outlined = IconData(0xf24f, fontFamily: 'MaterialIcons'); + /// pallet — material icon named "pallet". + static const IconData pallet = IconData(0xf086f, fontFamily: 'MaterialIcons'); + /// pan_tool — material icon named "pan tool". static const IconData pan_tool = IconData(0xe46c, fontFamily: 'MaterialIcons'); @@ -16986,6 +17250,42 @@ class Icons { /// person — material icon named "person" (outlined). static const IconData person_outlined = IconData(0xf27b, fontFamily: 'MaterialIcons'); + /// person_2 — material icon named "person 2". + static const IconData person_2 = IconData(0xf0870, fontFamily: 'MaterialIcons'); + + /// person_2 — material icon named "person 2" (sharp). + static const IconData person_2_sharp = IconData(0xf0847, fontFamily: 'MaterialIcons'); + + /// person_2 — material icon named "person 2" (round). + static const IconData person_2_rounded = IconData(0xf0890, fontFamily: 'MaterialIcons'); + + /// person_2 — material icon named "person 2" (outlined). + static const IconData person_2_outlined = IconData(0xf08ae, fontFamily: 'MaterialIcons'); + + /// person_3 — material icon named "person 3". + static const IconData person_3 = IconData(0xf0871, fontFamily: 'MaterialIcons'); + + /// person_3 — material icon named "person 3" (sharp). + static const IconData person_3_sharp = IconData(0xf0848, fontFamily: 'MaterialIcons'); + + /// person_3 — material icon named "person 3" (round). + static const IconData person_3_rounded = IconData(0xf0891, fontFamily: 'MaterialIcons'); + + /// person_3 — material icon named "person 3" (outlined). + static const IconData person_3_outlined = IconData(0xf08af, fontFamily: 'MaterialIcons'); + + /// person_4 — material icon named "person 4". + static const IconData person_4 = IconData(0xf0872, fontFamily: 'MaterialIcons'); + + /// person_4 — material icon named "person 4" (sharp). + static const IconData person_4_sharp = IconData(0xf0849, fontFamily: 'MaterialIcons'); + + /// person_4 — material icon named "person 4" (round). + static const IconData person_4_rounded = IconData(0xf0892, fontFamily: 'MaterialIcons'); + + /// person_4 — material icon named "person 4" (outlined). + static const IconData person_4_outlined = IconData(0xf08b0, fontFamily: 'MaterialIcons'); + /// person_add — material icon named "person add". static const IconData person_add = IconData(0xe492, fontFamily: 'MaterialIcons'); @@ -18267,6 +18567,18 @@ class Icons { /// psychology — material icon named "psychology" (outlined). static const IconData psychology_outlined = IconData(0xf2d2, fontFamily: 'MaterialIcons'); + /// psychology_alt — material icon named "psychology alt". + static const IconData psychology_alt = IconData(0xf0873, fontFamily: 'MaterialIcons'); + + /// psychology_alt — material icon named "psychology alt" (sharp). + static const IconData psychology_alt_sharp = IconData(0xf084a, fontFamily: 'MaterialIcons'); + + /// psychology_alt — material icon named "psychology alt" (round). + static const IconData psychology_alt_rounded = IconData(0xf0893, fontFamily: 'MaterialIcons'); + + /// psychology_alt — material icon named "psychology alt" (outlined). + static const IconData psychology_alt_outlined = IconData(0xf08b1, fontFamily: 'MaterialIcons'); + /// public — material icon named "public". static const IconData public = IconData(0xe4f0, fontFamily: 'MaterialIcons'); @@ -18711,6 +19023,9 @@ class Icons { /// real_estate_agent — material icon named "real estate agent" (outlined). static const IconData real_estate_agent_outlined = IconData(0xf2ee, fontFamily: 'MaterialIcons'); + /// rebase_edit — material icon named "rebase edit". + static const IconData rebase_edit = IconData(0xf0874, fontFamily: 'MaterialIcons'); + /// receipt — material icon named "receipt". static const IconData receipt = IconData(0xe50c, fontFamily: 'MaterialIcons'); @@ -18987,6 +19302,18 @@ class Icons { /// reorder — material icon named "reorder" (outlined). static const IconData reorder_outlined = IconData(0xf301, fontFamily: 'MaterialIcons'); + /// repartition — material icon named "repartition". + static const IconData repartition = IconData(0xf0875, fontFamily: 'MaterialIcons'); + + /// repartition — material icon named "repartition" (sharp). + static const IconData repartition_sharp = IconData(0xf084b, fontFamily: 'MaterialIcons'); + + /// repartition — material icon named "repartition" (round). + static const IconData repartition_rounded = IconData(0xf0894, fontFamily: 'MaterialIcons'); + + /// repartition — material icon named "repartition" (outlined). + static const IconData repartition_outlined = IconData(0xf08b2, fontFamily: 'MaterialIcons'); + /// repeat — material icon named "repeat". static const IconData repeat = IconData(0xe51f, fontFamily: 'MaterialIcons'); @@ -20631,6 +20958,18 @@ class Icons { /// severe_cold — material icon named "severe cold" (outlined). static const IconData severe_cold_outlined = IconData(0xf0712, fontFamily: 'MaterialIcons'); + /// shape_line — material icon named "shape line". + static const IconData shape_line = IconData(0xf0876, fontFamily: 'MaterialIcons'); + + /// shape_line — material icon named "shape line" (sharp). + static const IconData shape_line_sharp = IconData(0xf084c, fontFamily: 'MaterialIcons'); + + /// shape_line — material icon named "shape line" (round). + static const IconData shape_line_rounded = IconData(0xf0895, fontFamily: 'MaterialIcons'); + + /// shape_line — material icon named "shape line" (outlined). + static const IconData shape_line_outlined = IconData(0xf08b3, fontFamily: 'MaterialIcons'); + /// share — material icon named "share". static const IconData share = IconData(0xe593, fontFamily: 'MaterialIcons'); @@ -20667,6 +21006,9 @@ class Icons { /// share_location — material icon named "share location" (outlined). static const IconData share_location_outlined = IconData(0xf377, fontFamily: 'MaterialIcons'); + /// shelves — material icon named "shelves". + static const IconData shelves = IconData(0xf0877, fontFamily: 'MaterialIcons'); + /// shield — material icon named "shield". static const IconData shield = IconData(0xe596, fontFamily: 'MaterialIcons'); @@ -24144,6 +24486,9 @@ class Icons { /// trip_origin — material icon named "trip origin" (outlined). static const IconData trip_origin_outlined = IconData(0xf463, fontFamily: 'MaterialIcons'); + /// trolley — material icon named "trolley". + static const IconData trolley = IconData(0xf0878, fontFamily: 'MaterialIcons'); + /// troubleshoot — material icon named "troubleshoot". static const IconData troubleshoot = IconData(0xf07ce, fontFamily: 'MaterialIcons'); @@ -24432,6 +24777,18 @@ class Icons { /// unfold_less — material icon named "unfold less" (outlined). static const IconData unfold_less_outlined = IconData(0xf470, fontFamily: 'MaterialIcons'); + /// unfold_less_double — material icon named "unfold less double". + static const IconData unfold_less_double = IconData(0xf0879, fontFamily: 'MaterialIcons'); + + /// unfold_less_double — material icon named "unfold less double" (sharp). + static const IconData unfold_less_double_sharp = IconData(0xf084d, fontFamily: 'MaterialIcons'); + + /// unfold_less_double — material icon named "unfold less double" (round). + static const IconData unfold_less_double_rounded = IconData(0xf0896, fontFamily: 'MaterialIcons'); + + /// unfold_less_double — material icon named "unfold less double" (outlined). + static const IconData unfold_less_double_outlined = IconData(0xf08b4, fontFamily: 'MaterialIcons'); + /// unfold_more — material icon named "unfold more". static const IconData unfold_more = IconData(0xe68e, fontFamily: 'MaterialIcons'); @@ -24444,6 +24801,18 @@ class Icons { /// unfold_more — material icon named "unfold more" (outlined). static const IconData unfold_more_outlined = IconData(0xf471, fontFamily: 'MaterialIcons'); + /// unfold_more_double — material icon named "unfold more double". + static const IconData unfold_more_double = IconData(0xf087a, fontFamily: 'MaterialIcons'); + + /// unfold_more_double — material icon named "unfold more double" (sharp). + static const IconData unfold_more_double_sharp = IconData(0xf084e, fontFamily: 'MaterialIcons'); + + /// unfold_more_double — material icon named "unfold more double" (round). + static const IconData unfold_more_double_rounded = IconData(0xf0897, fontFamily: 'MaterialIcons'); + + /// unfold_more_double — material icon named "unfold more double" (outlined). + static const IconData unfold_more_double_outlined = IconData(0xf08b5, fontFamily: 'MaterialIcons'); + /// unpublished — material icon named "unpublished". static const IconData unpublished = IconData(0xe68f, fontFamily: 'MaterialIcons'); @@ -24756,6 +25125,18 @@ class Icons { /// video_camera_front — material icon named "video camera front" (outlined). static const IconData video_camera_front_outlined = IconData(0xf486, fontFamily: 'MaterialIcons'); + /// video_chat — material icon named "video chat". + static const IconData video_chat = IconData(0xf087b, fontFamily: 'MaterialIcons'); + + /// video_chat — material icon named "video chat" (sharp). + static const IconData video_chat_sharp = IconData(0xf084f, fontFamily: 'MaterialIcons'); + + /// video_chat — material icon named "video chat" (round). + static const IconData video_chat_rounded = IconData(0xf0898, fontFamily: 'MaterialIcons'); + + /// video_chat — material icon named "video chat" (outlined). + static const IconData video_chat_outlined = IconData(0xf08b6, fontFamily: 'MaterialIcons'); + /// video_collection — material icon named "video collection". static const IconData video_collection = IconData(0xe6a5, fontFamily: 'MaterialIcons'); @@ -25689,6 +26070,15 @@ class Icons { /// web_stories — material icon named "web stories". static const IconData web_stories = IconData(0xe6e0, fontFamily: 'MaterialIcons'); + /// web_stories — material icon named "web stories" (sharp). + static const IconData web_stories_sharp = IconData(0xf0850, fontFamily: 'MaterialIcons'); + + /// web_stories — material icon named "web stories" (round). + static const IconData web_stories_rounded = IconData(0xf0899, fontFamily: 'MaterialIcons'); + + /// web_stories — material icon named "web stories" (outlined). + static const IconData web_stories_outlined = IconData(0xf08b7, fontFamily: 'MaterialIcons'); + /// webhook — material icon named "webhook". static const IconData webhook = IconData(0xf05a4, fontFamily: 'MaterialIcons'); @@ -25737,18 +26127,6 @@ class Icons { /// west — material icon named "west" (outlined). static const IconData west_outlined = IconData(0xf4c3, fontFamily: 'MaterialIcons'); - /// whatsapp — material icon named "whatsapp". - static const IconData whatsapp = IconData(0xf05a6, fontFamily: 'MaterialIcons'); - - /// whatsapp — material icon named "whatsapp" (sharp). - static const IconData whatsapp_sharp = IconData(0xf04ab, fontFamily: 'MaterialIcons'); - - /// whatsapp — material icon named "whatsapp" (round). - static const IconData whatsapp_rounded = IconData(0xf03b8, fontFamily: 'MaterialIcons'); - - /// whatsapp — material icon named "whatsapp" (outlined). - static const IconData whatsapp_outlined = IconData(0xf0699, fontFamily: 'MaterialIcons'); - /// whatshot — material icon named "whatshot". static const IconData whatshot = IconData(0xe6e3, fontFamily: 'MaterialIcons'); @@ -26058,6 +26436,18 @@ class Icons { /// woman — material icon named "woman" (outlined). static const IconData woman_outlined = IconData(0xf069e, fontFamily: 'MaterialIcons'); + /// woman_2 — material icon named "woman 2". + static const IconData woman_2 = IconData(0xf087c, fontFamily: 'MaterialIcons'); + + /// woman_2 — material icon named "woman 2" (sharp). + static const IconData woman_2_sharp = IconData(0xf0851, fontFamily: 'MaterialIcons'); + + /// woman_2 — material icon named "woman 2" (round). + static const IconData woman_2_rounded = IconData(0xf089a, fontFamily: 'MaterialIcons'); + + /// woman_2 — material icon named "woman 2" (outlined). + static const IconData woman_2_outlined = IconData(0xf08b8, fontFamily: 'MaterialIcons'); + /// woo_commerce — material icon named "woo commerce". static const IconData woo_commerce = IconData(0xf05ac, fontFamily: 'MaterialIcons'); diff --git a/packages/flutter/test/material/icons_test.dart b/packages/flutter/test/material/icons_test.dart index a2a792aef8cc3..483be01ec82ce 100644 --- a/packages/flutter/test/material/icons_test.dart +++ b/packages/flutter/test/material/icons_test.dart @@ -122,6 +122,27 @@ void main() { await expectLater(find.byType(Wrap), matchesGoldenFile('test.icons.sample3.png')); }, skip: isBrowser); // https://github.com/flutter/flutter/issues/39998 + + // Regression test for https://github.com/flutter/flutter/issues/103202. + testWidgets('Another sample of icons look as expected', (WidgetTester tester) async { + await _loadIconFont(); + + await tester.pumpWidget(MaterialApp( + home: IconTheme( + data: const IconThemeData(size: 200), + child: Wrap( + children: const [ + Icon(Icons.repeat_on), + Icon(Icons.repeat_on_outlined), + Icon(Icons.repeat_on_rounded), + Icon(Icons.repeat_on_sharp), + ], + ), + ), + )); + + await expectLater(find.byType(Wrap), matchesGoldenFile('test.icons.sample4.png')); + }, skip: isBrowser); // https://github.com/flutter/flutter/issues/39998 } // Loads the cached material icon font. From dca85127e622cb21100be82fd263fa2eb76ed6f1 Mon Sep 17 00:00:00 2001 From: engine-flutter-autoroll Date: Wed, 7 Sep 2022 13:34:08 -0400 Subject: [PATCH 06/32] Roll Flutter Engine from c0a06da6b228 to bc69a4463504 (1 revision) (#111111) --- bin/internal/engine.version | 2 +- bin/internal/fuchsia-linux.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/internal/engine.version b/bin/internal/engine.version index 789e74016159b..5762ac7ff5925 100644 --- a/bin/internal/engine.version +++ b/bin/internal/engine.version @@ -1 +1 @@ -c0a06da6b228eb8c777f99cbab401d2f644fbc68 +bc69a4463504bb5a6a81338ea75612d0aeba9abf diff --git a/bin/internal/fuchsia-linux.version b/bin/internal/fuchsia-linux.version index d8a0fc856f427..2703e7465e071 100644 --- a/bin/internal/fuchsia-linux.version +++ b/bin/internal/fuchsia-linux.version @@ -1 +1 @@ -r45MRYVf5_xaCG8bvxdKFwoZtHfF8FtmUzCYGHwuZXQC +nHBOdXRdrHSKPhszb1_gYHMgF_P0j1cmwpfQdJI4gmgC From c5890f0c23eef4fa38e2a574a5d04aa625d2b91b Mon Sep 17 00:00:00 2001 From: Alex Wallen Date: Wed, 7 Sep 2022 11:12:51 -0700 Subject: [PATCH 07/32] [macOS] Add `platform_view` example. (#111005) --- examples/platform_view/lib/main.dart | 5 +- examples/platform_view/macos/.gitignore | 7 + .../macos/Flutter/Flutter-Debug.xcconfig | 1 + .../macos/Flutter/Flutter-Release.xcconfig | 1 + .../macos/Runner.xcodeproj/project.pbxproj | 581 ++++++++++++++++++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 87 +++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../macos/Runner/AppDelegate.swift | 13 + .../macos/Runner/Base.lproj/MainMenu.xib | 343 +++++++++++ .../macos/Runner/Configs/AppInfo.xcconfig | 14 + .../macos/Runner/Configs/Debug.xcconfig | 2 + .../macos/Runner/Configs/Release.xcconfig | 2 + .../macos/Runner/Configs/Warnings.xcconfig | 13 + .../macos/Runner/DebugProfile.entitlements | 12 + .../platform_view/macos/Runner/Info.plist | 32 + .../macos/Runner/MainFlutterWindow.swift | 38 ++ .../macos/Runner/PlatformViewController.swift | 46 ++ .../macos/Runner/PlatformViewController.xib | 103 ++++ .../macos/Runner/Release.entitlements | 8 + 21 files changed, 1329 insertions(+), 2 deletions(-) create mode 100644 examples/platform_view/macos/.gitignore create mode 100644 examples/platform_view/macos/Flutter/Flutter-Debug.xcconfig create mode 100644 examples/platform_view/macos/Flutter/Flutter-Release.xcconfig create mode 100644 examples/platform_view/macos/Runner.xcodeproj/project.pbxproj create mode 100644 examples/platform_view/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 examples/platform_view/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 examples/platform_view/macos/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 examples/platform_view/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 examples/platform_view/macos/Runner/AppDelegate.swift create mode 100644 examples/platform_view/macos/Runner/Base.lproj/MainMenu.xib create mode 100644 examples/platform_view/macos/Runner/Configs/AppInfo.xcconfig create mode 100644 examples/platform_view/macos/Runner/Configs/Debug.xcconfig create mode 100644 examples/platform_view/macos/Runner/Configs/Release.xcconfig create mode 100644 examples/platform_view/macos/Runner/Configs/Warnings.xcconfig create mode 100644 examples/platform_view/macos/Runner/DebugProfile.entitlements create mode 100644 examples/platform_view/macos/Runner/Info.plist create mode 100644 examples/platform_view/macos/Runner/MainFlutterWindow.swift create mode 100644 examples/platform_view/macos/Runner/PlatformViewController.swift create mode 100644 examples/platform_view/macos/Runner/PlatformViewController.xib create mode 100644 examples/platform_view/macos/Runner/Release.entitlements diff --git a/examples/platform_view/lib/main.dart b/examples/platform_view/lib/main.dart index 00b3c48163693..198dcdf2435e0 100644 --- a/examples/platform_view/lib/main.dart +++ b/examples/platform_view/lib/main.dart @@ -54,10 +54,11 @@ class _MyHomePageState extends State { case TargetPlatform.iOS: return const Text('Continue in iOS view'); case TargetPlatform.windows: - return const Text('Cotninue in Windows view'); + return const Text('Continue in Windows view'); + case TargetPlatform.macOS: + return const Text('Continue in macOS view'); case TargetPlatform.fuchsia: case TargetPlatform.linux: - case TargetPlatform.macOS: throw UnimplementedError('Platform not yet implemented'); } } diff --git a/examples/platform_view/macos/.gitignore b/examples/platform_view/macos/.gitignore new file mode 100644 index 0000000000000..746adbb6b9e14 --- /dev/null +++ b/examples/platform_view/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/examples/platform_view/macos/Flutter/Flutter-Debug.xcconfig b/examples/platform_view/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000000000..c2efd0b608ba8 --- /dev/null +++ b/examples/platform_view/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/platform_view/macos/Flutter/Flutter-Release.xcconfig b/examples/platform_view/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000000000..c2efd0b608ba8 --- /dev/null +++ b/examples/platform_view/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/platform_view/macos/Runner.xcodeproj/project.pbxproj b/examples/platform_view/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000000..e590827da5806 --- /dev/null +++ b/examples/platform_view/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,581 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 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 */; }; + F34FE5C128C663500068B3C3 /* PlatformViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F34FE5BF28C663500068B3C3 /* PlatformViewController.swift */; }; + F34FE5C228C663500068B3C3 /* PlatformViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F34FE5C028C663500068B3C3 /* PlatformViewController.xib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* platform_view.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = platform_view.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + F34FE5BF28C663500068B3C3 /* PlatformViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlatformViewController.swift; sourceTree = ""; }; + F34FE5C028C663500068B3C3 /* PlatformViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PlatformViewController.xib; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* platform_view.app */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + F34FE5BF28C663500068B3C3 /* PlatformViewController.swift */, + F34FE5C028C663500068B3C3 /* PlatformViewController.xib */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* platform_view.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + F34FE5C228C663500068B3C3 /* PlatformViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + F34FE5C128C663500068B3C3 /* PlatformViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/examples/platform_view/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/platform_view/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000000..18d981003d68d --- /dev/null +++ b/examples/platform_view/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/examples/platform_view/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/platform_view/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000000..28e99e79a14c7 --- /dev/null +++ b/examples/platform_view/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/platform_view/macos/Runner.xcworkspace/contents.xcworkspacedata b/examples/platform_view/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000..1d526a16ed0f1 --- /dev/null +++ b/examples/platform_view/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/platform_view/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/platform_view/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000000..18d981003d68d --- /dev/null +++ b/examples/platform_view/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/examples/platform_view/macos/Runner/AppDelegate.swift b/examples/platform_view/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000000000..d080d41951d35 --- /dev/null +++ b/examples/platform_view/macos/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +// 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 Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/examples/platform_view/macos/Runner/Base.lproj/MainMenu.xib b/examples/platform_view/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000000000..80e867a4e06b4 --- /dev/null +++ b/examples/platform_view/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/platform_view/macos/Runner/Configs/AppInfo.xcconfig b/examples/platform_view/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000000000..0ec4e5a45b55f --- /dev/null +++ b/examples/platform_view/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = platform_view + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = io.flutter.examples.platformView + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2022 io.flutter.examples. All rights reserved. diff --git a/examples/platform_view/macos/Runner/Configs/Debug.xcconfig b/examples/platform_view/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000000000..36b0fd9464f45 --- /dev/null +++ b/examples/platform_view/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/examples/platform_view/macos/Runner/Configs/Release.xcconfig b/examples/platform_view/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000000000..dff4f49561c81 --- /dev/null +++ b/examples/platform_view/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/examples/platform_view/macos/Runner/Configs/Warnings.xcconfig b/examples/platform_view/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000000000..42bcbf4780b18 --- /dev/null +++ b/examples/platform_view/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/examples/platform_view/macos/Runner/DebugProfile.entitlements b/examples/platform_view/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000000000..dddb8a30c851e --- /dev/null +++ b/examples/platform_view/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/examples/platform_view/macos/Runner/Info.plist b/examples/platform_view/macos/Runner/Info.plist new file mode 100644 index 0000000000000..4789daa6a443e --- /dev/null +++ b/examples/platform_view/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/examples/platform_view/macos/Runner/MainFlutterWindow.swift b/examples/platform_view/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000000000..9686c15bc80ad --- /dev/null +++ b/examples/platform_view/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,38 @@ +// 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 Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController.init() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + RegisterMethodChannel(registry: flutterViewController) + + super.awakeFromNib() + } + + func RegisterMethodChannel(registry: FlutterPluginRegistry) { + let registrar = registry.registrar(forPlugin: "platform_view") + let channel = FlutterMethodChannel(name: "samples.flutter.io/platform_view", + binaryMessenger: registrar.messenger) + channel.setMethodCallHandler({ (call, result) in + if (call.method == "switchView") { + let count = call.arguments as! Int + let controller: NSViewController = PlatformViewController( + withCount: count, + onClose: { platformViewController in + result(platformViewController.count) + } + ) + self.contentViewController?.presentAsSheet(controller) + } + }) + } +} diff --git a/examples/platform_view/macos/Runner/PlatformViewController.swift b/examples/platform_view/macos/Runner/PlatformViewController.swift new file mode 100644 index 0000000000000..34b242bdc5ffe --- /dev/null +++ b/examples/platform_view/macos/Runner/PlatformViewController.swift @@ -0,0 +1,46 @@ +// 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 Cocoa + +class PlatformViewController: NSViewController { + var count: Int = 0 + + var dispose: ((PlatformViewController)->())? + + @IBOutlet weak var label: NSTextField! + + var labelText: String { + get { + return "Button tapped \(self.count) time\(self.count != 1 ? "s" : "")." + } + } + + override func viewDidLoad() { + super.viewDidLoad() + self.label.stringValue = labelText + } + + public required init?(coder aDecoder: NSCoder) { + self.count = 0 + self.dispose = nil + super.init(coder: aDecoder) + } + + init(withCount count: Int, onClose dispose: ((PlatformViewController)->())?) { + self.count = count + self.dispose = dispose + super.init(nibName: nil, bundle: nil) + } + + @IBAction func pop(_ sender: Any) { + self.dispose?(self) + dismiss(self) + } + + @IBAction func increment(_ sender: Any) { + self.count += 1 + self.label.stringValue = labelText + } +} diff --git a/examples/platform_view/macos/Runner/PlatformViewController.xib b/examples/platform_view/macos/Runner/PlatformViewController.xib new file mode 100644 index 0000000000000..82a80df93e921 --- /dev/null +++ b/examples/platform_view/macos/Runner/PlatformViewController.xib @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/platform_view/macos/Runner/Release.entitlements b/examples/platform_view/macos/Runner/Release.entitlements new file mode 100644 index 0000000000000..852fa1a4728ae --- /dev/null +++ b/examples/platform_view/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + From dcf42ada0fb19df59f56fb5c85cafcc1c69c4b17 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 7 Sep 2022 11:59:04 -0700 Subject: [PATCH 08/32] Use raw fontFamilyFallback values without packages when constructing a merged TextStyle (#110887) --- .../flutter/lib/src/painting/text_style.dart | 8 ++++---- .../flutter/test/painting/text_style_test.dart | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart index 81cc9f07be365..e6cc49938bace 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart @@ -1059,7 +1059,7 @@ class TextStyle with Diagnosticable { decorationThickness: other.decorationThickness, debugLabel: mergedDebugLabel, fontFamily: other._fontFamily, - fontFamilyFallback: other.fontFamilyFallback, + fontFamilyFallback: other._fontFamilyFallback, package: other._package, overflow: other.overflow, ); @@ -1116,7 +1116,7 @@ class TextStyle with Diagnosticable { decorationThickness: t < 0.5 ? null : b.decorationThickness, debugLabel: lerpDebugLabel, fontFamily: t < 0.5 ? null : b._fontFamily, - fontFamilyFallback: t < 0.5 ? null : b.fontFamilyFallback, + fontFamilyFallback: t < 0.5 ? null : b._fontFamilyFallback, package: t < 0.5 ? null : b._package, overflow: t < 0.5 ? null : b.overflow, ); @@ -1147,7 +1147,7 @@ class TextStyle with Diagnosticable { decorationThickness: t < 0.5 ? a.decorationThickness : null, debugLabel: lerpDebugLabel, fontFamily: t < 0.5 ? a._fontFamily : null, - fontFamilyFallback: t < 0.5 ? a.fontFamilyFallback : null, + fontFamilyFallback: t < 0.5 ? a._fontFamilyFallback : null, package: t < 0.5 ? a._package : null, overflow: t < 0.5 ? a.overflow : null, ); @@ -1185,7 +1185,7 @@ class TextStyle with Diagnosticable { decorationThickness: ui.lerpDouble(a.decorationThickness ?? b.decorationThickness, b.decorationThickness ?? a.decorationThickness, t), debugLabel: lerpDebugLabel, fontFamily: t < 0.5 ? a._fontFamily : b._fontFamily, - fontFamilyFallback: t < 0.5 ? a.fontFamilyFallback : b.fontFamilyFallback, + fontFamilyFallback: t < 0.5 ? a._fontFamilyFallback : b._fontFamilyFallback, package: t < 0.5 ? a._package : b._package, overflow: t < 0.5 ? a.overflow : b.overflow, ); diff --git a/packages/flutter/test/painting/text_style_test.dart b/packages/flutter/test/painting/text_style_test.dart index 60da595bf6e2a..9038248e5f1c5 100644 --- a/packages/flutter/test/painting/text_style_test.dart +++ b/packages/flutter/test/painting/text_style_test.dart @@ -304,6 +304,23 @@ void main() { expect(s10.fontFamilyFallback, []); }); + test('TextStyle package font merge', () { + const TextStyle s1 = TextStyle(package: 'p', fontFamily: 'font1', fontFamilyFallback: ['fallback1']); + const TextStyle s2 = TextStyle(package: 'p', fontFamily: 'font2', fontFamilyFallback: ['fallback2']); + + final TextStyle emptyMerge = const TextStyle().merge(s1); + expect(emptyMerge.fontFamily, 'packages/p/font1'); + expect(emptyMerge.fontFamilyFallback, ['packages/p/fallback1']); + + final TextStyle lerp1 = TextStyle.lerp(s1, s2, 0)!; + expect(lerp1.fontFamily, 'packages/p/font1'); + expect(lerp1.fontFamilyFallback, ['packages/p/fallback1']); + + final TextStyle lerp2 = TextStyle.lerp(s1, s2, 1.0)!; + expect(lerp2.fontFamily, 'packages/p/font2'); + expect(lerp2.fontFamilyFallback, ['packages/p/fallback2']); + }); + test('TextStyle font family fallback', () { const TextStyle s1 = TextStyle(fontFamilyFallback: ['Roboto', 'test']); expect(s1.fontFamilyFallback![0], 'Roboto'); From 6c79dcca84342cdac8fbd9fad1abbb1188ee105b Mon Sep 17 00:00:00 2001 From: engine-flutter-autoroll Date: Wed, 7 Sep 2022 15:09:25 -0400 Subject: [PATCH 09/32] Roll Flutter Engine from bc69a4463504 to 611966bc3bcd (1 revision) (#111120) --- bin/internal/engine.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/internal/engine.version b/bin/internal/engine.version index 5762ac7ff5925..9693bb18e78d4 100644 --- a/bin/internal/engine.version +++ b/bin/internal/engine.version @@ -1 +1 @@ -bc69a4463504bb5a6a81338ea75612d0aeba9abf +611966bc3bcdfd0537415cd55577041bcde7ec45 From 4453ba0a4d3a6ce5fcf29bb39d1cb3d2360b6874 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 7 Sep 2022 12:28:52 -0700 Subject: [PATCH 10/32] Null safety migration of packages/flutter_tools/test/general.shard, part 2/2 (#110712) * Migrate packages/flutter_tools/test/general.shard, part 2/2 * Fix analysis * Fix tests * Fix analysis * Apply suggestions from code review Co-authored-by: Christopher Fujino Co-authored-by: Christopher Fujino --- .../lib/src/resident_runner.dart | 2 +- packages/flutter_tools/lib/src/vmservice.dart | 4 +- .../application_package_test.dart | 105 +++++----- .../test/general.shard/args_test.dart | 17 +- .../test/general.shard/emulator_test.dart | 36 +++- .../test/general.shard/hot_test.dart | 123 ++++++----- .../resident_web_runner_cold_test.dart | 32 ++- .../resident_web_runner_test.dart | 198 +++++++++--------- .../test/general.shard/vmservice_test.dart | 36 ++-- .../general.shard/web/devfs_web_test.dart | 101 +++++---- .../web/golden_comparator_process_test.dart | 12 +- ...crub_generated_plugin_registrant_test.dart | 12 +- .../web/web_asset_server_test.dart | 4 +- .../web/web_expression_compiler_test.dart | 14 +- 14 files changed, 343 insertions(+), 353 deletions(-) diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index de428242089a6..4b493d93c47b0 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -707,7 +707,7 @@ abstract class ResidentHandlers { } final List views = await device!.vmService!.getFlutterViews(); for (final FlutterView view in views) { - final Map? rasterData = + final Map? rasterData = await device.vmService!.renderFrameWithRasterStats( viewId: view.id, uiIsolateId: view.uiIsolate!.id, diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart index 1d1d5c7fc178e..95429336fe013 100644 --- a/packages/flutter_tools/lib/src/vmservice.dart +++ b/packages/flutter_tools/lib/src/vmservice.dart @@ -557,7 +557,7 @@ class FlutterVmService { /// for rasterization which is not reflective of how long the frame takes in /// production. This is primarily intended to be used to identify the layers /// that result in the most raster perf degradation. - Future?> renderFrameWithRasterStats({ + Future?> renderFrameWithRasterStats({ required String? viewId, required String? uiIsolateId, }) async { @@ -568,7 +568,7 @@ class FlutterVmService { 'viewId': viewId, }, ); - return response?.json as Map?; + return response?.json; } Future flutterDebugDumpApp({ diff --git a/packages/flutter_tools/test/general.shard/application_package_test.dart b/packages/flutter_tools/test/general.shard/application_package_test.dart index 5b94432d32cd9..fe1bb0fff416e 100644 --- a/packages/flutter_tools/test/general.shard/application_package_test.dart +++ b/packages/flutter_tools/test/general.shard/application_package_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'package:file/file.dart'; import 'package:file/memory.dart'; import 'package:flutter_tools/src/android/android_sdk.dart'; @@ -30,10 +28,10 @@ import '../src/fakes.dart'; void main() { group('Apk with partial Android SDK works', () { - FakeAndroidSdk sdk; - FakeProcessManager fakeProcessManager; - MemoryFileSystem fs; - Cache cache; + late FakeAndroidSdk sdk; + late FakeProcessManager fakeProcessManager; + late MemoryFileSystem fs; + late Cache cache; final Map overrides = { AndroidSdk: () => sdk, @@ -79,11 +77,10 @@ void main() { ) ); - final ApplicationPackage applicationPackage = await ApplicationPackageFactory.instance.getPackageForPlatform( + final ApplicationPackage applicationPackage = (await ApplicationPackageFactory.instance!.getPackageForPlatform( TargetPlatform.android_arm, - buildInfo: null, applicationBinary: apkFile, - ); + ))!; expect(applicationPackage.name, 'app.apk'); expect(applicationPackage, isA()); expect((applicationPackage as PrebuiltApplicationPackage).applicationPackage.path, apkFile.path); @@ -104,9 +101,8 @@ void main() { gradleWrapperDir.childFile('gradlew').writeAsStringSync('irrelevant'); gradleWrapperDir.childFile('gradlew.bat').writeAsStringSync('irrelevant'); - await ApplicationPackageFactory.instance.getPackageForPlatform( + await ApplicationPackageFactory.instance!.getPackageForPlatform( TargetPlatform.android_arm, - buildInfo: null, applicationBinary: globals.fs.file('app.apk'), ); expect(fakeProcessManager, hasNoRemainingExpectations); @@ -116,19 +112,16 @@ void main() { final AndroidSdkVersion sdkVersion = FakeAndroidSdkVersion(); sdk.latestVersion = sdkVersion; - await ApplicationPackageFactory.instance.getPackageForPlatform( + await ApplicationPackageFactory.instance!.getPackageForPlatform( TargetPlatform.android_arm, - buildInfo: null, ); expect(fakeProcessManager, hasNoRemainingExpectations); }, overrides: overrides); testWithoutContext('returns null when failed to extract manifest', () async { - final AndroidSdkVersion sdkVersion = FakeAndroidSdkVersion(); - sdk.latestVersion = sdkVersion; final Logger logger = BufferLogger.test(); - final AndroidApk androidApk = AndroidApk.fromApk( - null, + final AndroidApk? androidApk = AndroidApk.fromApk( + fs.file(''), processManager: fakeProcessManager, logger: logger, userMessages: UserMessages(), @@ -146,7 +139,7 @@ void main() { final ApkManifestData data = ApkManifestData.parseFromXmlDump( _aaptDataWithExplicitEnabledAndMainLauncherActivity, BufferLogger.test(), - ); + )!; expect(data, isNotNull); expect(data.packageName, 'io.flutter.examples.hello_world'); @@ -157,7 +150,7 @@ void main() { final ApkManifestData data = ApkManifestData.parseFromXmlDump( _aaptDataWithDefaultEnabledAndMainLauncherActivity, BufferLogger.test(), - ); + )!; expect(data, isNotNull); expect(data.packageName, 'io.flutter.examples.hello_world'); @@ -168,7 +161,7 @@ void main() { final ApkManifestData data = ApkManifestData.parseFromXmlDump( _aaptDataWithDistNamespace, BufferLogger.test(), - ); + )!; expect(data, isNotNull); expect(data.packageName, 'io.flutter.examples.hello_world'); @@ -177,7 +170,7 @@ void main() { testWithoutContext('Error when parsing manifest with no Activity that has enabled set to true nor has no value for its enabled field', () { final BufferLogger logger = BufferLogger.test(); - final ApkManifestData data = ApkManifestData.parseFromXmlDump( + final ApkManifestData? data = ApkManifestData.parseFromXmlDump( _aaptDataWithNoEnabledActivity, logger, ); @@ -191,7 +184,7 @@ void main() { testWithoutContext('Error when parsing manifest with no Activity that has action set to android.intent.action.MAIN', () { final BufferLogger logger = BufferLogger.test(); - final ApkManifestData data = ApkManifestData.parseFromXmlDump( + final ApkManifestData? data = ApkManifestData.parseFromXmlDump( _aaptDataWithNoMainActivity, logger, ); @@ -205,7 +198,7 @@ void main() { testWithoutContext('Error when parsing manifest with no Activity that has category set to android.intent.category.LAUNCHER', () { final BufferLogger logger = BufferLogger.test(); - final ApkManifestData data = ApkManifestData.parseFromXmlDump( + final ApkManifestData? data = ApkManifestData.parseFromXmlDump( _aaptDataWithNoLauncherActivity, logger, ); @@ -221,7 +214,7 @@ void main() { final ApkManifestData data = ApkManifestData.parseFromXmlDump( _aaptDataWithLauncherAndDefaultActivity, BufferLogger.test(), - ); + )!; expect(data, isNotNull); expect(data.packageName, 'io.flutter.examples.hello_world'); @@ -229,7 +222,7 @@ void main() { }); testWithoutContext('Parses manifest with missing application tag', () async { - final ApkManifestData data = ApkManifestData.parseFromXmlDump( + final ApkManifestData? data = ApkManifestData.parseFromXmlDump( _aaptDataWithoutApplication, BufferLogger.test(), ); @@ -239,8 +232,8 @@ void main() { }); group('PrebuiltIOSApp', () { - FakeOperatingSystemUtils os; - FakePlistParser testPlistParser; + late FakeOperatingSystemUtils os; + late FakePlistParser testPlistParser; final Map overrides = { FileSystem: () => MemoryFileSystem.test(), @@ -255,8 +248,8 @@ void main() { }); testUsingContext('Error on non-existing file', () { - final PrebuiltIOSApp iosApp = - IOSApp.fromPrebuiltApp(globals.fs.file('not_existing.ipa')) as PrebuiltIOSApp; + final PrebuiltIOSApp? iosApp = + IOSApp.fromPrebuiltApp(globals.fs.file('not_existing.ipa')) as PrebuiltIOSApp?; expect(iosApp, isNull); expect( testLogger.errorText, @@ -266,8 +259,8 @@ void main() { testUsingContext('Error on non-app-bundle folder', () { globals.fs.directory('regular_folder').createSync(); - final PrebuiltIOSApp iosApp = - IOSApp.fromPrebuiltApp(globals.fs.file('regular_folder')) as PrebuiltIOSApp; + final PrebuiltIOSApp? iosApp = + IOSApp.fromPrebuiltApp(globals.fs.file('regular_folder')) as PrebuiltIOSApp?; expect(iosApp, isNull); expect( testLogger.errorText, 'Folder "regular_folder" is not an app bundle.\n'); @@ -275,7 +268,7 @@ void main() { testUsingContext('Error on no info.plist', () { globals.fs.directory('bundle.app').createSync(); - final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(globals.fs.file('bundle.app')) as PrebuiltIOSApp; + final PrebuiltIOSApp? iosApp = IOSApp.fromPrebuiltApp(globals.fs.file('bundle.app')) as PrebuiltIOSApp?; expect(iosApp, isNull); expect( testLogger.errorText, @@ -286,7 +279,7 @@ void main() { testUsingContext('Error on bad info.plist', () { globals.fs.directory('bundle.app').createSync(); globals.fs.file('bundle.app/Info.plist').createSync(); - final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(globals.fs.file('bundle.app')) as PrebuiltIOSApp; + final PrebuiltIOSApp? iosApp = IOSApp.fromPrebuiltApp(globals.fs.file('bundle.app')) as PrebuiltIOSApp?; expect(iosApp, isNull); expect( testLogger.errorText, @@ -299,7 +292,7 @@ void main() { globals.fs.directory('bundle.app').createSync(); globals.fs.file('bundle.app/Info.plist').createSync(); testPlistParser.setProperty('CFBundleIdentifier', 'fooBundleId'); - final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(globals.fs.file('bundle.app')) as PrebuiltIOSApp; + final PrebuiltIOSApp iosApp = (IOSApp.fromPrebuiltApp(globals.fs.file('bundle.app')) as PrebuiltIOSApp?)!; expect(testLogger.errorText, isEmpty); expect(iosApp.uncompressedBundle.path, 'bundle.app'); expect(iosApp.id, 'fooBundleId'); @@ -309,7 +302,7 @@ void main() { testUsingContext('Bad ipa zip-file, no payload dir', () { globals.fs.file('app.ipa').createSync(); - final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(globals.fs.file('app.ipa')) as PrebuiltIOSApp; + final PrebuiltIOSApp? iosApp = IOSApp.fromPrebuiltApp(globals.fs.file('app.ipa')) as PrebuiltIOSApp?; expect(iosApp, isNull); expect( testLogger.errorText, @@ -330,7 +323,7 @@ void main() { globals.fs.directory(bundlePath1).createSync(recursive: true); globals.fs.directory(bundlePath2).createSync(recursive: true); }; - final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(globals.fs.file('app.ipa')) as PrebuiltIOSApp; + final PrebuiltIOSApp? iosApp = IOSApp.fromPrebuiltApp(globals.fs.file('app.ipa')) as PrebuiltIOSApp?; expect(iosApp, isNull); expect(testLogger.errorText, 'Invalid prebuilt iOS ipa. Does not contain a single app bundle.\n'); @@ -350,7 +343,7 @@ void main() { .file(globals.fs.path.join(bundleAppDir.path, 'Info.plist')) .createSync(); }; - final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(globals.fs.file('app.ipa')) as PrebuiltIOSApp; + final PrebuiltIOSApp iosApp = (IOSApp.fromPrebuiltApp(globals.fs.file('app.ipa')) as PrebuiltIOSApp?)!; expect(testLogger.errorText, isEmpty); expect(iosApp.uncompressedBundle.path, endsWith('bundle.app')); expect(iosApp.id, 'fooBundleId'); @@ -361,8 +354,8 @@ void main() { testUsingContext('returns null when there is no ios or .ios directory', () async { globals.fs.file('pubspec.yaml').createSync(); globals.fs.file('.packages').createSync(); - final BuildableIOSApp iosApp = await IOSApp.fromIosProject( - FlutterProject.fromDirectory(globals.fs.currentDirectory).ios, null) as BuildableIOSApp; + final BuildableIOSApp? iosApp = await IOSApp.fromIosProject( + FlutterProject.fromDirectory(globals.fs.currentDirectory).ios, null) as BuildableIOSApp?; expect(iosApp, null); }, overrides: overrides); @@ -371,8 +364,8 @@ void main() { globals.fs.file('pubspec.yaml').createSync(); globals.fs.file('.packages').createSync(); globals.fs.file('ios/FooBar.xcodeproj').createSync(recursive: true); - final BuildableIOSApp iosApp = await IOSApp.fromIosProject( - FlutterProject.fromDirectory(globals.fs.currentDirectory).ios, null) as BuildableIOSApp; + final BuildableIOSApp? iosApp = await IOSApp.fromIosProject( + FlutterProject.fromDirectory(globals.fs.currentDirectory).ios, null) as BuildableIOSApp?; expect(iosApp, null); }, overrides: overrides); @@ -381,8 +374,8 @@ void main() { globals.fs.file('pubspec.yaml').createSync(); globals.fs.file('.packages').createSync(); globals.fs.file('ios/Runner.xcodeproj').createSync(recursive: true); - final BuildableIOSApp iosApp = await IOSApp.fromIosProject( - FlutterProject.fromDirectory(globals.fs.currentDirectory).ios, null) as BuildableIOSApp; + final BuildableIOSApp? iosApp = await IOSApp.fromIosProject( + FlutterProject.fromDirectory(globals.fs.currentDirectory).ios, null) as BuildableIOSApp?; expect(iosApp, null); }, overrides: overrides); @@ -392,8 +385,8 @@ void main() { globals.fs.file('.packages').createSync(); final Directory project = globals.fs.directory('ios/Runner.xcodeproj')..createSync(recursive: true); project.childFile('project.pbxproj').createSync(); - final BuildableIOSApp iosApp = await IOSApp.fromIosProject( - FlutterProject.fromDirectory(globals.fs.currentDirectory).ios, null) as BuildableIOSApp; + final BuildableIOSApp? iosApp = await IOSApp.fromIosProject( + FlutterProject.fromDirectory(globals.fs.currentDirectory).ios, null) as BuildableIOSApp?; expect(iosApp, null); }, overrides: overrides); @@ -407,8 +400,8 @@ void main() { }; testUsingContext('Error on non-existing file', () { - final PrebuiltFuchsiaApp fuchsiaApp = - FuchsiaApp.fromPrebuiltApp(globals.fs.file('not_existing.far')) as PrebuiltFuchsiaApp; + final PrebuiltFuchsiaApp? fuchsiaApp = + FuchsiaApp.fromPrebuiltApp(globals.fs.file('not_existing.far')) as PrebuiltFuchsiaApp?; expect(fuchsiaApp, isNull); expect( testLogger.errorText, @@ -418,8 +411,8 @@ void main() { testUsingContext('Error on non-far file', () { globals.fs.directory('regular_folder').createSync(); - final PrebuiltFuchsiaApp fuchsiaApp = - FuchsiaApp.fromPrebuiltApp(globals.fs.file('regular_folder')) as PrebuiltFuchsiaApp; + final PrebuiltFuchsiaApp? fuchsiaApp = + FuchsiaApp.fromPrebuiltApp(globals.fs.file('regular_folder')) as PrebuiltFuchsiaApp?; expect(fuchsiaApp, isNull); expect( testLogger.errorText, @@ -429,7 +422,7 @@ void main() { testUsingContext('Success with far file', () { globals.fs.file('bundle.far').createSync(); - final PrebuiltFuchsiaApp fuchsiaApp = FuchsiaApp.fromPrebuiltApp(globals.fs.file('bundle.far')) as PrebuiltFuchsiaApp; + final PrebuiltFuchsiaApp fuchsiaApp = (FuchsiaApp.fromPrebuiltApp(globals.fs.file('bundle.far')) as PrebuiltFuchsiaApp?)!; expect(testLogger.errorText, isEmpty); expect(fuchsiaApp.id, 'bundle.far'); expect(fuchsiaApp.applicationPackage.path, globals.fs.file('bundle.far').path); @@ -438,7 +431,7 @@ void main() { testUsingContext('returns null when there is no fuchsia', () async { globals.fs.file('pubspec.yaml').createSync(); globals.fs.file('.packages').createSync(); - final BuildableFuchsiaApp fuchsiaApp = FuchsiaApp.fromFuchsiaProject(FlutterProject.fromDirectory(globals.fs.currentDirectory).fuchsia) as BuildableFuchsiaApp; + final BuildableFuchsiaApp? fuchsiaApp = FuchsiaApp.fromFuchsiaProject(FlutterProject.fromDirectory(globals.fs.currentDirectory).fuchsia) as BuildableFuchsiaApp?; expect(fuchsiaApp, null); }, overrides: overrides); @@ -707,7 +700,7 @@ N: android=http://schemas.android.com/apk/res/android '''; class FakeOperatingSystemUtils extends Fake implements OperatingSystemUtils { - void Function(File, Directory) onUnzip; + void Function(File, Directory)? onUnzip; @override void unzip(File file, Directory targetDirectory) { @@ -717,16 +710,16 @@ class FakeOperatingSystemUtils extends Fake implements OperatingSystemUtils { class FakeAndroidSdk extends Fake implements AndroidSdk { @override - bool platformToolsAvailable; + late bool platformToolsAvailable; @override - bool licensesAvailable; + late bool licensesAvailable; @override - AndroidSdkVersion latestVersion; + AndroidSdkVersion? latestVersion; } class FakeAndroidSdkVersion extends Fake implements AndroidSdkVersion { @override - String aaptPath; + late String aaptPath; } diff --git a/packages/flutter_tools/test/general.shard/args_test.dart b/packages/flutter_tools/test/general.shard/args_test.dart index 4725e37d2aa65..683a4df708811 100644 --- a/packages/flutter_tools/test/general.shard/args_test.dart +++ b/packages/flutter_tools/test/general.shard/args_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'package:args/args.dart'; import 'package:args/command_runner.dart'; import 'package:flutter_tools/executable.dart' as executable; @@ -111,7 +109,7 @@ void main() { }); } -void verifyCommandRunner(CommandRunner runner) { +void verifyCommandRunner(CommandRunner runner) { expect(runner.argParser, isNotNull, reason: '${runner.runtimeType} has no argParser'); expect(runner.argParser.allowsAnything, isFalse, reason: '${runner.runtimeType} allows anything'); expect(runner.argParser.allowTrailingOptions, isFalse, reason: '${runner.runtimeType} allows trailing options'); @@ -119,7 +117,7 @@ void verifyCommandRunner(CommandRunner runner) { runner.commands.values.forEach(verifyCommand); } -void verifyCommand(Command runner) { +void verifyCommand(Command runner) { expect(runner.argParser, isNotNull, reason: 'command ${runner.name} has no argParser'); verifyOptions(runner.name, runner.argParser.options.values); @@ -161,7 +159,7 @@ const String _needHelp = "Every option must have help explaining what it does, e const String _header = ' Comment: '; -void verifyOptions(String command, Iterable