From 8392135698bb22a7ffd50b65b02aedfb6b598e58 Mon Sep 17 00:00:00 2001 From: maxxkim Date: Tue, 23 Apr 2024 08:48:19 +0000 Subject: [PATCH] revert c486ee6b986431ef58ad5a5aa14176bb2fa13510 revert --- lib/localization/app_localization.dart | 1 + .../date_of_birth_screen/date_of_birth_screen.dart | 12 +++++++----- lib/theme/bloc/theme_bloc.dart | 1 + lib/theme/custom_text_style.dart | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/localization/app_localization.dart b/lib/localization/app_localization.dart index 1405c02e..4701a670 100644 --- a/lib/localization/app_localization.dart +++ b/lib/localization/app_localization.dart @@ -2,6 +2,7 @@ import 'ru/ru_translations.dart'; //import 'en_us/en_us_translations.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/cupertino.dart'; +import '../core/app_export.dart'; class AppLocalization { AppLocalization(this.locale); diff --git a/lib/presentation/registration/date_of_birth_screen/date_of_birth_screen.dart b/lib/presentation/registration/date_of_birth_screen/date_of_birth_screen.dart index 7015d217..df859872 100644 --- a/lib/presentation/registration/date_of_birth_screen/date_of_birth_screen.dart +++ b/lib/presentation/registration/date_of_birth_screen/date_of_birth_screen.dart @@ -160,10 +160,12 @@ class _DateOfBirthScreenState extends State { DateTime.now().day, ), ); - if (mounted) { - setState(() { - selectedDate = dateTime; - }); - } + if (dateTime != null) { + if (mounted) { + setState(() { + selectedDate = dateTime; + }); + } } + } } diff --git a/lib/theme/bloc/theme_bloc.dart b/lib/theme/bloc/theme_bloc.dart index b80c4314..60f947d2 100644 --- a/lib/theme/bloc/theme_bloc.dart +++ b/lib/theme/bloc/theme_bloc.dart @@ -1,5 +1,6 @@ import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; +import '../../core/app_export.dart'; part 'theme_event.dart'; part 'theme_state.dart'; diff --git a/lib/theme/custom_text_style.dart b/lib/theme/custom_text_style.dart index 7565b69e..ff969f92 100644 --- a/lib/theme/custom_text_style.dart +++ b/lib/theme/custom_text_style.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import '../core/app_export.dart'; /// A collection of pre-defined text styles for customizing text appearance, /// categorized by different font families and weights.