From c2bf0af0cb30f78f0ed333c93c3e210423e1ae62 Mon Sep 17 00:00:00 2001 From: Kai Nakamura <71023066+Uniyo-Ltd@users.noreply.github.com> Date: Fri, 17 Jan 2025 21:56:36 +0200 Subject: [PATCH] refactor(flutter_infinite_list): remove unnecessary `Material` widget (#4338) Co-authored-by: Felix Angelov --- .../lib/posts/widgets/post_list_item.dart | 14 ++++++-------- .../test/posts/view/posts_list_test.dart | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/examples/flutter_infinite_list/lib/posts/widgets/post_list_item.dart b/examples/flutter_infinite_list/lib/posts/widgets/post_list_item.dart index 1b7833e9b45..22a9ee8b125 100644 --- a/examples/flutter_infinite_list/lib/posts/widgets/post_list_item.dart +++ b/examples/flutter_infinite_list/lib/posts/widgets/post_list_item.dart @@ -9,14 +9,12 @@ class PostListItem extends StatelessWidget { @override Widget build(BuildContext context) { final textTheme = Theme.of(context).textTheme; - return Material( - child: ListTile( - leading: Text('${post.id}', style: textTheme.bodySmall), - title: Text(post.title), - isThreeLine: true, - subtitle: Text(post.body), - dense: true, - ), + return ListTile( + leading: Text('${post.id}', style: textTheme.bodySmall), + title: Text(post.title), + isThreeLine: true, + subtitle: Text(post.body), + dense: true, ); } } diff --git a/examples/flutter_infinite_list/test/posts/view/posts_list_test.dart b/examples/flutter_infinite_list/test/posts/view/posts_list_test.dart index 96e9c53a0d5..ff6006e938b 100644 --- a/examples/flutter_infinite_list/test/posts/view/posts_list_test.dart +++ b/examples/flutter_infinite_list/test/posts/view/posts_list_test.dart @@ -15,7 +15,7 @@ extension on WidgetTester { MaterialApp( home: BlocProvider.value( value: postBloc, - child: PostsList(), + child: Scaffold(body: PostsList()), ), ), );