Did you mean to use .go here? (#857)

pull/859/head
idkq 3 years ago committed by GitHub
parent a6ac643fe0
commit 228bc80b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save