formatted all files.

This commit is contained in:
Faris Armoush
2025-06-12 15:33:32 +03:00
parent 29959f567e
commit 04250ebc98
474 changed files with 5425 additions and 4338 deletions

View File

@ -24,13 +24,13 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
Widget build(BuildContext context) {
return BlocBuilder<DeviceManagementBloc, DeviceManagementState>(
builder: (context, state) {
List<AllDevicesModel> devicesToShow = [];
int selectedIndex = 0;
int onlineCount = 0;
int offlineCount = 0;
int lowBatteryCount = 0;
bool isControlButtonEnabled = false;
List<AllDevicesModel> selectedDevices = [];
var devicesToShow = <AllDevicesModel>[];
var selectedIndex = 0;
var onlineCount = 0;
var offlineCount = 0;
var lowBatteryCount = 0;
var isControlButtonEnabled = false;
var selectedDevices = <AllDevicesModel>[];
if (state is DeviceManagementLoaded) {
devicesToShow = state.devices;
@ -194,18 +194,23 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
device.name ?? '',
device.productName ?? '',
device.uuid ?? '',
(device.spaces != null &&
device.spaces!.isNotEmpty)
? device.spaces![0].spaceName
: '',
if (device.spaces != null &&
device.spaces!.isNotEmpty)
device.spaces![0].spaceName
else
'',
combinedSpaceNames,
device.batteryLevel != null
? '${device.batteryLevel}%'
: '-',
if (device.batteryLevel != null)
'${device.batteryLevel}%'
else
'-',
formatDateTime(
DateTime.fromMillisecondsSinceEpoch(
(device.createTime ?? 0) * 1000)),
device.online == true ? 'Online' : 'Offline',
if (device.online == true)
'Online'
else
'Offline',
formatDateTime(
DateTime.fromMillisecondsSinceEpoch(
(device.updateTime ?? 0) * 1000)),
@ -243,7 +248,7 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
showGeneralDialog(
context: context,
barrierDismissible: true,
barrierLabel: "Device Settings",
barrierLabel: 'Device Settings',
transitionDuration: const Duration(milliseconds: 300),
pageBuilder: (context, anim1, anim2) {
return Align(

View File

@ -33,9 +33,9 @@ class _DeviceSearchFiltersState extends State<DeviceSearchFilters>
spacing: 20,
runSpacing: 10,
children: [
_buildSearchField("Space Name", _unitNameController, 200),
_buildSearchField('Space Name', _unitNameController, 200),
_buildSearchField(
"Device Name / Product Name", _productNameController, 300),
'Device Name / Product Name', _productNameController, 300),
_buildSearchResetButtons(),
],
);