fix(ui): Fix some ui bugs in DetailDeviceScreen, HomeScreen, UnregisterDeviceDialog
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:sfm_app/feature/home/device_alias_model.dart';
|
||||
import '../../../product/constant/enums/app_route_enums.dart';
|
||||
import '../../../product/constant/image/image_constants.dart';
|
||||
@@ -19,7 +20,15 @@ Future<Widget> notificationCard(BuildContext context, String notiticationType,
|
||||
.getFullDeviceLocation(context, device.areaPath!);
|
||||
}
|
||||
String path = "";
|
||||
DateTime time = DateTime.now();
|
||||
// DateTime time = DateTime.now();
|
||||
String time = "";
|
||||
for (var sensor in device.status!.sensors!) {
|
||||
if (sensor.name! == "7") {
|
||||
DateTime dateTime =
|
||||
DateTime.fromMillisecondsSinceEpoch((sensor.time!) * 1000);
|
||||
time = DateFormat('yyyy-MM-dd HH:mm:ss').format(dateTime);
|
||||
}
|
||||
}
|
||||
if (notiticationType == "lowBattery") {
|
||||
path = ImageConstants.instance.getImage("low_battery");
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ Future<Widget> warningCard(BuildContext context, APIServices apiServices,
|
||||
Color backgroundColor = Colors.blue;
|
||||
Color textColor = Colors.white;
|
||||
String message = "";
|
||||
String fullLocation = "";
|
||||
String fullLocation = "";
|
||||
if (device.areaPath != "") {
|
||||
fullLocation = await DeviceUtils.instance
|
||||
.getFullDeviceLocation(context, device.areaPath!);
|
||||
|
||||
Reference in New Issue
Block a user