Skip to content

Commit 6a6db3a

Browse files
author
Shi-Hao Hong
authored
[animations] Fix analyzer warnings (#109)
* Update pubspec.yaml * Update CHANGELOG.md * Fix analyzer warnings
1 parent 2396311 commit 6a6db3a

File tree

6 files changed

+45
-9
lines changed

6 files changed

+45
-9
lines changed

packages/animations/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## [1.0.0+4] - February 21, 2020
2+
3+
* Fix a typo in the changelog dates
4+
* Revert use of modern Material text style nomenclature in the example app
5+
to be compatible with Flutter's `stable` branch for the time being.
6+
* Add override analyzer ignore in modal.dart for reverseTransitionDuration
7+
until Flutter's stable branch contains
8+
https://github.com/flutter/flutter/pull/48274.
9+
110
## [1.0.0+3] - February 18, 2020
211

312
* Update README.md to better describe Material motion

packages/animations/example/lib/container_transition.dart

+20-5
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,10 @@ class _ExampleCard extends StatelessWidget {
313313
'adipiscing elit, sed do eiusmod tempor.',
314314
style: Theme.of(context)
315315
.textTheme
316-
.bodyText2
316+
// TODO(shihaohong): Remove this once Flutter stable adopts the modern
317+
// Material text style nomenclature.
318+
// ignore: deprecated_member_use
319+
.body1
317320
.copyWith(color: Colors.black54),
318321
),
319322
),
@@ -359,7 +362,10 @@ class _SmallerCard extends StatelessWidget {
359362
children: <Widget>[
360363
Text(
361364
'Title',
362-
style: Theme.of(context).textTheme.headline6,
365+
// TODO(shihaohong): Remove this once Flutter stable adopts the modern
366+
// Material text style nomenclature.
367+
// ignore: deprecated_member_use
368+
style: Theme.of(context).textTheme.title,
363369
),
364370
const SizedBox(height: 4),
365371
Text(
@@ -409,7 +415,10 @@ class _ExampleSingleTile extends StatelessWidget {
409415
children: <Widget>[
410416
Text(
411417
'Title',
412-
style: Theme.of(context).textTheme.subtitle1,
418+
// TODO(shihaohong): Remove this once Flutter stable adopts the modern
419+
// Material text style nomenclature.
420+
// ignore: deprecated_member_use
421+
style: Theme.of(context).textTheme.subhead,
413422
),
414423
const SizedBox(height: 8),
415424
Text(
@@ -476,15 +485,21 @@ class _DetailsPage extends StatelessWidget {
476485
children: <Widget>[
477486
Text(
478487
'Title',
479-
style: Theme.of(context).textTheme.headline5.copyWith(
488+
// TODO(shihaohong): Remove this once Flutter stable adopts the modern
489+
// Material text style nomenclature.
490+
// ignore: deprecated_member_use
491+
style: Theme.of(context).textTheme.headline.copyWith(
480492
color: Colors.black54,
481493
fontSize: 30.0,
482494
),
483495
),
484496
const SizedBox(height: 10),
485497
Text(
486498
_loremIpsumParagraph,
487-
style: Theme.of(context).textTheme.bodyText2.copyWith(
499+
// TODO(shihaohong): Remove this once Flutter stable adopts the modern
500+
// Material text style nomenclature.
501+
// ignore: deprecated_member_use
502+
style: Theme.of(context).textTheme.body1.copyWith(
488503
color: Colors.black54,
489504
height: 1.5,
490505
fontSize: 16.0,

packages/animations/example/lib/fade_through_transition.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ class _ExampleCard extends StatelessWidget {
9393
children: <Widget>[
9494
Text(
9595
'123 photos',
96-
style: Theme.of(context).textTheme.bodyText1,
96+
// TODO(shihaohong): Remove this once Flutter stable adopts the modern
97+
// Material text style nomenclature.
98+
// ignore: deprecated_member_use
99+
style: Theme.of(context).textTheme.body2,
97100
),
98101
Text(
99102
'123 photos',

packages/animations/example/lib/shared_axis_transition.dart

+8-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ class _CoursePage extends StatelessWidget {
122122
const Padding(padding: EdgeInsets.symmetric(vertical: 8.0)),
123123
Text(
124124
'Streamling your courses',
125-
style: Theme.of(context).textTheme.headline5,
125+
// TODO(shihaohong): Remove this once Flutter stable adopts the modern
126+
// Material text style nomenclature.
127+
// ignore: deprecated_member_use
128+
style: Theme.of(context).textTheme.headline,
126129
textAlign: TextAlign.center,
127130
),
128131
const Padding(padding: EdgeInsets.symmetric(vertical: 5.0)),
@@ -194,7 +197,10 @@ class _SignInPage extends StatelessWidget {
194197
Padding(padding: EdgeInsets.symmetric(vertical: maxHeight / 50)),
195198
Text(
196199
'Hi David Park',
197-
style: Theme.of(context).textTheme.headline5,
200+
// TODO(shihaohong): Remove this once Flutter stable adopts the modern
201+
// Material text style nomenclature.
202+
// ignore: deprecated_member_use
203+
style: Theme.of(context).textTheme.headline,
198204
),
199205
Padding(padding: EdgeInsets.symmetric(vertical: maxHeight / 50)),
200206
const Text(

packages/animations/lib/src/modal.dart

+3
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ class _ModalRoute<T> extends PopupRoute<T> {
106106
@override
107107
final Duration transitionDuration;
108108

109+
// TODO(shihaohong): Remove the override analyzer ignore once
110+
// Flutter stable contains https://github.com/flutter/flutter/pull/48274.
111+
// ignore: override_on_non_overriding_member
109112
@override
110113
final Duration reverseTransitionDuration;
111114

packages/animations/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: animations
22
description: Fancy pre-built animations that can easily be integrated into any Flutter application.
3-
version: 1.0.0+3
3+
version: 1.0.0+4
44
homepage: https://github.com/flutter/packages/tree/master/packages/animations
55

66
environment:

0 commit comments

Comments
 (0)