password expired.

This commit is contained in:
mohammad
2024-08-21 09:22:31 +03:00
parent bb959bcc61
commit 50ef283b52
7 changed files with 26 additions and 15 deletions

View File

@ -25,7 +25,11 @@ class AddDeviceDialog extends StatelessWidget {
final visitorBloc = BlocProvider.of<VisitorPasswordBloc>(context);
return AlertDialog(
backgroundColor: Colors.white,
title: const Text('Add Accessible Device'),
title: Text('Add Accessible Device',
style: Theme.of(context).textTheme.headlineLarge!.copyWith(
fontWeight: FontWeight.w400,
fontSize: 24,
color: Colors.black),),
content: Container(
height: MediaQuery.of(context).size.height/1.7,
width: MediaQuery.of(context).size.width/2,

View File

@ -17,7 +17,7 @@ class RepeatWidget extends StatelessWidget {
return BlocBuilder<VisitorPasswordBloc, VisitorPasswordState>(
builder: (context, state) {
final smartDoorBloc = BlocProvider.of<VisitorPasswordBloc>(context);
final visitorBloc = BlocProvider.of<VisitorPasswordBloc>(context);
return Column(
children: <Widget>[
Container(
@ -25,7 +25,7 @@ class RepeatWidget extends StatelessWidget {
height: size.height * 0.06, // Adjust height as needed
child: ListView(
scrollDirection: Axis.horizontal,
children: smartDoorBloc.days.map((day) {
children: visitorBloc.days.map((day) {
return Container(
width: size.width* 0.09,
child: CheckboxListTile(
@ -33,15 +33,15 @@ class RepeatWidget extends StatelessWidget {
day['day']!,
style: TextStyle(
fontSize: 18,
color: smartDoorBloc.selectedDays.contains(day['key'])
color: visitorBloc.selectedDays.contains(day['key'])
? Colors.black
: ColorsManager.grayColor,
),
),
value: smartDoorBloc.selectedDays.contains(day['key']),
value: visitorBloc.selectedDays.contains(day['key']),
onChanged: (bool? value) {
if (value != null) {
smartDoorBloc.add(ToggleDaySelectionEvent(key: day['key']!));
visitorBloc.add(ToggleDaySelectionEvent(key: day['key']!));
}
},
),
@ -56,19 +56,19 @@ class RepeatWidget extends StatelessWidget {
title: '',
size: size,
endTime: () {
smartDoorBloc.add(SelectTimeVisitorPassword(
visitorBloc.add(SelectTimeVisitorPassword(
isRepeat: true,
context: context, isStart: false
));
},
startTime: () {
smartDoorBloc.add(SelectTimeVisitorPassword(
visitorBloc.add(SelectTimeVisitorPassword(
isRepeat: true,
context: context, isStart: true
));
},
firstString: smartDoorBloc.repeatStartTime.toString(),
secondString: smartDoorBloc.repeatEndTime.toString(),
firstString: visitorBloc.repeatStartTime.toString(),
secondString: visitorBloc.repeatEndTime.toString(),
),
),

View File

@ -26,7 +26,11 @@ class VisitorPasswordDialog extends StatelessWidget {
bool isRepeat = state is IsRepeatState ? state.repeat : visitorBloc.repeat;
return AlertDialog(
backgroundColor: Colors.white,
title: const Text('Create visitor password'),
title: Text('Create visitor password',
style: Theme.of(context).textTheme.headlineLarge!.copyWith(
fontWeight: FontWeight.w400,
fontSize: 24,
color: Colors.black),),
content: SingleChildScrollView(
child: Form(
key: visitorBloc.forgetFormKey,