From e0e92c41d3103b99d23f96cd23b4a92392af418c Mon Sep 17 00:00:00 2001 From: MohammadTaha Basiri Date: Fri, 11 Feb 2022 20:08:58 +0330 Subject: [PATCH] migration to new dart version changes --- lib/config/theme_data.dart | 8 ++++---- lib/pages/authentication/authentication_state.dart | 1 + lib/services/network/request_helper.dart | 1 + lib/widgets/didvan/button.dart | 1 + lib/widgets/didvan/text_field.dart | 3 +++ 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/config/theme_data.dart b/lib/config/theme_data.dart index d605c2a..c2c4516 100644 --- a/lib/config/theme_data.dart +++ b/lib/config/theme_data.dart @@ -36,9 +36,9 @@ class LightThemeConfig { static const ColorScheme _colorScheme = ColorScheme( primary: _primary, - primaryVariant: _white, + primaryContainer: _white, secondary: Color(0xFFD61515), - secondaryVariant: _white, + secondaryContainer: _white, surface: _white, background: _background, error: Color(0xFFF00505), @@ -116,9 +116,9 @@ class DarkThemeConfig { static const ColorScheme _colorScheme = ColorScheme( primary: _primary, - primaryVariant: _white, + primaryContainer: _white, secondary: Color(0xFFE53939), - secondaryVariant: _white, + secondaryContainer: _white, surface: Color(0xFF181B1F), background: _background, error: Color(0xFFF53B3B), diff --git a/lib/pages/authentication/authentication_state.dart b/lib/pages/authentication/authentication_state.dart index 7894f4e..7efa3ba 100644 --- a/lib/pages/authentication/authentication_state.dart +++ b/lib/pages/authentication/authentication_state.dart @@ -55,5 +55,6 @@ class AuthenticationState extends CoreProvier { appState = AppState.failed; ActionSheetUtils.showAlert(AlertData(message: service.errorMessage)); } + return null; } } diff --git a/lib/services/network/request_helper.dart b/lib/services/network/request_helper.dart index c48c96d..bc2278c 100644 --- a/lib/services/network/request_helper.dart +++ b/lib/services/network/request_helper.dart @@ -112,5 +112,6 @@ class RequestHelper { } return result; } + return null; } } diff --git a/lib/widgets/didvan/button.dart b/lib/widgets/didvan/button.dart index 9160709..bb8e6ea 100644 --- a/lib/widgets/didvan/button.dart +++ b/lib/widgets/didvan/button.dart @@ -75,5 +75,6 @@ class DidvanButton extends StatelessWidget { color: enabled ? color : Theme.of(context).colorScheme.disabledText, ); } + return null; } } diff --git a/lib/widgets/didvan/text_field.dart b/lib/widgets/didvan/text_field.dart index e8fbeb4..f8dd15c 100644 --- a/lib/widgets/didvan/text_field.dart +++ b/lib/widgets/didvan/text_field.dart @@ -152,6 +152,7 @@ class _DidvanTextFieldState extends State { if (_error != null) { return Theme.of(context).colorScheme.error; } + return null; } Color _fillColor() { @@ -185,6 +186,7 @@ class _DidvanTextFieldState extends State { ), ); } + return null; } void _onChanged(String value) { @@ -209,6 +211,7 @@ class _DidvanTextFieldState extends State { }); } } + return null; } @override