Evaporasi list: show evaporasi + suhu with firebase timestamp
This commit is contained in:
parent
42bac0c980
commit
2675ed7bd4
|
|
@ -310,8 +310,11 @@ class EvaporasiScreen extends StatelessWidget {
|
||||||
separatorBuilder: (_, __) => const Divider(height: 1),
|
separatorBuilder: (_, __) => const Divider(height: 1),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final e = data[index];
|
final e = data[index];
|
||||||
final dateLabel = DateFormat('dd MMM yyyy HH:mm:ss', 'id_ID')
|
final dateLabel = DateFormat('dd MMM yyyy', 'id_ID')
|
||||||
.format(e.timestamp);
|
.format(e.timestamp) +
|
||||||
|
' • ' +
|
||||||
|
DateFormat('HH:mm:ss', 'id_ID').format(e.timestamp);
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
@ -328,6 +331,9 @@ class EvaporasiScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'${e.evaporasi.toStringAsFixed(1)} mm',
|
'${e.evaporasi.toStringAsFixed(1)} mm',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
|
@ -336,6 +342,17 @@ class EvaporasiScreen extends StatelessWidget {
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text(
|
||||||
|
'${e.suhu.toStringAsFixed(1)} °C',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.orange.shade700,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue