1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Move library to a top-level variable, since it never changes (#887)

This commit is contained in:
Kevin Moore
2021-08-26 16:18:40 -07:00
committed by GitHub
parent ecf716dcab
commit c9688ca34b
8 changed files with 77 additions and 114 deletions

View File

@@ -7,7 +7,7 @@ import 'book.dart';
class Author {
final int id;
final String name;
final List<Book> books;
final List<Book> books = <Book>[];
Author(this.id, this.name, this.books);
Author(this.id, this.name);
}