mirror of
https://github.com/flutter/samples.git
synced 2026-07-16 05:52:01 +00:00
Cleanup to navigation_and_routing sample (#881)
- make more things private and final, where possible - remove unused members - used expression bodies, where possible
This commit is contained in:
@@ -14,17 +14,15 @@ class AuthorsScreen extends StatelessWidget {
|
||||
const AuthorsScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(title),
|
||||
),
|
||||
body: AuthorList(
|
||||
authors: LibraryScope.of(context).allAuthors,
|
||||
onTap: (author) {
|
||||
RouteStateScope.of(context)!.go('/author/${author.id}');
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(title),
|
||||
),
|
||||
body: AuthorList(
|
||||
authors: LibraryScope.of(context).allAuthors,
|
||||
onTap: (author) {
|
||||
RouteStateScope.of(context)!.go('/author/${author.id}');
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user