mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
Success dialog and Failed dialog changes with VisitorPasswordDialog
This commit is contained in:
@ -15,7 +15,7 @@ class DynamicTable extends StatefulWidget {
|
||||
final void Function(int, bool?)? onRowCheckboxChanged;
|
||||
|
||||
const DynamicTable({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.headers,
|
||||
required this.data,
|
||||
required this.size,
|
||||
@ -25,7 +25,7 @@ class DynamicTable extends StatefulWidget {
|
||||
this.cellDecoration,
|
||||
this.selectAll,
|
||||
this.onRowCheckboxChanged,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
_DynamicTableState createState() => _DynamicTableState();
|
||||
@ -66,7 +66,7 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
return Container(
|
||||
decoration: widget.cellDecoration,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
child:
|
||||
ListView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
@ -102,7 +102,7 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
SvgPicture.asset(
|
||||
Assets.emptyTable
|
||||
),
|
||||
SizedBox(height: 15,),
|
||||
const SizedBox(height: 15,),
|
||||
Text('No Passwords',style: Theme.of(context).textTheme.bodySmall!.copyWith(color:ColorsManager.grayColor ),)
|
||||
],
|
||||
),
|
||||
@ -122,9 +122,9 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
return Row(
|
||||
children: [
|
||||
if (widget.withCheckBox)
|
||||
_buildRowCheckbox(index),
|
||||
_buildRowCheckbox(index,widget.size.height*0.10),
|
||||
...row.map((cell) =>
|
||||
_buildTableCell(cell.toString())).toList(),
|
||||
_buildTableCell(cell.toString(),widget.size.height*0.10)).toList(),
|
||||
],
|
||||
);
|
||||
},
|
||||
@ -141,8 +141,12 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
}
|
||||
|
||||
Widget _buildSelectAllCheckbox() {
|
||||
return SizedBox(
|
||||
width: 50,
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
|
||||
decoration: const BoxDecoration(
|
||||
border: Border.symmetric(
|
||||
vertical: BorderSide(color: ColorsManager.boxDivider))),
|
||||
child: Checkbox(
|
||||
value: _selectAll,
|
||||
onChanged: _toggleSelectAll,
|
||||
@ -150,16 +154,27 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildRowCheckbox(int index) {
|
||||
return SizedBox(
|
||||
width: 50,
|
||||
child: Checkbox(
|
||||
Widget _buildRowCheckbox(int index,size) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
|
||||
height:size ,
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: ColorsManager.boxDivider,
|
||||
width: 1.0,
|
||||
),
|
||||
)),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Center(child: Checkbox(
|
||||
value: _selected[index],
|
||||
onChanged: (bool? value) {
|
||||
_toggleRowSelection(index, value);
|
||||
},
|
||||
),
|
||||
),)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
Widget _buildTableHeaderCell(String title) {
|
||||
@ -177,11 +192,11 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTableCell(String content) {
|
||||
Widget _buildTableCell(String content,size) {
|
||||
return Expanded(
|
||||
child: Container(
|
||||
height: 80,
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
height:size ,
|
||||
padding: const EdgeInsets.all(5.0),
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
|
Reference in New Issue
Block a user