Skip to content

Commit

Permalink
[animations] Fix analyzer warnings (#109)
Browse files Browse the repository at this point in the history
* Update pubspec.yaml

* Update CHANGELOG.md

* Fix analyzer warnings
  • Loading branch information
Shi-Hao Hong committed Feb 21, 2020
1 parent 2396311 commit 6a6db3a
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 9 deletions.
9 changes: 9 additions & 0 deletions 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
Expand Down
25 changes: 20 additions & 5 deletions packages/animations/example/lib/container_transition.dart
Expand Up @@ -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),
),
),
Expand Down Expand Up @@ -359,7 +362,10 @@ class _SmallerCard extends StatelessWidget {
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(
Expand Down Expand Up @@ -409,7 +415,10 @@ class _ExampleSingleTile extends StatelessWidget {
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(
Expand Down Expand Up @@ -476,15 +485,21 @@ class _DetailsPage extends StatelessWidget {
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,
),
),
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,
Expand Down
5 changes: 4 additions & 1 deletion packages/animations/example/lib/fade_through_transition.dart
Expand Up @@ -93,7 +93,10 @@ class _ExampleCard extends StatelessWidget {
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',
Expand Down
10 changes: 8 additions & 2 deletions packages/animations/example/lib/shared_axis_transition.dart
Expand Up @@ -122,7 +122,10 @@ class _CoursePage extends StatelessWidget {
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)),
Expand Down Expand Up @@ -194,7 +197,10 @@ class _SignInPage extends StatelessWidget {
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(
Expand Down
3 changes: 3 additions & 0 deletions packages/animations/lib/src/modal.dart
Expand Up @@ -106,6 +106,9 @@ class _ModalRoute<T> extends PopupRoute<T> {
@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;

Expand Down
2 changes: 1 addition & 1 deletion 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:
Expand Down

0 comments on commit 6a6db3a

Please sign in to comment.