chore: bump line length to 120 (#20191)

This commit is contained in:
shenlong
2025-07-25 08:07:22 +05:30
committed by GitHub
parent 977c9b96ba
commit ad65e9011a
517 changed files with 4520 additions and 9514 deletions
@@ -18,12 +18,8 @@ class PeopleInfo extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final peopleProvider =
ref.watch(assetPeopleNotifierProvider(asset).notifier);
final people = ref
.watch(assetPeopleNotifierProvider(asset))
.value
?.where((p) => !p.isHidden);
final peopleProvider = ref.watch(assetPeopleNotifierProvider(asset).notifier);
final people = ref.watch(assetPeopleNotifierProvider(asset)).value?.where((p) => !p.isHidden);
showPersonNameEditModel(
String personId,
@@ -46,8 +42,7 @@ class PeopleInfo extends ConsumerWidget {
(p) => SearchCuratedContent(
id: p.id,
label: p.name,
subtitle: p.birthDate != null &&
p.birthDate!.isBefore(asset.fileCreatedAt)
subtitle: p.birthDate != null && p.birthDate!.isBefore(asset.fileCreatedAt)
? _formatAge(p.birthDate!, asset.fileCreatedAt)
: null,
),
@@ -56,9 +51,7 @@ class PeopleInfo extends ConsumerWidget {
[];
return AnimatedCrossFade(
crossFadeState: (people?.isEmpty ?? true)
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
crossFadeState: (people?.isEmpty ?? true) ? CrossFadeState.showFirst : CrossFadeState.showSecond,
duration: const Duration(milliseconds: 200),
firstChild: Container(),
secondChild: Padding(
@@ -109,22 +102,18 @@ class PeopleInfo extends ConsumerWidget {
int ageInMonths = _calculateAgeInMonths(birthDate, referenceDate);
if (ageInMonths <= 11) {
return "exif_bottom_sheet_person_age_months"
.tr(namedArgs: {'months': ageInMonths.toString()});
return "exif_bottom_sheet_person_age_months".tr(namedArgs: {'months': ageInMonths.toString()});
} else if (ageInMonths > 12 && ageInMonths <= 23) {
return "exif_bottom_sheet_person_age_year_months"
.tr(namedArgs: {'months': (ageInMonths - 12).toString()});
return "exif_bottom_sheet_person_age_year_months".tr(namedArgs: {'months': (ageInMonths - 12).toString()});
} else {
return "exif_bottom_sheet_person_age_years"
.tr(namedArgs: {'years': ageInYears.toString()});
return "exif_bottom_sheet_person_age_years".tr(namedArgs: {'years': ageInYears.toString()});
}
}
int _calculateAge(DateTime birthDate, DateTime referenceDate) {
int age = referenceDate.year - birthDate.year;
if (referenceDate.month < birthDate.month ||
(referenceDate.month == birthDate.month &&
referenceDate.day < birthDate.day)) {
(referenceDate.month == birthDate.month && referenceDate.day < birthDate.day)) {
age--;
}
return age;