1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Flutter 1.17 updates (#432)

* Material text theme updates & flutter pub upgrade (#411)

* Beta channel updates (#412)

* fix deprecated usages in provider_shopper - beta channel

* fix deprecated usages in animations - beta channel

* fix deprecated usages in provider_counter - beta

* Updates additional samples for beta release (#416)

* use headline6 instead of title

* fix another title -> headline6

Co-authored-by: Brett Morgan <brett.morgan@gmail.com>
Co-authored-by: Andrew Brogdon <RedBrogdon@users.noreply.github.com>
This commit is contained in:
John Ryan
2020-05-06 14:09:15 -07:00
committed by GitHub
parent 31f6eff4a6
commit 14b9a8c4c4
45 changed files with 391 additions and 374 deletions

View File

@@ -13,9 +13,10 @@ class SimpleObjectView extends StatelessWidget {
@override
Widget build(BuildContext context) {
final localTheme = Theme.of(context).textTheme;
final boldStyle = localTheme.body1.copyWith(fontWeight: FontWeight.w600);
final boldStyle =
localTheme.bodyText2.copyWith(fontWeight: FontWeight.w600);
if (simpleObject == null) return Text('NULL', style: localTheme.body1);
if (simpleObject == null) return Text('NULL', style: localTheme.bodyText2);
return Table(
columnWidths: const {
@@ -33,7 +34,7 @@ class SimpleObjectView extends StatelessWidget {
simpleObject.aString != null
? '"${simpleObject.aString}"'
: 'NULL',
style: localTheme.body1,
style: localTheme.bodyText2,
),
],
),
@@ -42,7 +43,7 @@ class SimpleObjectView extends StatelessWidget {
Text('anInt:', style: boldStyle),
Text(
simpleObject.anInt?.toString() ?? 'NULL',
style: localTheme.body1,
style: localTheme.bodyText2,
),
],
),
@@ -50,7 +51,7 @@ class SimpleObjectView extends StatelessWidget {
Text('aDouble:', style: boldStyle),
Text(
simpleObject.aDouble?.toString() ?? 'NULL',
style: localTheme.body1,
style: localTheme.bodyText2,
),
]),
TableRow(
@@ -60,7 +61,7 @@ class SimpleObjectView extends StatelessWidget {
prettyPrintList(
simpleObject.aListOfStrings as Iterable<dynamic>,
),
style: localTheme.body1,
style: localTheme.bodyText2,
),
],
),
@@ -69,7 +70,7 @@ class SimpleObjectView extends StatelessWidget {
Text('aListOfInts:', style: boldStyle),
Text(
prettyPrintList(simpleObject.aListOfInts as Iterable<dynamic>),
style: localTheme.body1,
style: localTheme.bodyText2,
),
],
),
@@ -81,7 +82,7 @@ class SimpleObjectView extends StatelessWidget {
),
Text(
prettyPrintList(simpleObject.aListOfDoubles as Iterable<dynamic>),
style: localTheme.body1,
style: localTheme.bodyText2,
),
],
),
@@ -103,7 +104,7 @@ class SimpleObjectViewList extends StatelessWidget {
widgets.addAll([
Text(
'SimpleObject $i:',
style: Theme.of(context).textTheme.subhead,
style: Theme.of(context).textTheme.subtitle1,
),
const SizedBox(height: 4.0),
SimpleObjectView(simpleObjects[i]),
@@ -156,7 +157,8 @@ class ComplexObjectView extends StatelessWidget {
@override
Widget build(BuildContext context) {
final localTheme = Theme.of(context).textTheme;
final boldStyle = localTheme.body1.copyWith(fontWeight: FontWeight.w600);
final boldStyle =
localTheme.bodyText2.copyWith(fontWeight: FontWeight.w600);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -174,21 +176,21 @@ class ComplexObjectView extends StatelessWidget {
complexObject.aString != null
? '"${complexObject.aString}"'
: 'NULL',
style: localTheme.body1),
style: localTheme.bodyText2),
],
),
TableRow(
children: [
Text('anInt:', style: boldStyle),
Text(complexObject.anInt?.toString() ?? 'NULL',
style: localTheme.body1),
style: localTheme.bodyText2),
],
),
TableRow(
children: [
Text('aDouble:', style: boldStyle),
Text(complexObject.aDouble?.toString() ?? 'NULL',
style: localTheme.body1),
style: localTheme.bodyText2),
],
),
TableRow(
@@ -215,7 +217,7 @@ class ComplexObjectView extends StatelessWidget {
Text(
prettyPrintList(
complexObject.aListOfStrings as Iterable<dynamic>),
style: localTheme.body1,
style: localTheme.bodyText2,
),
],
),
@@ -225,7 +227,7 @@ class ComplexObjectView extends StatelessWidget {
Text(
prettyPrintList(
complexObject.aListOfInts as Iterable<dynamic>),
style: localTheme.body1,
style: localTheme.bodyText2,
),
],
),
@@ -238,7 +240,7 @@ class ComplexObjectView extends StatelessWidget {
Text(
prettyPrintList(
complexObject.aListOfDoubles as Iterable<dynamic>),
style: localTheme.body1,
style: localTheme.bodyText2,
),
],
),
@@ -276,7 +278,7 @@ class ComplexObjectViewList extends StatelessWidget {
widgets.addAll([
Text(
'Complex Object $i:',
style: Theme.of(context).textTheme.subhead,
style: Theme.of(context).textTheme.subtitle1,
),
const SizedBox(height: 4.0),
ComplexObjectView(complexObjects[i]),