1
0
mirror of https://github.com/flutter/samples.git synced 2026-05-19 13:28:28 +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

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

View File

@@ -11,7 +11,7 @@ class MyCart extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Cart', style: Theme.of(context).textTheme.display4),
title: Text('Cart', style: Theme.of(context).textTheme.headline1),
backgroundColor: Colors.white,
),
body: Container(
@@ -36,7 +36,7 @@ class MyCart extends StatelessWidget {
class _CartList extends StatelessWidget {
@override
Widget build(BuildContext context) {
var itemNameStyle = Theme.of(context).textTheme.title;
var itemNameStyle = Theme.of(context).textTheme.headline6;
var cart = Provider.of<CartModel>(context);
return ListView.builder(
@@ -55,7 +55,8 @@ class _CartList extends StatelessWidget {
class _CartTotal extends StatelessWidget {
@override
Widget build(BuildContext context) {
var hugeStyle = Theme.of(context).textTheme.display4.copyWith(fontSize: 48);
var hugeStyle =
Theme.of(context).textTheme.headline1.copyWith(fontSize: 48);
return SizedBox(
height: 200,

View File

@@ -48,7 +48,7 @@ class _MyAppBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SliverAppBar(
title: Text('Catalog', style: Theme.of(context).textTheme.display4),
title: Text('Catalog', style: Theme.of(context).textTheme.headline1),
floating: true,
actions: [
IconButton(
@@ -69,7 +69,7 @@ class _MyListItem extends StatelessWidget {
Widget build(BuildContext context) {
var catalog = Provider.of<CatalogModel>(context);
var item = catalog.getByPosition(index);
var textTheme = Theme.of(context).textTheme.title;
var textTheme = Theme.of(context).textTheme.headline6;
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),

View File

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

View File

@@ -7,42 +7,42 @@ packages:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
version: "1.6.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
version: "2.4.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "2.0.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
version: "1.1.3"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
version: "1.14.12"
convert:
dependency: transitive
description:
@@ -56,7 +56,7 @@ packages:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
version: "2.1.4"
flutter:
dependency: "direct main"
description: flutter
@@ -73,7 +73,7 @@ packages:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.1.12"
matcher:
dependency: transitive
description:
@@ -129,7 +129,7 @@ packages:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.1.3"
sky_engine:
dependency: transitive
description: flutter
@@ -141,7 +141,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.5"
version: "1.7.0"
stack_trace:
dependency: transitive
description:
@@ -197,7 +197,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
version: "3.6.1"
sdks:
dart: ">=2.5.0 <3.0.0"
dart: ">=2.6.0 <3.0.0"
flutter: ">=1.12.1"