This commit is contained in:
kleponijo 2026-07-05 07:39:30 +07:00
parent 85dd04c850
commit 243add9dc3
4 changed files with 8 additions and 8 deletions

View File

@ -23,6 +23,7 @@ const _kAverageOptions = <String, int>{
'30 detik': 30000,
'1 menit': 60000,
'5 menit': 300000,
'6 menit': 360000,
'10 menit': 600000,
'30 menit': 1800000,
};
@ -31,6 +32,7 @@ const _kAverageOptions = <String, int>{
const _kHistoryOptions = <String, int>{
'30 detik': 30000,
'1 menit': 60000,
'6 menit': 360000,
'10 menit': 600000,
'30 menit': 1800000,
'1 jam': 3600000,

View File

@ -423,10 +423,10 @@ class WindSpeedBloc extends Bloc<WindSpeedEvent, WindSpeedState> {
if (speed >= _kWindDanger) {
severity = AlertSeverity.danger;
message = 'Kecepatan angin ${speed.toStringAsFixed(1)} m/s — BAHAYA';
message = 'Kecepatan angin ${speed.toStringAsFixed(1)} km/h — BAHAYA';
} else if (speed >= _kWindWarning) {
severity = AlertSeverity.warning;
message = 'Kecepatan angin ${speed.toStringAsFixed(1)} m/s — waspada';
message = 'Kecepatan angin ${speed.toStringAsFixed(1)} km/h — waspada';
} else {
severity = AlertSeverity.info;
message = '';

View File

@ -758,11 +758,6 @@ class _WindSpeedScreenState extends State<WindSpeedScreen> {
const Text('km/h',
style: TextStyle(fontSize: 20, color: Colors.white70)),
const SizedBox(height: 4),
Text(
'${(speed / 3.6).toStringAsFixed(3)} m/s',
style: const TextStyle(fontSize: 14, color: Colors.white54),
),
const SizedBox(height: 14),
Container(
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 7),
decoration: BoxDecoration(

View File

@ -1,5 +1,6 @@
class MyWindSpeed {
final double windwegKm;
final double speedKmh;
final double totalWindwegKm;
final double maxWindwegKm;
final int totalPulse;
@ -8,6 +9,7 @@ class MyWindSpeed {
MyWindSpeed({
required this.windwegKm,
this.speedKmh = 0.0,
this.totalWindwegKm = 0.0,
this.maxWindwegKm = 0.0,
this.totalPulse = 0,
@ -16,7 +18,7 @@ class MyWindSpeed {
});
// Getter alias untuk kompatibilitas dengan bloc/chart yang pakai .speed
double get speed => windwegKm;
double get speed => speedKmh;
double get maxSpeed => maxWindwegKm;
static final empty = MyWindSpeed(
@ -33,6 +35,7 @@ class MyWindSpeed {
json['speed'] ??
0))
.toDouble(),
speedKmh: (json['speed_kmh'] ?? 0).toDouble(),
totalWindwegKm: (json['total_windweg_km'] ?? 0).toDouble(),
maxWindwegKm: (json['max_windweg_km'] ?? 0).toDouble(),
totalPulse: (json['total_pulse'] ?? 0) as int,