[animations] Fix analyzer warnings (#109)
* Update pubspec.yaml
* Update CHANGELOG.md
* Fix analyzer warnings
diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md
index e0ccfcf..6a896e8 100644
--- a/packages/animations/CHANGELOG.md
+++ b/packages/animations/CHANGELOG.md
@@ -1,3 +1,12 @@
+## [1.0.0+4] - February 21, 2020
+
+* Fix a typo in the changelog dates
+* 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
+ until Flutter's stable branch contains
+ https://github.com/flutter/flutter/pull/48274.
+
## [1.0.0+3] - February 18, 2020
* Update README.md to better describe Material motion
diff --git a/packages/animations/example/lib/container_transition.dart b/packages/animations/example/lib/container_transition.dart
index 1af6d95..e51286f 100644
--- a/packages/animations/example/lib/container_transition.dart
+++ b/packages/animations/example/lib/container_transition.dart
@@ -313,7 +313,10 @@
'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 @@
children: <Widget>[
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 @@
children: <Widget>[
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 @@
children: <Widget>[
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 @@
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 65e1332..c9b0f20 100644
--- a/packages/animations/example/lib/fade_through_transition.dart
+++ b/packages/animations/example/lib/fade_through_transition.dart
@@ -93,7 +93,10 @@
children: <Widget>[
Text(
'123 photos',
- style: Theme.of(context).textTheme.bodyText1,
+ // 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(
'123 photos',
diff --git a/packages/animations/example/lib/shared_axis_transition.dart b/packages/animations/example/lib/shared_axis_transition.dart
index 351ca5e..d0bc920 100644
--- a/packages/animations/example/lib/shared_axis_transition.dart
+++ b/packages/animations/example/lib/shared_axis_transition.dart
@@ -122,7 +122,10 @@
const Padding(padding: EdgeInsets.symmetric(vertical: 8.0)),
Text(
'Streamling your courses',
- style: Theme.of(context).textTheme.headline5,
+ // 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,
),
const Padding(padding: EdgeInsets.symmetric(vertical: 5.0)),
@@ -194,7 +197,10 @@
Padding(padding: EdgeInsets.symmetric(vertical: maxHeight / 50)),
Text(
'Hi David Park',
- style: Theme.of(context).textTheme.headline5,
+ // 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)),
const Text(
diff --git a/packages/animations/lib/src/modal.dart b/packages/animations/lib/src/modal.dart
index c036621..4844a47 100644
--- a/packages/animations/lib/src/modal.dart
+++ b/packages/animations/lib/src/modal.dart
@@ -106,6 +106,9 @@
@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
@override
final Duration reverseTransitionDuration;
diff --git a/packages/animations/pubspec.yaml b/packages/animations/pubspec.yaml
index df317e6..c378432 100644
--- a/packages/animations/pubspec.yaml
+++ b/packages/animations/pubspec.yaml
@@ -1,6 +1,6 @@
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: