1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00
Files
samples/navigation_and_routing/lib/src/screens/authors.dart
2025-02-12 18:08:01 -05:00

23 lines
725 B
Dart

// Copyright 2021, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import '../data/author.dart';
import '../data/library.dart';
import '../widgets/author_list.dart';
class AuthorsScreen extends StatelessWidget {
final String title;
final ValueChanged<Author> onTap;
const AuthorsScreen({required this.onTap, this.title = 'Authors', super.key});
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(title: Text(title)),
body: AuthorList(authors: libraryInstance.allAuthors, onTap: onTap),
);
}