1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-13 10:59:04 +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

@@ -6,7 +6,7 @@ import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:file_chooser/file_chooser.dart' as file_choser;
import 'package:file_chooser/file_chooser.dart' as file_chooser;
import 'package:logging/logging.dart';
import 'package:menubar/menubar.dart' as menubar;
import 'package:meta/meta.dart';
@@ -92,9 +92,14 @@ class UnsplashHomePage extends StatelessWidget {
? PhotoDetails(
photo: photoSearchModel.selectedPhoto,
onPhotoSave: (photo) async {
final result = await file_choser.showSavePanel(
final result = await file_chooser.showSavePanel(
suggestedFileName: '${photo.id}.jpg',
allowedFileTypes: ['jpg'],
allowedFileTypes: const [
file_chooser.FileTypeFilterGroup(
label: 'JPGs',
fileExtensions: ['jpg'],
)
],
);
if (!result.canceled) {
final bytes =

View File

@@ -254,7 +254,7 @@ class _DataTreeNodeState extends State<DataTreeNode>
),
const SizedBox(width: 16),
DefaultTextStyle(
style: Theme.of(context).textTheme.body1.copyWith(
style: Theme.of(context).textTheme.bodyText2.copyWith(
color: textColor,
),
child: widget.title,

View File

@@ -33,7 +33,7 @@ class _PhotoDetailsState extends State<PhotoDetails>
Widget _buildPhotoAttribution(BuildContext context) {
return RichText(
text: TextSpan(
style: Theme.of(context).textTheme.body1,
style: Theme.of(context).textTheme.bodyText2,
children: [
const TextSpan(text: 'Photo by '),
TextSpan(