mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Remove unnecessary types (#946)
This commit is contained in:
@@ -68,7 +68,7 @@ class _BookstoreState extends State<Bookstore> {
|
||||
// https://github.com/flutter/flutter/issues/82053
|
||||
theme: ThemeData(
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
builders: <TargetPlatform, PageTransitionsBuilder>{
|
||||
builders: {
|
||||
TargetPlatform.android: FadeUpwardsPageTransitionsBuilder(),
|
||||
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
|
||||
TargetPlatform.linux: FadeUpwardsPageTransitionsBuilder(),
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'book.dart';
|
||||
class Author {
|
||||
final int id;
|
||||
final String name;
|
||||
final List<Book> books = <Book>[];
|
||||
final books = <Book>[];
|
||||
|
||||
Author(this.id, this.name);
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ class BookstoreNavigator extends StatefulWidget {
|
||||
|
||||
class _BookstoreNavigatorState extends State<BookstoreNavigator> {
|
||||
final _signInKey = const ValueKey('Sign in');
|
||||
final _scaffoldKey = const ValueKey<String>('App scaffold');
|
||||
final _bookDetailsKey = const ValueKey<String>('Book details screen');
|
||||
final _authorDetailsKey = const ValueKey<String>('Author details screen');
|
||||
final _scaffoldKey = const ValueKey('App scaffold');
|
||||
final _bookDetailsKey = const ValueKey('Book details screen');
|
||||
final _authorDetailsKey = const ValueKey('Author details screen');
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -76,7 +76,7 @@ class SettingsContent extends StatelessWidget {
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text('Alert!'),
|
||||
content: const Text('The alert description goes here.'),
|
||||
actions: <Widget>[
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context, 'Cancel'),
|
||||
child: const Text('Cancel'),
|
||||
|
||||
Reference in New Issue
Block a user