Remove unnecessary types (#946)

pull/978/head
Ahmed Ashour 3 years ago committed by GitHub
parent 7b5f1e52b4
commit 50d5dd968b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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'),

Loading…
Cancel
Save