|
|
@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
|
|
|
|
import '../data.dart';
|
|
|
|
import '../data.dart';
|
|
|
|
import '../widgets/book_list.dart';
|
|
|
|
import '../widgets/book_list.dart';
|
|
|
|
import 'book_details.dart';
|
|
|
|
import 'book_details.dart';
|
|
|
|
|
|
|
|
import '../routing.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class AuthorDetailsScreen extends StatelessWidget {
|
|
|
|
class AuthorDetailsScreen extends StatelessWidget {
|
|
|
|
final Author author;
|
|
|
|
final Author author;
|
|
|
@ -29,15 +30,7 @@ class AuthorDetailsScreen extends StatelessWidget {
|
|
|
|
child: BookList(
|
|
|
|
child: BookList(
|
|
|
|
books: author.books,
|
|
|
|
books: author.books,
|
|
|
|
onTap: (book) {
|
|
|
|
onTap: (book) {
|
|
|
|
Navigator.of(context).push<dynamic>(
|
|
|
|
RouteStateScope.of(context)!.go('/book/${book.id}');
|
|
|
|
MaterialPageRoute<dynamic>(
|
|
|
|
|
|
|
|
builder: (context) {
|
|
|
|
|
|
|
|
return BookDetailsScreen(
|
|
|
|
|
|
|
|
book: book,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|