Deprecate 2018 text theme parameters (#109817)
This commit is contained in:
@@ -155,7 +155,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text('${model.data.value}',
|
||||
style: Theme.of(context).textTheme.headline4),
|
||||
style: Theme.of(context).textTheme.headlineMedium),
|
||||
);
|
||||
}),
|
||||
IconButton(
|
||||
|
||||
@@ -186,7 +186,7 @@ class CardItem extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
TextStyle textStyle = Theme.of(context).textTheme.headline4!;
|
||||
TextStyle textStyle = Theme.of(context).textTheme.headlineMedium!;
|
||||
if (selected) {
|
||||
textStyle = textStyle.copyWith(color: Colors.lightGreenAccent[400]);
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ class CardItem extends StatelessWidget {
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Item $item',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -50,7 +50,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
// child each time the count changes, so that it will begin its animation
|
||||
// when the count changes.
|
||||
key: ValueKey<int>(_count),
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
),
|
||||
ElevatedButton(
|
||||
|
||||
@@ -38,7 +38,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline2!,
|
||||
style: Theme.of(context).textTheme.displayMedium!,
|
||||
textAlign: TextAlign.center,
|
||||
child: FutureBuilder<String>(
|
||||
future: _calculation, // a previously-obtained Future<String> or null
|
||||
|
||||
@@ -48,7 +48,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline2!,
|
||||
style: Theme.of(context).textTheme.displayMedium!,
|
||||
textAlign: TextAlign.center,
|
||||
child: Container(
|
||||
alignment: FractionalOffset.center,
|
||||
|
||||
@@ -78,7 +78,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
'You have pressed or released in this area this many times:'),
|
||||
Text(
|
||||
'$_downCounter presses\n$_upCounter releases',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
Text(
|
||||
'The cursor is here: (${x.toStringAsFixed(2)}, ${y.toStringAsFixed(2)})',
|
||||
|
||||
@@ -76,7 +76,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
'You have entered or exited this box this many times:'),
|
||||
Text(
|
||||
'$_enterCounter Entries\n$_exitCounter Exits',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
Text(
|
||||
'The cursor is here: (${x.toStringAsFixed(2)}, ${y.toStringAsFixed(2)})',
|
||||
|
||||
@@ -121,7 +121,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final TextTheme textTheme = Theme.of(context).textTheme;
|
||||
return DefaultTextStyle(
|
||||
style: textTheme.headline4!,
|
||||
style: textTheme.headlineMedium!,
|
||||
child: const ColorfulButton(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
debugLabel: 'Scope',
|
||||
autofocus: true,
|
||||
child: DefaultTextStyle(
|
||||
style: textTheme.headline4!,
|
||||
style: textTheme.headlineMedium!,
|
||||
child: Focus(
|
||||
onKey: _handleKeyPress,
|
||||
debugLabel: 'Button',
|
||||
|
||||
@@ -119,7 +119,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
child: const Text('ANOTHER BUTTON TO FOCUS'),
|
||||
),
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline2!,
|
||||
style: Theme.of(context).textTheme.displayMedium!,
|
||||
child: const Text('BACKDROP')),
|
||||
],
|
||||
),
|
||||
@@ -148,7 +148,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
? null
|
||||
: () => setState(() => backdropIsVisible = true),
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline2!,
|
||||
style: Theme.of(context).textTheme.displayMedium!,
|
||||
child: const Text('FOREGROUND')),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -31,7 +31,7 @@ class HomePage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline4!,
|
||||
style: Theme.of(context).textTheme.headlineMedium!,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
alignment: Alignment.center,
|
||||
@@ -47,7 +47,7 @@ class CollectPersonalInfoPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline4!,
|
||||
style: Theme.of(context).textTheme.headlineMedium!,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
// This moves from the personal info page to the credentials page,
|
||||
@@ -78,7 +78,7 @@ class ChooseCredentialsPage extends StatelessWidget {
|
||||
return GestureDetector(
|
||||
onTap: onSignupComplete,
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline4!,
|
||||
style: Theme.of(context).textTheme.headlineMedium!,
|
||||
child: Container(
|
||||
color: Colors.pinkAccent,
|
||||
alignment: Alignment.center,
|
||||
|
||||
@@ -82,7 +82,7 @@ class _RestorableCounterState extends State<RestorableCounter>
|
||||
),
|
||||
Text(
|
||||
'${_counter.value}',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -28,7 +28,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.bodyText2!,
|
||||
style: Theme.of(context).textTheme.bodyMedium!,
|
||||
child: LayoutBuilder(
|
||||
builder: (BuildContext context, BoxConstraints viewportConstraints) {
|
||||
return SingleChildScrollView(
|
||||
|
||||
@@ -28,7 +28,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.bodyText2!,
|
||||
style: Theme.of(context).textTheme.bodyMedium!,
|
||||
child: LayoutBuilder(
|
||||
builder: (BuildContext context, BoxConstraints viewportConstraints) {
|
||||
return SingleChildScrollView(
|
||||
|
||||
Reference in New Issue
Block a user