mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 18:09:41 +00:00
edit time picker as in figma
This commit is contained in:
@ -8,9 +8,11 @@ import 'package:syncrow_web/utils/color_manager.dart';
|
|||||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||||
|
|
||||||
class TimePickerWidget extends StatefulWidget {
|
class TimePickerWidget extends StatefulWidget {
|
||||||
|
final String title;
|
||||||
const TimePickerWidget({
|
const TimePickerWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.onTimePicked,
|
required this.onTimePicked,
|
||||||
|
required this.title,
|
||||||
});
|
});
|
||||||
|
|
||||||
final void Function(TimeOfDay? timePicked) onTimePicked;
|
final void Function(TimeOfDay? timePicked) onTimePicked;
|
||||||
@ -45,39 +47,24 @@ class _TimePickerWidgetState extends State<TimePickerWidget> {
|
|||||||
context.read<NonBookableSpacesBloc>().add(CheckConfigurValidityEvent());
|
context.read<NonBookableSpacesBloc>().add(CheckConfigurValidityEvent());
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Container(
|
||||||
children: [
|
width: 100,
|
||||||
Container(
|
height: 32,
|
||||||
width: 56,
|
decoration: const BoxDecoration(
|
||||||
height: 32,
|
borderRadius: BorderRadius.only(
|
||||||
decoration: const BoxDecoration(
|
topRight: Radius.circular(10),
|
||||||
color: Colors.white,
|
bottomRight: Radius.circular(10),
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(10),
|
|
||||||
bottomLeft: Radius.circular(10),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: SvgPicture.asset(Assets.clockIcon),
|
|
||||||
),
|
),
|
||||||
Container(
|
),
|
||||||
width: 120,
|
alignment: Alignment.centerLeft,
|
||||||
height: 32,
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
decoration: const BoxDecoration(
|
child: Text(
|
||||||
color: Colors.white,
|
timePicked == null ? widget.title : timePicked!.format(context),
|
||||||
borderRadius: BorderRadius.only(
|
style: TextStyle(
|
||||||
topRight: Radius.circular(10),
|
color: ColorsManager.blackColor.withValues(alpha: 0.4),
|
||||||
bottomRight: Radius.circular(10),
|
fontSize: 12,
|
||||||
),
|
|
||||||
),
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
|
||||||
child: Text(
|
|
||||||
timePicked == null ? 'HH:MM' : timePicked!.format(context),
|
|
||||||
style: const TextStyle(color: Color(0xB2D5D5D5)),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user