Resolve all lints and deprecation warnings

This commit is contained in:
2026-01-09 10:04:51 -06:00
parent 512577b092
commit a799e9cf59
56 changed files with 2819 additions and 3159 deletions

View File

@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../models/user_profile.dart';
import '../models/scripture.dart';
import '../theme/app_theme.dart';
import '../providers/user_provider.dart';
class BibleUtils {
static Future<void> showTranslationPicker(BuildContext context, WidgetRef ref) async {
static Future<void> showTranslationPicker(
BuildContext context, WidgetRef ref) async {
final user = ref.read(userProfileProvider);
if (user == null) return;
@@ -28,21 +28,21 @@ class BibleUtils {
),
),
...BibleTranslation.values.map((t) => ListTile(
title: Text(t.label),
trailing: user.bibleTranslation == t
? const Icon(Icons.check, color: AppColors.sageGreen)
: null,
onTap: () => Navigator.pop(context, t),
)),
title: Text(t.label),
trailing: user.bibleTranslation == t
? const Icon(Icons.check, color: AppColors.sageGreen)
: null,
onTap: () => Navigator.pop(context, t),
)),
],
),
),
);
if (selected != null) {
await ref.read(userProfileProvider.notifier).updateProfile(
user.copyWith(bibleTranslation: selected)
);
await ref
.read(userProfileProvider.notifier)
.updateProfile(user.copyWith(bibleTranslation: selected));
}
}
}