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

Update for Material changes & run rebuild scripts (#1412)

This commit is contained in:
Brett Morgan
2022-09-01 11:01:17 +10:00
committed by GitHub
parent 83f7059d83
commit 9d8aa333ee
167 changed files with 928 additions and 1061 deletions

View File

@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
final appTheme = ThemeData(
primarySwatch: Colors.yellow,
textTheme: const TextTheme(
headline1: TextStyle(
displayLarge: TextStyle(
fontFamily: 'Corben',
fontWeight: FontWeight.w700,
fontSize: 24,

View File

@@ -13,7 +13,7 @@ class MyCart extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Cart', style: Theme.of(context).textTheme.headline1),
title: Text('Cart', style: Theme.of(context).textTheme.displayLarge),
backgroundColor: Colors.white,
),
body: Container(
@@ -38,7 +38,7 @@ class MyCart extends StatelessWidget {
class _CartList extends StatelessWidget {
@override
Widget build(BuildContext context) {
var itemNameStyle = Theme.of(context).textTheme.headline6;
var itemNameStyle = Theme.of(context).textTheme.titleLarge;
// This gets the current state of CartModel and also tells Flutter
// to rebuild this widget when CartModel notifies listeners (in other words,
// when it changes).
@@ -67,7 +67,7 @@ class _CartTotal extends StatelessWidget {
@override
Widget build(BuildContext context) {
var hugeStyle =
Theme.of(context).textTheme.headline1!.copyWith(fontSize: 48);
Theme.of(context).textTheme.displayLarge!.copyWith(fontSize: 48);
return SizedBox(
height: 200,

View File

@@ -75,7 +75,7 @@ class _MyAppBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SliverAppBar(
title: Text('Catalog', style: Theme.of(context).textTheme.headline1),
title: Text('Catalog', style: Theme.of(context).textTheme.displayLarge),
floating: true,
actions: [
IconButton(
@@ -99,7 +99,7 @@ class _MyListItem extends StatelessWidget {
// about any other change.
(catalog) => catalog.getByPosition(index),
);
var textTheme = Theme.of(context).textTheme.headline6;
var textTheme = Theme.of(context).textTheme.titleLarge;
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),

View File

@@ -18,7 +18,7 @@ class MyLogin extends StatelessWidget {
children: [
Text(
'Welcome',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.displayLarge,
),
TextFormField(
decoration: const InputDecoration(