mirror of
https://github.com/flutter/samples.git
synced 2025-11-12 07:48:55 +00:00
Flutter 3.29 beta (#2571)
This commit is contained in:
@@ -15,9 +15,7 @@ Widget createFavoritesScreen() => ChangeNotifierProvider<Favorites>(
|
||||
favoritesList = Favorites();
|
||||
return favoritesList;
|
||||
},
|
||||
child: const MaterialApp(
|
||||
home: FavoritesPage(),
|
||||
),
|
||||
child: const MaterialApp(home: FavoritesPage()),
|
||||
);
|
||||
|
||||
void addItems() {
|
||||
@@ -28,8 +26,9 @@ void addItems() {
|
||||
|
||||
void main() {
|
||||
group('Favorites Page Widget Tests', () {
|
||||
testWidgets('Test if Placeholder shows in case of empty list',
|
||||
(tester) async {
|
||||
testWidgets('Test if Placeholder shows in case of empty list', (
|
||||
tester,
|
||||
) async {
|
||||
await tester.pumpWidget(createFavoritesScreen());
|
||||
|
||||
// Verify if the placeholder text shows up.
|
||||
|
||||
@@ -10,9 +10,7 @@ import 'package:testing_app/models/favorites.dart';
|
||||
|
||||
Widget createHomeScreen() => ChangeNotifierProvider<Favorites>(
|
||||
create: (context) => Favorites(),
|
||||
child: MaterialApp.router(
|
||||
routerConfig: router(),
|
||||
),
|
||||
child: MaterialApp.router(routerConfig: router()),
|
||||
);
|
||||
|
||||
void main() {
|
||||
|
||||
Reference in New Issue
Block a user