mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
check if row in the table checked
This commit is contained in:
@ -257,7 +257,8 @@ class VisitorPasswordBloc
|
||||
stateDialog(
|
||||
context: event.context!,
|
||||
message: e.toString(),
|
||||
title: 'Something Wrong'); }
|
||||
title: 'Something Wrong');
|
||||
}
|
||||
}
|
||||
|
||||
//offline password
|
||||
|
@ -52,8 +52,6 @@ class ToggleRepeatEvent extends VisitorPasswordEvent {}
|
||||
class GeneratePasswordEvent extends VisitorPasswordEvent {}
|
||||
|
||||
class FetchDevice extends VisitorPasswordEvent {
|
||||
final List<String>? list;
|
||||
const FetchDevice({this.list});
|
||||
}
|
||||
|
||||
//online password
|
||||
|
@ -19,12 +19,11 @@ class AddDeviceDialog extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
Size size = MediaQuery.of(context).size;
|
||||
return BlocProvider(
|
||||
create: (context) => VisitorPasswordBloc()..add(FetchDevice(list: selectedDeviceIds)),
|
||||
create: (context) => VisitorPasswordBloc()..add(FetchDevice()),
|
||||
child: BlocBuilder<VisitorPasswordBloc, VisitorPasswordState>(
|
||||
builder: (BuildContext context, VisitorPasswordState state) {
|
||||
final visitorBloc = BlocProvider.of<VisitorPasswordBloc>(context);
|
||||
if (state is TableLoaded) {
|
||||
print('ooooooooooo${selectedDeviceIds}');
|
||||
for (var device in selectedDeviceIds!) {
|
||||
if (selectedDeviceIds!.contains(device)) {
|
||||
visitorBloc.add(SelectDeviceEvent(device));
|
||||
|
Reference in New Issue
Block a user