mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
add table view
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/core/extension/build_context_x.dart';
|
||||
import 'package:syncrow_web/pages/common/buttons/search_reset_buttons.dart';
|
||||
import 'package:syncrow_web/pages/common/custom_table.dart';
|
||||
import 'package:syncrow_web/pages/common/filter/filter_widget.dart';
|
||||
import 'package:syncrow_web/pages/common/text_field/custom_text_field.dart';
|
||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||
import 'package:syncrow_web/utils/style.dart';
|
||||
|
||||
class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
|
||||
const DeviceManagementBody({super.key});
|
||||
@ -80,6 +82,46 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
|
||||
],
|
||||
),
|
||||
],
|
||||
const SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
Expanded(
|
||||
child: DynamicTable(
|
||||
cellDecoration: containerDecoration,
|
||||
selectAll: (p0) {
|
||||
// visitorBloc.selectedDeviceIds.clear();
|
||||
// for (var item in state.data) {
|
||||
// visitorBloc.add(SelectDeviceEvent(item.uuid));
|
||||
// }
|
||||
},
|
||||
onRowCheckboxChanged: (index, isSelected) {
|
||||
// final deviceId = state.data[index].uuid;
|
||||
// visitorBloc.add(SelectDeviceEvent(deviceId));
|
||||
},
|
||||
withCheckBox: true,
|
||||
size: context.screenSize,
|
||||
headers: const [
|
||||
'Device Name',
|
||||
'Product Name',
|
||||
'Device ID',
|
||||
'Unit Name',
|
||||
'Room',
|
||||
'Battery Level',
|
||||
'Installation Date and Time',
|
||||
'Status',
|
||||
'Last Offline Date and Time',
|
||||
],
|
||||
data: []
|
||||
// state.data.map((item) {
|
||||
// return [
|
||||
// item.name.toString(),
|
||||
// item.uuid.toString(),
|
||||
// item.productType.toString(),
|
||||
// '',
|
||||
// item.online.value.toString(),
|
||||
// ];
|
||||
// }).toList(),
|
||||
)),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user