0.1.2 #1

Merged
me merged 40 commits from dev into main 2026-09-28 04:36:44 -07:00
Showing only changes of commit 0e46307815 - Show all commits
+27 -19
View File
@@ -60,14 +60,10 @@ class _HomeScreenState extends State<HomeScreen> {
} }
Future<void> _initNotifications() async { Future<void> _initNotifications() async {
const androidInit = const androidInit = AndroidInitializationSettings('@mipmap/ic_launcher');
AndroidInitializationSettings('@mipmap/ic_launcher');
const iosInit = DarwinInitializationSettings(); const iosInit = DarwinInitializationSettings();
await _notifications.initialize( await _notifications.initialize(
const InitializationSettings( const InitializationSettings(android: androidInit, iOS: iosInit),
android: androidInit,
iOS: iosInit,
),
); );
} }
@@ -251,16 +247,20 @@ class _HomeScreenState extends State<HomeScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// --- Location section --- // --- Location section ---
const Text('Location', const Text(
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)), 'Location',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
const SizedBox(height: 8), const SizedBox(height: 8),
Row( Row(
children: [ children: [
Expanded( Expanded(
child: TextField( child: TextField(
controller: _latController, controller: _latController,
keyboardType: keyboardType: const TextInputType.numberWithOptions(
const TextInputType.numberWithOptions(signed: true, decimal: true), signed: true,
decimal: true,
),
decoration: const InputDecoration( decoration: const InputDecoration(
labelText: 'Latitude', labelText: 'Latitude',
border: OutlineInputBorder(), border: OutlineInputBorder(),
@@ -272,8 +272,10 @@ class _HomeScreenState extends State<HomeScreen> {
Expanded( Expanded(
child: TextField( child: TextField(
controller: _lngController, controller: _lngController,
keyboardType: keyboardType: const TextInputType.numberWithOptions(
const TextInputType.numberWithOptions(signed: true, decimal: true), signed: true,
decimal: true,
),
decoration: const InputDecoration( decoration: const InputDecoration(
labelText: 'Longitude', labelText: 'Longitude',
border: OutlineInputBorder(), border: OutlineInputBorder(),
@@ -292,8 +294,10 @@ class _HomeScreenState extends State<HomeScreen> {
const SizedBox(height: 16), const SizedBox(height: 16),
// --- Sunset time section --- // --- Sunset time section ---
const Text('Sunset', const Text(
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)), 'Sunset',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
const SizedBox(height: 8), const SizedBox(height: 8),
Row( Row(
children: [ children: [
@@ -309,7 +313,8 @@ class _HomeScreenState extends State<HomeScreen> {
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
IconButton.filledTonal( IconButton.filledTonal(
icon: _loading icon:
_loading
? const SizedBox( ? const SizedBox(
width: 20, width: 20,
height: 20, height: 20,
@@ -324,8 +329,10 @@ class _HomeScreenState extends State<HomeScreen> {
const SizedBox(height: 16), const SizedBox(height: 16),
// --- Minutes before --- // --- Minutes before ---
const Text('Alert Before Sunset', const Text(
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)), 'Alert Before Sunset',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
const SizedBox(height: 8), const SizedBox(height: 8),
Row( Row(
children: [ children: [
@@ -335,8 +342,9 @@ class _HomeScreenState extends State<HomeScreen> {
child: TextField( child: TextField(
controller: _minutesController, controller: _minutesController,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
decoration: decoration: const InputDecoration(
const InputDecoration(border: OutlineInputBorder()), border: OutlineInputBorder(),
),
onChanged: (v) { onChanged: (v) {
final val = int.tryParse(v); final val = int.tryParse(v);
if (val != null && val > 0) { if (val != null && val > 0) {