We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6ac643 commit 228bc80Copy full SHA for 228bc80
navigation_and_routing/lib/src/screens/author_details.dart
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
7
import '../data.dart';
8
import '../widgets/book_list.dart';
9
import 'book_details.dart';
10
+import '../routing.dart';
11
12
class AuthorDetailsScreen extends StatelessWidget {
13
final Author author;
@@ -29,15 +30,7 @@ class AuthorDetailsScreen extends StatelessWidget {
29
30
child: BookList(
31
books: author.books,
32
onTap: (book) {
- Navigator.of(context).push<dynamic>(
33
- MaterialPageRoute<dynamic>(
34
- builder: (context) {
35
- return BookDetailsScreen(
36
- book: book,
37
- );
38
- },
39
- ),
40
+ RouteStateScope.of(context)!.go('/book/${book.id}');
41
},
42
),
43
0 commit comments