mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Did you mean to use .go here? (#857)
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
|
||||
import '../data.dart';
|
||||
import '../widgets/book_list.dart';
|
||||
import 'book_details.dart';
|
||||
import '../routing.dart';
|
||||
|
||||
class AuthorDetailsScreen extends StatelessWidget {
|
||||
final Author author;
|
||||
@@ -29,15 +30,7 @@ class AuthorDetailsScreen extends StatelessWidget {
|
||||
child: BookList(
|
||||
books: author.books,
|
||||
onTap: (book) {
|
||||
Navigator.of(context).push<dynamic>(
|
||||
MaterialPageRoute<dynamic>(
|
||||
builder: (context) {
|
||||
return BookDetailsScreen(
|
||||
book: book,
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
RouteStateScope.of(context)!.go('/book/${book.id}');
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user