feat : search and filter
This commit is contained in:
@@ -9,7 +9,10 @@ GestureDetector dateFilterWidget({
|
||||
}) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Get.bottomSheet(modalDatePicker(onDateSelected: (value) => onChanged(value)));
|
||||
Get.bottomSheet(modalDatePicker(onDateSelected: (value) {
|
||||
date = value.obs;
|
||||
onChanged(value);
|
||||
}));
|
||||
},
|
||||
child: Container(
|
||||
height: 35,
|
||||
|
||||
@@ -22,14 +22,14 @@ class ROutlinedElevatedIcon extends StatefulWidget {
|
||||
final VoidCallback? onPressed;
|
||||
final double width;
|
||||
final double height;
|
||||
Color? foregroundColor;
|
||||
Color? backgroundColor;
|
||||
Color? borderColor;
|
||||
Color? disabledBackgroundColor;
|
||||
Color? pressedBackgroundColor;
|
||||
double? radius;
|
||||
TextStyle? textStyle;
|
||||
Widget? icon;
|
||||
final Color? foregroundColor;
|
||||
final Color? backgroundColor;
|
||||
final Color? borderColor;
|
||||
final Color? disabledBackgroundColor;
|
||||
final Color? pressedBackgroundColor;
|
||||
final double? radius;
|
||||
final TextStyle? textStyle;
|
||||
final Widget? icon;
|
||||
|
||||
@override
|
||||
State<ROutlinedElevatedIcon> createState() => _ROutlinedElevatedIconState();
|
||||
@@ -40,7 +40,6 @@ class _ROutlinedElevatedIconState extends State<ROutlinedElevatedIcon> {
|
||||
Widget build(BuildContext context) {
|
||||
return OutlinedButton.icon(
|
||||
icon: widget.icon,
|
||||
|
||||
label: Text(widget.text),
|
||||
onPressed: widget.onPressed,
|
||||
style: ButtonStyle(
|
||||
@@ -91,11 +90,9 @@ class _ROutlinedElevatedIconState extends State<ROutlinedElevatedIcon> {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
return Colors.white;
|
||||
} else if (states.contains(WidgetState.disabled)) {
|
||||
return widget.foregroundColor?.disabledColor ??
|
||||
AppColor.blueNormal.withAlpha(38);
|
||||
return widget.foregroundColor?.disabledColor ?? AppColor.blueNormal.withAlpha(38);
|
||||
} else if (states.contains(WidgetState.hovered)) {
|
||||
return widget.foregroundColor?.hoverColor ??
|
||||
AppColor.blueNormal.withAlpha(50);
|
||||
return widget.foregroundColor?.hoverColor ?? AppColor.blueNormal.withAlpha(50);
|
||||
}
|
||||
return widget.foregroundColor ?? AppColor.blueNormal;
|
||||
}),
|
||||
@@ -106,10 +103,13 @@ class _ROutlinedElevatedIconState extends State<ROutlinedElevatedIcon> {
|
||||
),
|
||||
fixedSize: WidgetStatePropertyAll(Size(widget.width, widget.height)),
|
||||
padding: WidgetStatePropertyAll(EdgeInsets.zero),
|
||||
textStyle: WidgetStatePropertyAll(
|
||||
widget.textStyle ??
|
||||
AppFonts.yekan24.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
textStyle: WidgetStateProperty.resolveWith<TextStyle?>((states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
return widget.textStyle?.copyWith(color: Colors.white) ??
|
||||
AppFonts.yekan18.copyWith(color: Colors.white);
|
||||
}
|
||||
return widget.textStyle ?? AppFonts.yekan18.copyWith(color: AppColor.blueNormal);
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user