fix bugs on create password

This commit is contained in:
mohammad
2024-06-30 23:15:01 +03:00
parent 0fa6693c6c
commit 53c33187f4

View File

@ -12,6 +12,7 @@ import 'package:syncrow_app/features/devices/model/create_temporary_password_mod
import 'package:syncrow_app/features/devices/model/temporary_password_model.dart';
import 'package:syncrow_app/services/api/devices_api.dart';
import 'package:syncrow_app/utils/helpers/snack_bar.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
class SmartDoorBloc extends Bloc<SmartDoorEvent, SmartDoorState> {
final String deviceId;
@ -144,10 +145,30 @@ class SmartDoorBloc extends Bloc<SmartDoorEvent, SmartDoorState> {
lastDate: DateTime(2101),
);
if (picked != null) {
final TimeOfDay? timePicked = await showTimePicker(
final TimeOfDay? timePicked =
await showTimePicker(
context: event.context,
initialTime: TimeOfDay.now(),
initialTime: TimeOfDay(hour: 10, minute: 47),
builder: (context, child) {
return Theme(
data: ThemeData.light().copyWith(
colorScheme: ColorScheme.light(
// change the border color
primary: ColorsManager.primaryColor,
// change the text color
onSurface: Colors.black,
),
// button colors
buttonTheme: ButtonThemeData(
colorScheme: ColorScheme.light(
primary: Colors.green,
),
),
),
child: child!,
);
},
);
if (timePicked != null) {
final selectedDateTime = DateTime(