1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Flutter 3.29 beta (#2571)

This commit is contained in:
Eric Windmill
2025-02-12 18:08:01 -05:00
committed by GitHub
parent d62c784789
commit 719fd72c38
685 changed files with 76244 additions and 53721 deletions

View File

@@ -10,25 +10,29 @@ void main() {
test('addBook', () {
final library = Library();
library.addBook(
title: 'Left Hand of Darkness',
authorName: 'Ursula K. Le Guin',
isPopular: true,
isNew: true);
title: 'Left Hand of Darkness',
authorName: 'Ursula K. Le Guin',
isPopular: true,
isNew: true,
);
library.addBook(
title: 'Too Like the Lightning',
authorName: 'Ada Palmer',
isPopular: false,
isNew: true);
title: 'Too Like the Lightning',
authorName: 'Ada Palmer',
isPopular: false,
isNew: true,
);
library.addBook(
title: 'Kindred',
authorName: 'Octavia E. Butler',
isPopular: true,
isNew: false);
title: 'Kindred',
authorName: 'Octavia E. Butler',
isPopular: true,
isNew: false,
);
library.addBook(
title: 'The Lathe of Heaven',
authorName: 'Ursula K. Le Guin',
isPopular: false,
isNew: false);
title: 'The Lathe of Heaven',
authorName: 'Ursula K. Le Guin',
isPopular: false,
isNew: false,
);
expect(library.allAuthors.length, 3);
expect(library.allAuthors.first.books.length, 2);
expect(library.allBooks.length, 4);