From 53c33187f4b37585f0cdcbda05d1ed6764363c29 Mon Sep 17 00:00:00 2001 From: mohammad Date: Sun, 30 Jun 2024 23:15:01 +0300 Subject: [PATCH] fix bugs on create password --- .../bloc/smart_door_bloc/smart_door_bloc.dart | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/features/devices/bloc/smart_door_bloc/smart_door_bloc.dart b/lib/features/devices/bloc/smart_door_bloc/smart_door_bloc.dart index 18d7b9f..6ea1507 100644 --- a/lib/features/devices/bloc/smart_door_bloc/smart_door_bloc.dart +++ b/lib/features/devices/bloc/smart_door_bloc/smart_door_bloc.dart @@ -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 { final String deviceId; @@ -144,10 +145,30 @@ class SmartDoorBloc extends Bloc { 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(