Your commit message here

This commit is contained in:
2025-12-19 22:47:27 -06:00
parent 5d746d694e
commit 464692ce56
21 changed files with 3018 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
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 {
final user = ref.read(userProfileProvider);
if (user == null) return;
final selected = await showModalBottomSheet<BibleTranslation>(
context: context,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
),
builder: (context) => Container(
padding: const EdgeInsets.symmetric(vertical: 20),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
child: Text(
'Select Bible Translation',
style: Theme.of(context).textTheme.titleLarge,
),
),
...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),
)),
],
),
),
);
if (selected != null) {
await ref.read(userProfileProvider.notifier).updateProfile(
user.copyWith(bibleTranslation: selected)
);
}
}
}