From 21b6b0a29a179748d93964dd24ea2acc904fe625 Mon Sep 17 00:00:00 2001 From: stcb <21@stcb.cc> Date: Sun, 15 Dec 2024 18:00:24 +0000 Subject: [PATCH] SafeArea (#11) Co-authored-by: AlexisDanlos <91090088+AlexisDanlos@users.noreply.github.com> Reviewed-on: https://git.gmoker.com/icing/G-EIP-700-TLS-7-1-eip-stephane.corbiere/pulls/11 --- dialer/lib/features/home/home_page.dart | 8 ++++---- dialer/lib/main.dart | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dialer/lib/features/home/home_page.dart b/dialer/lib/features/home/home_page.dart index 6cb729b..5552388 100644 --- a/dialer/lib/features/home/home_page.dart +++ b/dialer/lib/features/home/home_page.dart @@ -84,7 +84,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, @@ -96,10 +96,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( @@ -107,7 +107,7 @@ class _MyHomePageState extends State color: Colors.grey, size: 24.0, ), - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(12.0), ), 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()), ) ); }