Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b877f3807 | ||
|
|
4591dc591d | ||
|
|
86069dce2f | ||
|
|
6b7b91daac | ||
|
|
c61521c4d7 | ||
|
|
9b5162216e | ||
|
|
7078dcd560 | ||
|
|
86ffb773df | ||
|
|
2b1d382069 | ||
|
|
8455f14ed8 | ||
|
|
7d5667d253 | ||
|
|
4c3c087e98 | ||
|
|
c8f314dcc7 | ||
|
|
2770c13a94 | ||
|
|
b33218fa60 | ||
|
|
c629162c44 | ||
|
|
41041e9105 | ||
|
|
1ac28bb8e5 | ||
|
|
b42ead1771 | ||
|
|
c0f9b58569 | ||
|
|
77e964a4c7 | ||
|
|
21f7236957 | ||
|
|
ea5a64ccdd | ||
|
|
e51239ab1c | ||
|
|
af32c1e313 | ||
|
|
4f15f94629 | ||
|
|
b02a6ff80a | ||
|
|
b649c9c1e7 | ||
|
|
23ca37c671 | ||
|
|
11616841b3 | ||
|
|
085031bc26 |
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
1. Install Flutter SDK
|
||||||
|
2. Install Android SDK
|
||||||
|
3. Clone Repo
|
||||||
|
4. Run `compile.sh`
|
||||||
|
5. Check `releases/` Folder
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 1.1.0 (In Development)
|
||||||
|
|
||||||
|
Usability improvements.
|
||||||
|
|
||||||
|
- move switchtile back to its own row
|
||||||
|
- allows showing text without crowding out or hiding minutes field
|
||||||
|
- fix monochrome icons, source was not white which may have been causing issues
|
||||||
|
- begin creating tar files for Linux rather than zips, will use zstd on release
|
||||||
|
- begin using a proper release signature rather that flutter's debug.
|
||||||
|
- update internal plugin versions.
|
||||||
|
|
||||||
|
This version may require uninstalling any previous versions before updating
|
||||||
|
due to the signature change. It is a one-time event.
|
||||||
|
|
||||||
|
## 1.0.1 (2026-09-29)
|
||||||
|
|
||||||
|
Fixes for issues on hardware devices.
|
||||||
|
|
||||||
|
- fix internet access on some devices
|
||||||
|
- fix SSL certificate issues on older devices
|
||||||
|
- fix null minutes making a null alarm time
|
||||||
|
- fix enabling alarm with no time set yet
|
||||||
|
- enhance the icon for older devices
|
||||||
|
- upgrade SDKs and compilers
|
||||||
|
|
||||||
|
## 1.0.0 (2026-09-28)
|
||||||
|
|
||||||
|
Completed the app for Android which also brings many benefits to the Linux version.
|
||||||
|
|
||||||
|
**Android**
|
||||||
|
|
||||||
|
- upgraded from single notification to alarm
|
||||||
|
- platform specific APK to help reduce file size
|
||||||
|
|
||||||
|
**Both**
|
||||||
|
|
||||||
|
- automatic dark theme if system is set to dark
|
||||||
|
- input validation on sunset time and minutes
|
||||||
|
- alarm now properly resets if time is changed
|
||||||
|
- add optional time picker for sunset time field
|
||||||
|
- only do the permission request on Android
|
||||||
|
- more consistent verbiage and text styling
|
||||||
|
- enhanced icon and added monochrome
|
||||||
|
- added file necessary for F-Droid repo
|
||||||
|
- updated flutter package versions
|
||||||
|
|
||||||
|
This release has been tested tested tested, but only on emulators (x86_64). If you have any issues, please reach out.
|
||||||
|
|
||||||
|
From now on only the arm64-v8a APK will be provided.
|
||||||
|
|
||||||
|
## 0.1.2 (2026-09-28)
|
||||||
|
|
||||||
|
- add icon
|
||||||
|
- fix notification on Android
|
||||||
|
- allow minutes to be 0
|
||||||
|
- show toast if invalid minute value is provided
|
||||||
|
- enhance compile.sh to allow easier publications
|
||||||
|
- other small fixes and enhancements
|
||||||
|
|
||||||
|
## 0.1.1 (2026-09-13)
|
||||||
|
|
||||||
|
Linux version tested and now has alarm notification working.
|
||||||
|
|
||||||
|
Android still needs testing and fixes.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# To Be Done
|
||||||
|
|
||||||
|
Upcoming feature list. All notes subject to change.
|
||||||
|
|
||||||
|
## Patch
|
||||||
|
|
||||||
|
- Change time grabber to a checkbox so that it stays up to date.
|
||||||
|
|
||||||
|
## Minor
|
||||||
|
|
||||||
|
- Cancel and reschedule alarm when minutes are changed.
|
||||||
|
- Add languages (Spanish, Croatian).
|
||||||
|
|
||||||
|
## Major
|
||||||
|
|
||||||
|
- Add sunrise section and retitle app to Sunshine Alarm.
|
||||||
@@ -15,8 +15,6 @@ android {
|
|||||||
compileSdk = flutter.compileSdkVersion
|
compileSdk = flutter.compileSdkVersion
|
||||||
ndkVersion = flutter.ndkVersion
|
ndkVersion = flutter.ndkVersion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
isCoreLibraryDesugaringEnabled = true
|
isCoreLibraryDesugaringEnabled = true
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
@@ -77,3 +75,27 @@ dependencies {
|
|||||||
flutter {
|
flutter {
|
||||||
source = "../.."
|
source = "../.."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// To use this, first be in $PROJ/android/, then run: ./gradlew printFlutterVariables
|
||||||
|
tasks.register("printFlutterVariables") {
|
||||||
|
description = "Print Local Flutter Variables"
|
||||||
|
doLast {
|
||||||
|
// android //
|
||||||
|
// compileSdk = flutter.compileSdkVersion
|
||||||
|
println("compileSdk: ${android.compileSdk}")
|
||||||
|
println("compileSdkVersion: ${android.compileSdkVersion}")
|
||||||
|
// ndkVersion = flutter.ndkVersion
|
||||||
|
println("ndkVersion: ${android.ndkVersion}")
|
||||||
|
|
||||||
|
// android.defaultConfig //
|
||||||
|
// minSdk = flutter.minSdkVersion
|
||||||
|
println("minSdk: ${android.defaultConfig.minSdk}")
|
||||||
|
// targetSdk = flutter.targetSdkVersion
|
||||||
|
println("targetSdk: ${android.defaultConfig.targetSdk}")
|
||||||
|
println("targetSdkVersion: ${android.defaultConfig.targetSdkVersion}")
|
||||||
|
// versionCode = flutter.versionCode
|
||||||
|
println("versionCode: ${android.defaultConfig.versionCode}")
|
||||||
|
// versionName = flutter.versionName
|
||||||
|
println("versionName: ${android.defaultConfig.versionName}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 7.6 KiB |
@@ -1,7 +1,6 @@
|
|||||||
#Sat Sep 12 19:36:23 MST 2026
|
#Sat Sep 12 19:36:23 MST 2026
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip
|
||||||
#distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
@@ -19,12 +19,11 @@ pluginManagement {
|
|||||||
plugins {
|
plugins {
|
||||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||||
|
|
||||||
id("com.android.application") version "9.4.1" apply false
|
id("com.android.application") version "9.5.0" apply false
|
||||||
//id("com.android.application") version "9.0.1" apply false
|
|
||||||
|
|
||||||
// This will need removed in Gradle/AGP 9. JK - needs to exist otherwiese:
|
// This will need removed in Gradle/AGP 9. JK - needs to exist otherwiese:
|
||||||
// "Error: Your project's Kotlin version (2.2.10) is lower than Flutter's minimum supported version of 2.2.20."
|
// "Error: Your project's Kotlin version (2.2.10) is lower than Flutter's minimum supported version of 2.2.20."
|
||||||
id("org.jetbrains.kotlin.android") version "2.4.20" apply false
|
id("org.jetbrains.kotlin.android") version "2.4.21" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
include(":app")
|
include(":app")
|
||||||
@@ -60,14 +60,29 @@ set -x
|
|||||||
flutter build linux ${BUILD_OPTIONS[@]}
|
flutter build linux ${BUILD_OPTIONS[@]}
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
log "Saving Linux Bundle..."
|
log "- zip"
|
||||||
filename=$RELEASE.linux-bundle.zip
|
filename=$RELEASE.linux-bundle.zip
|
||||||
|
contents="build/linux/x64/release/bundle/"
|
||||||
if [[ -e $filename ]]; then
|
if [[ -e $filename ]]; then
|
||||||
rm -v $filename
|
rm -v $filename
|
||||||
fi
|
fi
|
||||||
zip -r $filename build/linux/x64/release/bundle/*
|
set -x
|
||||||
|
zip -qr "$filename" "$contents"/*
|
||||||
|
set +x
|
||||||
ls -sh $filename
|
ls -sh $filename
|
||||||
|
|
||||||
|
log "- tar"
|
||||||
|
filename=$RELEASE.linux-bundle.tar
|
||||||
|
if [[ -e "$filename"* ]]; then
|
||||||
|
rm -v "$filename"*
|
||||||
|
fi
|
||||||
|
set -x
|
||||||
|
tar -c --zstd -f "${filename}.zst" -C "$contents" .
|
||||||
|
tar -cz -f "${filename}.gz" -C "$contents" .
|
||||||
|
tar -cJ -f "${filename}.xz" -C "$contents" .
|
||||||
|
set +x
|
||||||
|
ls -sh "$filename"* | sort -h
|
||||||
|
|
||||||
# Android
|
# Android
|
||||||
|
|
||||||
log "Building Universal APK..."
|
log "Building Universal APK..."
|
||||||
@@ -99,9 +114,8 @@ for apk in `ls build/app/outputs/flutter-apk/app*release.apk`; do
|
|||||||
filename=`basename $apk`
|
filename=`basename $apk`
|
||||||
filename=${filename//app/${RELEASE}}
|
filename=${filename//app/${RELEASE}}
|
||||||
cp -v "$apk" "$filename"
|
cp -v "$apk" "$filename"
|
||||||
ls -sh "$filename"
|
|
||||||
echo " "
|
|
||||||
done
|
done
|
||||||
|
ls -sh release/*.apk | sort -h
|
||||||
|
|
||||||
# Finish
|
# Finish
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
description: This file stores settings for Dart & Flutter DevTools.
|
||||||
|
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
||||||
|
extensions:
|
||||||
@@ -17,14 +17,6 @@ import 'dart:convert';
|
|||||||
//import 'package:http/http.dart' as http;
|
//import 'package:http/http.dart' as http;
|
||||||
import 'package:flutter/services.dart' show rootBundle;
|
import 'package:flutter/services.dart' show rootBundle;
|
||||||
|
|
||||||
/// TBD:
|
|
||||||
/// - Add other languages (Spanish, Croatian)
|
|
||||||
/// v1.1.0
|
|
||||||
/// - Change sunset grabber to checkbox and retrieve it each alarm or open.
|
|
||||||
/// v2.0.0
|
|
||||||
/// - Add sunrise section and change app name to Sunshine Alarm?
|
|
||||||
/// :TBD
|
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
@@ -121,14 +113,20 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
Future<void> _loadPrefs() async {
|
Future<void> _loadPrefs() async {
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs = await SharedPreferences.getInstance();
|
||||||
setState(() {
|
setState(() {
|
||||||
_latController.text = prefs.getDouble('lat').toString();
|
final lat = prefs.getDouble('lat').toString();
|
||||||
_lngController.text = prefs.getDouble('lng').toString();
|
final lng = prefs.getDouble('lng').toString();
|
||||||
_sunsetController.text = prefs.getString('sunset_time').toString();
|
final sun = prefs.getString('sunset_time');
|
||||||
_alarmEnabled = prefs.getBool('alarm_enabled') ?? false;
|
_latController.text = (lat == "null") ? "" : lat;
|
||||||
|
_lngController.text = (lng == "null") ? "" : lng;
|
||||||
|
_sunsetController.text = sun ?? "";
|
||||||
|
|
||||||
_minutesBefore = prefs.getInt('minutes_before') ?? 30;
|
_minutesBefore = prefs.getInt('minutes_before') ?? 30;
|
||||||
_minutesController.text = _minutesBefore.toString();
|
_minutesController.text = _minutesBefore.toString();
|
||||||
_plural = prefs.getString('plural').toString();
|
|
||||||
|
_alarmEnabled = prefs.getBool('alarm_enabled') ?? false;
|
||||||
_validTime = prefs.getBool('valid_time') ?? false;
|
_validTime = prefs.getBool('valid_time') ?? false;
|
||||||
|
|
||||||
|
_calcPlural();
|
||||||
});
|
});
|
||||||
if (_alarmEnabled && _sunsetController.text.isNotEmpty) {
|
if (_alarmEnabled && _sunsetController.text.isNotEmpty) {
|
||||||
_scheduleAlarm();
|
_scheduleAlarm();
|
||||||
@@ -146,7 +144,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
}
|
}
|
||||||
await prefs.setBool('alarm_enabled', _alarmEnabled);
|
await prefs.setBool('alarm_enabled', _alarmEnabled);
|
||||||
await prefs.setInt('minutes_before', _minutesBefore);
|
await prefs.setInt('minutes_before', _minutesBefore);
|
||||||
await prefs.setString('plural', _plural);
|
|
||||||
await prefs.setBool('valid_time', _validTime);
|
await prefs.setBool('valid_time', _validTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,7 +205,10 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
_showSnack('Network Error: $e');
|
_showSnack('Network Error: $e');
|
||||||
} finally {
|
} finally {
|
||||||
setState(() => _loading = false);
|
setState(() {
|
||||||
|
_loading = false;
|
||||||
|
_validTime = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_alarmEnabled) {
|
if (_alarmEnabled) {
|
||||||
@@ -377,7 +377,9 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String? _validateTime(String? value) {
|
String? _validateTime(String? value) {
|
||||||
|
setState(() {
|
||||||
_validTime = false;
|
_validTime = false;
|
||||||
|
});
|
||||||
if (value == null || !RegExp(r'^\d{2}:\d{2}$').hasMatch(value)) {
|
if (value == null || !RegExp(r'^\d{2}:\d{2}$').hasMatch(value)) {
|
||||||
return 'Use HH:MM Format';
|
return 'Use HH:MM Format';
|
||||||
}
|
}
|
||||||
@@ -385,10 +387,18 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
final m = int.parse(value.substring(3, 5));
|
final m = int.parse(value.substring(3, 5));
|
||||||
if (h > 23) return 'Hour Must Be 0–23';
|
if (h > 23) return 'Hour Must Be 0–23';
|
||||||
if (m > 59) return 'Minute Must Be 0–59';
|
if (m > 59) return 'Minute Must Be 0–59';
|
||||||
|
setState(() {
|
||||||
_validTime = true;
|
_validTime = true;
|
||||||
|
});
|
||||||
return null; // valid
|
return null; // valid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _calcPlural() {
|
||||||
|
setState(() {
|
||||||
|
_plural = (_minutesBefore == 1) ? '' : 's';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@@ -531,11 +541,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
|
|
||||||
// --- Minutes before ---
|
// --- Minutes before ---
|
||||||
Row(
|
TextField(
|
||||||
children: [
|
|
||||||
if (!_alarmEnabled)
|
|
||||||
Expanded(
|
|
||||||
child: TextField(
|
|
||||||
controller: _minutesController,
|
controller: _minutesController,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
@@ -552,33 +558,33 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
} else {
|
} else {
|
||||||
_minuteErrorText = 'Invalid Minute Value';
|
_minuteErrorText = 'Invalid Minute Value';
|
||||||
}
|
}
|
||||||
_plural = (_minutesBefore == 1) ? '' : 's';
|
_calcPlural();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
|
||||||
|
|
||||||
// --- Toggle ---
|
// --- Toggle ---
|
||||||
Expanded(
|
SwitchListTile(
|
||||||
child:
|
title: Center(
|
||||||
_validTime
|
child: Text(
|
||||||
? SwitchListTile(
|
|
||||||
title: Text(
|
|
||||||
_alarmEnabled ? 'Sunset Alarm Enabled' : "",
|
|
||||||
),
|
|
||||||
subtitle: Text(
|
|
||||||
_validTime
|
_validTime
|
||||||
? _alarmEnabled
|
? _alarmEnabled
|
||||||
? '${_minutesBefore} Minute${_plural} Before @ $_alarmDisplayTime'
|
? "Sunset Alarm Enabled"
|
||||||
: ""
|
: "Enable"
|
||||||
: "Add Time",
|
: "Disabled",
|
||||||
),
|
),
|
||||||
value: _alarmEnabled,
|
|
||||||
onChanged: _toggleAlarm,
|
|
||||||
)
|
|
||||||
: Center(child: Text("Sunset Time Invalid")),
|
|
||||||
),
|
),
|
||||||
],
|
subtitle: Center(
|
||||||
|
child: Text(
|
||||||
|
_validTime
|
||||||
|
? _alarmEnabled
|
||||||
|
? "${_minutesBefore} Minute${_plural} Before @ $_alarmDisplayTime"
|
||||||
|
: "Sunset Alarm"
|
||||||
|
: "Enter Valid Time",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
value: _validTime ? _alarmEnabled : false,
|
||||||
|
onChanged: _validTime ? _toggleAlarm : null,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.6 KiB |
@@ -1,7 +1,7 @@
|
|||||||
name: sunset_alarm
|
name: sunset_alarm
|
||||||
description: "Set an alarm to go off a specified time before sunset."
|
description: "Set an alarm to go off a specified time before sunset."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.0.1
|
version: 1.1.0
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.7.2
|
sdk: ^3.7.2
|
||||||
|
|||||||