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