fix: cast birthYear subtraction to int to fix build error
This commit is contained in:
parent
6e8cc5d802
commit
f48274706a
|
|
@ -425,7 +425,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
|||
bool isUnder18 = false;
|
||||
if (profile != null && profile.birthYear > 0) {
|
||||
final now = DateTime.now();
|
||||
int age = now.year - profile.birthYear;
|
||||
int age = (now.year - profile.birthYear).toInt();
|
||||
if (now.month < profile.birthMonth) age--;
|
||||
isUnder18 = age < 18;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue