From b4ae57c76df464c6d4aff597b6ab81f60a5878a6 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 08:59:58 -0800 Subject: [PATCH 01/13] Add note about compatibility with Flutter branches --- packages/animations/CHANGELOG.md | 7 +++++++ packages/animations/README.md | 2 ++ 2 files changed, 9 insertions(+) diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md index e0ccfcf2a1f6..6638cdac7c56 100644 --- a/packages/animations/CHANGELOG.md +++ b/packages/animations/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.0.0+4] - February 21, 2020 + +* Fix a typo in the changelog dates +* Add a note to the README that the `animations` package is not currently + compatible with Flutter's `stable` branch. + + ## [1.0.0+3] - February 18, 2020 * Update README.md to better describe Material motion diff --git a/packages/animations/README.md b/packages/animations/README.md index 3a6f046d4c7d..9372540e2f76 100644 --- a/packages/animations/README.md +++ b/packages/animations/README.md @@ -1,5 +1,7 @@ # High quality pre-built Animations for Flutter +***Note (Feb 21, 2020): The `animations` package is not yet compatible with Flutter's `stable` branch. At the moment, it can only be used with Flutter's `master`, `dev`, and `beta` branches.*** + This package contains pre-canned animations for commonly-desired effects. The animations can be customized with your content and dropped into your application to delight your users. To see examples of the following animations on a device or simulator: From 099a3d65ca5a9705e388c282a268014385d32511 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 09:20:47 -0800 Subject: [PATCH 02/13] Update pubspec yaml --- packages/animations/example/pubspec.yaml | 1 + packages/animations/pubspec.yaml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/animations/example/pubspec.yaml b/packages/animations/example/pubspec.yaml index e21b64541c2e..3f9d480fd4bb 100644 --- a/packages/animations/example/pubspec.yaml +++ b/packages/animations/example/pubspec.yaml @@ -5,6 +5,7 @@ version: 0.0.1 environment: sdk: ">=2.3.0 <3.0.0" + flutter: ^1.15.3 dependencies: flutter: diff --git a/packages/animations/pubspec.yaml b/packages/animations/pubspec.yaml index df317e69c8a9..8f034beba156 100644 --- a/packages/animations/pubspec.yaml +++ b/packages/animations/pubspec.yaml @@ -1,10 +1,11 @@ name: animations description: Fancy pre-built animations that can easily be integrated into any Flutter application. -version: 1.0.0+3 +version: 1.0.0+4 homepage: https://github.com/flutter/packages/tree/master/packages/animations environment: sdk: ">=2.2.2 <3.0.0" + flutter: ^1.15.3 dependencies: flutter: From 0d4fc105e8f7e1509d45c69fc6717a91b2ddc3f6 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 09:37:54 -0800 Subject: [PATCH 03/13] Fix issues --- .../example/lib/container_transition.dart | 25 +++++++++++++++---- .../example/lib/fade_through_transition.dart | 6 ++++- .../example/lib/shared_axis_transition.dart | 8 ++++-- packages/animations/example/pubspec.yaml | 1 - packages/animations/pubspec.yaml | 1 - 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/packages/animations/example/lib/container_transition.dart b/packages/animations/example/lib/container_transition.dart index 1af6d9508710..e51286f0344b 100644 --- a/packages/animations/example/lib/container_transition.dart +++ b/packages/animations/example/lib/container_transition.dart @@ -313,7 +313,10 @@ class _ExampleCard extends StatelessWidget { 'adipiscing elit, sed do eiusmod tempor.', style: Theme.of(context) .textTheme - .bodyText2 + // TODO(shihaohong): Remove this once Flutter stable adopts the modern + // Material text style nomenclature. + // ignore: deprecated_member_use + .body1 .copyWith(color: Colors.black54), ), ), @@ -359,7 +362,10 @@ class _SmallerCard extends StatelessWidget { children: [ Text( 'Title', - style: Theme.of(context).textTheme.headline6, + // TODO(shihaohong): Remove this once Flutter stable adopts the modern + // Material text style nomenclature. + // ignore: deprecated_member_use + style: Theme.of(context).textTheme.title, ), const SizedBox(height: 4), Text( @@ -409,7 +415,10 @@ class _ExampleSingleTile extends StatelessWidget { children: [ Text( 'Title', - style: Theme.of(context).textTheme.subtitle1, + // TODO(shihaohong): Remove this once Flutter stable adopts the modern + // Material text style nomenclature. + // ignore: deprecated_member_use + style: Theme.of(context).textTheme.subhead, ), const SizedBox(height: 8), Text( @@ -476,7 +485,10 @@ class _DetailsPage extends StatelessWidget { children: [ Text( 'Title', - style: Theme.of(context).textTheme.headline5.copyWith( + // TODO(shihaohong): Remove this once Flutter stable adopts the modern + // Material text style nomenclature. + // ignore: deprecated_member_use + style: Theme.of(context).textTheme.headline.copyWith( color: Colors.black54, fontSize: 30.0, ), @@ -484,7 +496,10 @@ class _DetailsPage extends StatelessWidget { const SizedBox(height: 10), Text( _loremIpsumParagraph, - style: Theme.of(context).textTheme.bodyText2.copyWith( + // TODO(shihaohong): Remove this once Flutter stable adopts the modern + // Material text style nomenclature. + // ignore: deprecated_member_use + style: Theme.of(context).textTheme.body1.copyWith( color: Colors.black54, height: 1.5, fontSize: 16.0, diff --git a/packages/animations/example/lib/fade_through_transition.dart b/packages/animations/example/lib/fade_through_transition.dart index 65e13322bb5c..11f2b096396d 100644 --- a/packages/animations/example/lib/fade_through_transition.dart +++ b/packages/animations/example/lib/fade_through_transition.dart @@ -5,6 +5,10 @@ import 'package:flutter/material.dart'; import 'package:animations/animations.dart'; +// TODO(shihaohong): Remove this once Flutter stable adopts the modern +// Material text style nomenclature. +// ignore: deprecated_member_use + /// The demo page for [FadeThroughTransition]. class FadeThroughTransitionDemo extends StatefulWidget { @override @@ -93,7 +97,7 @@ class _ExampleCard extends StatelessWidget { children: [ Text( '123 photos', - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.body2, ), Text( '123 photos', diff --git a/packages/animations/example/lib/shared_axis_transition.dart b/packages/animations/example/lib/shared_axis_transition.dart index 351ca5ecb590..7f230efc039d 100644 --- a/packages/animations/example/lib/shared_axis_transition.dart +++ b/packages/animations/example/lib/shared_axis_transition.dart @@ -5,6 +5,10 @@ import 'package:flutter/material.dart'; import 'package:animations/animations.dart'; +// TODO(shihaohong): Remove this once Flutter stable adopts the modern +// Material text style nomenclature. +// ignore: deprecated_member_use + /// The demo page for [SharedAxisPageTransitionsBuilder]. class SharedAxisTransitionDemo extends StatefulWidget { @override @@ -122,7 +126,7 @@ class _CoursePage extends StatelessWidget { const Padding(padding: EdgeInsets.symmetric(vertical: 8.0)), Text( 'Streamling your courses', - style: Theme.of(context).textTheme.headline5, + style: Theme.of(context).textTheme.headline, textAlign: TextAlign.center, ), const Padding(padding: EdgeInsets.symmetric(vertical: 5.0)), @@ -194,7 +198,7 @@ class _SignInPage extends StatelessWidget { Padding(padding: EdgeInsets.symmetric(vertical: maxHeight / 50)), Text( 'Hi David Park', - style: Theme.of(context).textTheme.headline5, + style: Theme.of(context).textTheme.headline, ), Padding(padding: EdgeInsets.symmetric(vertical: maxHeight / 50)), const Text( diff --git a/packages/animations/example/pubspec.yaml b/packages/animations/example/pubspec.yaml index 3f9d480fd4bb..e21b64541c2e 100644 --- a/packages/animations/example/pubspec.yaml +++ b/packages/animations/example/pubspec.yaml @@ -5,7 +5,6 @@ version: 0.0.1 environment: sdk: ">=2.3.0 <3.0.0" - flutter: ^1.15.3 dependencies: flutter: diff --git a/packages/animations/pubspec.yaml b/packages/animations/pubspec.yaml index 8f034beba156..c37843273607 100644 --- a/packages/animations/pubspec.yaml +++ b/packages/animations/pubspec.yaml @@ -5,7 +5,6 @@ homepage: https://github.com/flutter/packages/tree/master/packages/animations environment: sdk: ">=2.2.2 <3.0.0" - flutter: ^1.15.3 dependencies: flutter: From 652f520247617597b680924b89295aef74e9a786 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 09:39:15 -0800 Subject: [PATCH 04/13] Add rest of the analyzer ignore comments --- .../animations/example/lib/fade_through_transition.dart | 7 +++---- .../animations/example/lib/shared_axis_transition.dart | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/animations/example/lib/fade_through_transition.dart b/packages/animations/example/lib/fade_through_transition.dart index 11f2b096396d..c9b0f20bee5d 100644 --- a/packages/animations/example/lib/fade_through_transition.dart +++ b/packages/animations/example/lib/fade_through_transition.dart @@ -5,10 +5,6 @@ import 'package:flutter/material.dart'; import 'package:animations/animations.dart'; -// TODO(shihaohong): Remove this once Flutter stable adopts the modern -// Material text style nomenclature. -// ignore: deprecated_member_use - /// The demo page for [FadeThroughTransition]. class FadeThroughTransitionDemo extends StatefulWidget { @override @@ -97,6 +93,9 @@ class _ExampleCard extends StatelessWidget { children: [ Text( '123 photos', + // TODO(shihaohong): Remove this once Flutter stable adopts the modern + // Material text style nomenclature. + // ignore: deprecated_member_use style: Theme.of(context).textTheme.body2, ), Text( diff --git a/packages/animations/example/lib/shared_axis_transition.dart b/packages/animations/example/lib/shared_axis_transition.dart index 7f230efc039d..5b02d32369de 100644 --- a/packages/animations/example/lib/shared_axis_transition.dart +++ b/packages/animations/example/lib/shared_axis_transition.dart @@ -126,6 +126,9 @@ class _CoursePage extends StatelessWidget { const Padding(padding: EdgeInsets.symmetric(vertical: 8.0)), Text( 'Streamling your courses', + // TODO(shihaohong): Remove this once Flutter stable adopts the modern + // Material text style nomenclature. + // ignore: deprecated_member_use style: Theme.of(context).textTheme.headline, textAlign: TextAlign.center, ), @@ -198,6 +201,9 @@ class _SignInPage extends StatelessWidget { Padding(padding: EdgeInsets.symmetric(vertical: maxHeight / 50)), Text( 'Hi David Park', + // TODO(shihaohong): Remove this once Flutter stable adopts the modern + // Material text style nomenclature. + // ignore: deprecated_member_use style: Theme.of(context).textTheme.headline, ), Padding(padding: EdgeInsets.symmetric(vertical: maxHeight / 50)), From c4299c3f2d00277380210346ef80820684a1c695 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 09:44:40 -0800 Subject: [PATCH 05/13] Modify note --- packages/animations/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/animations/README.md b/packages/animations/README.md index 9372540e2f76..986e131179d4 100644 --- a/packages/animations/README.md +++ b/packages/animations/README.md @@ -1,6 +1,10 @@ # High quality pre-built Animations for Flutter -***Note (Feb 21, 2020): The `animations` package is not yet compatible with Flutter's `stable` branch. At the moment, it can only be used with Flutter's `master`, `dev`, and `beta` branches.*** +***Note (Feb 21, 2020)***: The `animations` package is not yet fully compatible +with Flutter's `stable` branch. In the `stable` branch, the Flutter analyzer will +complain about not overriding an inherited getter/setter and the reverse transition +duration for the Material fade transition will not be honored. At the moment, it is +only fully compatible with Flutter's `master`, `dev`, and `beta` branches. This package contains pre-canned animations for commonly-desired effects. The animations can be customized with your content and dropped into your application to delight your users. From 04e3322f62425934913570591db392c7d18ead40 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 09:46:36 -0800 Subject: [PATCH 06/13] Various fixes --- packages/animations/CHANGELOG.md | 7 ++++--- .../animations/example/lib/shared_axis_transition.dart | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md index 6638cdac7c56..e4a6a378960f 100644 --- a/packages/animations/CHANGELOG.md +++ b/packages/animations/CHANGELOG.md @@ -1,9 +1,10 @@ ## [1.0.0+4] - February 21, 2020 * Fix a typo in the changelog dates -* Add a note to the README that the `animations` package is not currently - compatible with Flutter's `stable` branch. - +* Add a note to the README that the `animations` package is currently not + fully compatible with Flutter's `stable` branch. +* Revert use of modern Material text style nomenclature in the example app + to be comatible with Flutter's `stable` branch for the time being. ## [1.0.0+3] - February 18, 2020 diff --git a/packages/animations/example/lib/shared_axis_transition.dart b/packages/animations/example/lib/shared_axis_transition.dart index 5b02d32369de..d0bc920c7410 100644 --- a/packages/animations/example/lib/shared_axis_transition.dart +++ b/packages/animations/example/lib/shared_axis_transition.dart @@ -5,10 +5,6 @@ import 'package:flutter/material.dart'; import 'package:animations/animations.dart'; -// TODO(shihaohong): Remove this once Flutter stable adopts the modern -// Material text style nomenclature. -// ignore: deprecated_member_use - /// The demo page for [SharedAxisPageTransitionsBuilder]. class SharedAxisTransitionDemo extends StatefulWidget { @override From fbe5a14ac5fc43189f4f70d397caeb6036faec80 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 09:48:45 -0800 Subject: [PATCH 07/13] Fix typo in changelog --- packages/animations/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md index e4a6a378960f..1d8da24f021c 100644 --- a/packages/animations/CHANGELOG.md +++ b/packages/animations/CHANGELOG.md @@ -4,7 +4,7 @@ * Add a note to the README that the `animations` package is currently not fully compatible with Flutter's `stable` branch. * Revert use of modern Material text style nomenclature in the example app - to be comatible with Flutter's `stable` branch for the time being. + to be compatible with Flutter's `stable` branch for the time being. ## [1.0.0+3] - February 18, 2020 From bcc7712cd7747b40725d6686778ac16a2b43e58f Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 09:50:50 -0800 Subject: [PATCH 08/13] Remove note --- packages/animations/CHANGELOG.md | 2 -- packages/animations/README.md | 6 ------ 2 files changed, 8 deletions(-) diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md index 1d8da24f021c..e4a24b16ce8b 100644 --- a/packages/animations/CHANGELOG.md +++ b/packages/animations/CHANGELOG.md @@ -1,8 +1,6 @@ ## [1.0.0+4] - February 21, 2020 * Fix a typo in the changelog dates -* Add a note to the README that the `animations` package is currently not - fully compatible with Flutter's `stable` branch. * Revert use of modern Material text style nomenclature in the example app to be compatible with Flutter's `stable` branch for the time being. diff --git a/packages/animations/README.md b/packages/animations/README.md index 986e131179d4..3a6f046d4c7d 100644 --- a/packages/animations/README.md +++ b/packages/animations/README.md @@ -1,11 +1,5 @@ # High quality pre-built Animations for Flutter -***Note (Feb 21, 2020)***: The `animations` package is not yet fully compatible -with Flutter's `stable` branch. In the `stable` branch, the Flutter analyzer will -complain about not overriding an inherited getter/setter and the reverse transition -duration for the Material fade transition will not be honored. At the moment, it is -only fully compatible with Flutter's `master`, `dev`, and `beta` branches. - This package contains pre-canned animations for commonly-desired effects. The animations can be customized with your content and dropped into your application to delight your users. To see examples of the following animations on a device or simulator: From 773f8234f2e9037e247c8a99d38d1279ac4c0265 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 10:00:29 -0800 Subject: [PATCH 09/13] Add another analyzer ignore --- packages/animations/CHANGELOG.md | 4 ++++ packages/animations/lib/src/modal.dart | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md index e4a24b16ce8b..f95e0c5f8f29 100644 --- a/packages/animations/CHANGELOG.md +++ b/packages/animations/CHANGELOG.md @@ -1,8 +1,12 @@ ## [1.0.0+4] - February 21, 2020 * Fix a typo in the changelog dates +* Add a note to the README that the `animations` package is currently not + fully compatible with Flutter's `stable` branch. * Revert use of modern Material text style nomenclature in the example app to be compatible with Flutter's `stable` branch for the time being. +* Remove @override annotation in modal.dart until Flutter's stable branch + contains https://github.com/flutter/flutter/pull/48274. ## [1.0.0+3] - February 18, 2020 diff --git a/packages/animations/lib/src/modal.dart b/packages/animations/lib/src/modal.dart index c03662199026..2f860bd25ad0 100644 --- a/packages/animations/lib/src/modal.dart +++ b/packages/animations/lib/src/modal.dart @@ -106,7 +106,9 @@ class _ModalRoute extends PopupRoute { @override final Duration transitionDuration; - @override + // TODO(shihaohong): Re-implement the @override annotation once Flutter stable + // contains https://github.com/flutter/flutter/pull/48274. + // ignore: annotate_overrides final Duration reverseTransitionDuration; /// The primary contents of the modal. From 7193c2c9333fbc3fa8cdf4cb643ba30d0b0306b2 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 10:02:04 -0800 Subject: [PATCH 10/13] nit --- packages/animations/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md index f95e0c5f8f29..434eddd390ad 100644 --- a/packages/animations/CHANGELOG.md +++ b/packages/animations/CHANGELOG.md @@ -5,7 +5,7 @@ fully compatible with Flutter's `stable` branch. * Revert use of modern Material text style nomenclature in the example app to be compatible with Flutter's `stable` branch for the time being. -* Remove @override annotation in modal.dart until Flutter's stable branch +* Remove override annotation in modal.dart until Flutter's stable branch contains https://github.com/flutter/flutter/pull/48274. ## [1.0.0+3] - February 18, 2020 From 5574ebddb98986c4ba8f72bfe2bcbba13a550b21 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 10:07:42 -0800 Subject: [PATCH 11/13] Revise ignore on override annotation --- packages/animations/CHANGELOG.md | 5 +++-- packages/animations/lib/src/modal.dart | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md index 434eddd390ad..187cc49fb4af 100644 --- a/packages/animations/CHANGELOG.md +++ b/packages/animations/CHANGELOG.md @@ -5,8 +5,9 @@ fully compatible with Flutter's `stable` branch. * Revert use of modern Material text style nomenclature in the example app to be compatible with Flutter's `stable` branch for the time being. -* Remove override annotation in modal.dart until Flutter's stable branch - contains https://github.com/flutter/flutter/pull/48274. +* Add override analyzer ignore in modal.dart for reverseTransitionDuration + until Flutter's stable branch contains + https://github.com/flutter/flutter/pull/48274. ## [1.0.0+3] - February 18, 2020 diff --git a/packages/animations/lib/src/modal.dart b/packages/animations/lib/src/modal.dart index 2f860bd25ad0..ff63e1cce477 100644 --- a/packages/animations/lib/src/modal.dart +++ b/packages/animations/lib/src/modal.dart @@ -106,9 +106,11 @@ class _ModalRoute extends PopupRoute { @override final Duration transitionDuration; - // TODO(shihaohong): Re-implement the @override annotation once Flutter stable - // contains https://github.com/flutter/flutter/pull/48274. - // ignore: annotate_overrides + + // TODO(shihaohong): Remove the override analyzer ignore once + // Flutter stable contains https://github.com/flutter/flutter/pull/48274. + // ignore: override_on_non_overriding_member + @override final Duration reverseTransitionDuration; /// The primary contents of the modal. From 31113d8d21cbac90edf0e68fd5cc6ce4703d8213 Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 10:09:48 -0800 Subject: [PATCH 12/13] Remove extra blank line --- packages/animations/lib/src/modal.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/animations/lib/src/modal.dart b/packages/animations/lib/src/modal.dart index ff63e1cce477..4844a4781386 100644 --- a/packages/animations/lib/src/modal.dart +++ b/packages/animations/lib/src/modal.dart @@ -106,7 +106,6 @@ class _ModalRoute extends PopupRoute { @override final Duration transitionDuration; - // TODO(shihaohong): Remove the override analyzer ignore once // Flutter stable contains https://github.com/flutter/flutter/pull/48274. // ignore: override_on_non_overriding_member From 4276e69d8e3a6c5306a4e3a2d85e18eb72bb73dd Mon Sep 17 00:00:00 2001 From: Shi Hao Hong Date: Fri, 21 Feb 2020 10:18:09 -0800 Subject: [PATCH 13/13] Remove stray changelog edit that was reintroduced --- packages/animations/CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md index 187cc49fb4af..6a896e8afb0a 100644 --- a/packages/animations/CHANGELOG.md +++ b/packages/animations/CHANGELOG.md @@ -1,8 +1,6 @@ ## [1.0.0+4] - February 21, 2020 * Fix a typo in the changelog dates -* Add a note to the README that the `animations` package is currently not - fully compatible with Flutter's `stable` branch. * Revert use of modern Material text style nomenclature in the example app to be compatible with Flutter's `stable` branch for the time being. * Add override analyzer ignore in modal.dart for reverseTransitionDuration