From 66b743557480368f53ae04d4186c969de3f50485 Mon Sep 17 00:00:00 2001 From: AlexisDanlos <91090088+AlexisDanlos@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:03:49 +0100 Subject: [PATCH 1/2] Added SafeArea class to avoid OS interface --- dialer/lib/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dialer/lib/main.dart b/dialer/lib/main.dart index 582e5de..a9ca957 100644 --- a/dialer/lib/main.dart +++ b/dialer/lib/main.dart @@ -16,7 +16,7 @@ class MyApp extends StatelessWidget { theme: ThemeData( brightness: Brightness.dark ), - home: const MyHomePage(), + home: SafeArea(child: MyHomePage()), ) ); } -- 2.45.2 From 4a8478c20db32fa3b1b732a3d6a6760f3975b4f2 Mon Sep 17 00:00:00 2001 From: AlexisDanlos <91090088+AlexisDanlos@users.noreply.github.com> Date: Fri, 6 Dec 2024 19:26:24 +0100 Subject: [PATCH 2/2] fix: replace MaterialStateProperty with WidgetStateProperty in SearchBar --- dialer/lib/features/home/home_page.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dialer/lib/features/home/home_page.dart b/dialer/lib/features/home/home_page.dart index f16de1f..517aa97 100644 --- a/dialer/lib/features/home/home_page.dart +++ b/dialer/lib/features/home/home_page.dart @@ -83,7 +83,7 @@ class _MyHomePageState extends State builder: (BuildContext context, SearchController controller) { return SearchBar( controller: controller, - padding: MaterialStateProperty.all( + padding: WidgetStateProperty.all( const EdgeInsets.only( top: 6.0, bottom: 6.0, @@ -95,10 +95,10 @@ class _MyHomePageState extends State controller.openView(); _onSearchChanged(''); }, - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( const Color.fromARGB(255, 30, 30, 30)), hintText: 'Search contacts', - hintStyle: MaterialStateProperty.all( + hintStyle: WidgetStateProperty.all( const TextStyle(color: Colors.grey, fontSize: 16.0), ), leading: const Icon( @@ -106,7 +106,7 @@ class _MyHomePageState extends State color: Colors.grey, size: 24.0, ), - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(12.0), ), -- 2.45.2