From 09a308deac6af2abfb4e404727a9691d75ca963b Mon Sep 17 00:00:00 2001 From: Srie Teja Date: Tue, 21 May 2024 01:42:26 +0530 Subject: [PATCH 1/3] fix: replace deprecated elements with equivalent up-to-date items --- .../at_onboarding_flutter/example/lib/main.dart | 14 ++++---------- .../example/lib/switch_atsign.dart | 5 ++--- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/packages/at_onboarding_flutter/example/lib/main.dart b/packages/at_onboarding_flutter/example/lib/main.dart index 554445de..0b19d8f8 100644 --- a/packages/at_onboarding_flutter/example/lib/main.dart +++ b/packages/at_onboarding_flutter/example/lib/main.dart @@ -51,22 +51,16 @@ class _MyAppState extends State { theme: ThemeData().copyWith( brightness: Brightness.light, primaryColor: const Color(0xFFf4533d), - colorScheme: ThemeData.light().colorScheme.copyWith( + scaffoldBackgroundColor: Colors.white, colorScheme: ThemeData.light().colorScheme.copyWith( primary: const Color(0xFFf4533d), - ), - // ignore: deprecated_member_use - backgroundColor: Colors.white, - scaffoldBackgroundColor: Colors.white, + ).copyWith(surface: Colors.white), ), darkTheme: ThemeData().copyWith( brightness: Brightness.dark, primaryColor: Colors.blue, - colorScheme: ThemeData.dark().colorScheme.copyWith( + scaffoldBackgroundColor: Colors.grey[850], colorScheme: ThemeData.dark().colorScheme.copyWith( primary: Colors.blue, - ), - // ignore: deprecated_member_use - backgroundColor: Colors.grey[850], - scaffoldBackgroundColor: Colors.grey[850], + ).copyWith(surface: Colors.grey[850]), ), locale: _currentLocale, localizationsDelegates: const [ diff --git a/packages/at_onboarding_flutter/example/lib/switch_atsign.dart b/packages/at_onboarding_flutter/example/lib/switch_atsign.dart index fd101026..96f1edda 100644 --- a/packages/at_onboarding_flutter/example/lib/switch_atsign.dart +++ b/packages/at_onboarding_flutter/example/lib/switch_atsign.dart @@ -44,8 +44,7 @@ class _AtSignBottomSheetState extends State { child: Container( height: 100, width: screenSize.width, - // ignore: deprecated_member_use - color: Theme.of(context).backgroundColor, + color: Theme.of(context).canvasColor, child: Row( children: [ Expanded( @@ -101,7 +100,7 @@ class _AtSignBottomSheetState extends State { Text( widget.atSignList[index], // ignore: deprecated_member_use - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.bodyMedium, ) ], ), From 046fffff9dacc1a0c084b1bad009b52ff0378c2e Mon Sep 17 00:00:00 2001 From: Srie Teja Date: Tue, 21 May 2024 14:36:31 +0530 Subject: [PATCH 2/3] fix: replace deprecated elements with equivalent up-to-date items --- packages/at_onboarding_flutter/example/lib/main.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/at_onboarding_flutter/example/lib/main.dart b/packages/at_onboarding_flutter/example/lib/main.dart index 0b19d8f8..475c6bca 100644 --- a/packages/at_onboarding_flutter/example/lib/main.dart +++ b/packages/at_onboarding_flutter/example/lib/main.dart @@ -52,8 +52,8 @@ class _MyAppState extends State { brightness: Brightness.light, primaryColor: const Color(0xFFf4533d), scaffoldBackgroundColor: Colors.white, colorScheme: ThemeData.light().colorScheme.copyWith( - primary: const Color(0xFFf4533d), - ).copyWith(surface: Colors.white), + primary: const Color(0xFFf4533d), surface: Colors.white + ).copyWith(), ), darkTheme: ThemeData().copyWith( brightness: Brightness.dark, From bf07434d5c1c44305bab8ea6c9b59d072d9f5f42 Mon Sep 17 00:00:00 2001 From: Srie Teja Date: Tue, 21 May 2024 20:01:35 +0530 Subject: [PATCH 3/3] refactor: reformat styling for color themes in example/main --- .../at_onboarding_flutter/example/lib/main.dart | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/at_onboarding_flutter/example/lib/main.dart b/packages/at_onboarding_flutter/example/lib/main.dart index 475c6bca..ff276bb4 100644 --- a/packages/at_onboarding_flutter/example/lib/main.dart +++ b/packages/at_onboarding_flutter/example/lib/main.dart @@ -51,16 +51,17 @@ class _MyAppState extends State { theme: ThemeData().copyWith( brightness: Brightness.light, primaryColor: const Color(0xFFf4533d), - scaffoldBackgroundColor: Colors.white, colorScheme: ThemeData.light().colorScheme.copyWith( - primary: const Color(0xFFf4533d), surface: Colors.white - ).copyWith(), + scaffoldBackgroundColor: Colors.white, + colorScheme: ThemeData.light().colorScheme.copyWith( + primary: const Color(0xFFf4533d), surface: Colors.white), ), darkTheme: ThemeData().copyWith( brightness: Brightness.dark, primaryColor: Colors.blue, - scaffoldBackgroundColor: Colors.grey[850], colorScheme: ThemeData.dark().colorScheme.copyWith( - primary: Colors.blue, - ).copyWith(surface: Colors.grey[850]), + scaffoldBackgroundColor: Colors.grey[850], + colorScheme: ThemeData.dark() + .colorScheme + .copyWith(primary: Colors.blue, surface: Colors.grey[850]), ), locale: _currentLocale, localizationsDelegates: const [