Success dialog and Failed dialog changes with VisitorPasswordDialog

This commit is contained in:
mohammad
2024-08-23 22:16:48 +03:00
parent f5a7441b3c
commit cf1a21e121
19 changed files with 792 additions and 785 deletions

View File

@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
class HourPickerDialog extends StatefulWidget {
final TimeOfDay initialTime;
HourPickerDialog({required this.initialTime});
const HourPickerDialog({super.key, required this.initialTime});
@override
_HourPickerDialogState createState() => _HourPickerDialogState();
@ -24,7 +24,7 @@ class _HourPickerDialogState extends State<HourPickerDialog> {
@override
Widget build(BuildContext context) {
return AlertDialog(
title: Text('Select Hour'),
title: const Text('Select Hour'),
content: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -46,7 +46,7 @@ class _HourPickerDialogState extends State<HourPickerDialog> {
SizedBox(width: 16.0),
DropdownButton<bool>(
value: _isPm,
items: [
items: const [
DropdownMenuItem(
value: false,
child: Text('AM'),
@ -67,14 +67,14 @@ class _HourPickerDialogState extends State<HourPickerDialog> {
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(null),
child: Text('Cancel'),
child: const Text('Cancel'),
),
TextButton(
onPressed: () {
int hour = _isPm ? _selectedHour + 12 : _selectedHour;
Navigator.of(context).pop(TimeOfDay(hour: hour, minute: 0));
},
child: Text('OK'),
child: const Text('OK'),
),
],
);