TF-1477 Improve UX for advanced and quick search

This commit is contained in:
dab246
2023-03-03 14:20:48 +07:00
committed by Dat Vu
parent a0b51ae22d
commit b3ec90b507
20 changed files with 764 additions and 503 deletions
@@ -28,7 +28,7 @@ class DropDownButtonWidget<T> extends StatelessWidget {
final double radiusButton;
final double opacity;
final Widget? iconArrowDown;
final Color? colorButton;
final Color colorButton;
final String tooltip;
final double? dropdownWidth;
final double? dropdownMaxHeight;
@@ -36,7 +36,7 @@ class DropDownButtonWidget<T> extends StatelessWidget {
const DropDownButtonWidget({
Key? key,
required this.items,
required this.itemSelected,
this.itemSelected,
this.onChanged,
this.onMenuStateChange,
this.supportHint = false,
@@ -112,7 +112,7 @@ class DropDownButtonWidget<T> extends StatelessWidget {
color: AppColor.colorInputBorderCreateMailbox,
width: 1,
),
color: colorButton ?? AppColor.colorInputBackgroundCreateMailbox,
color: colorButton,
),
padding: const EdgeInsets.only(left: 12, right: 10),
child: Row(children: [
@@ -139,7 +139,7 @@ class DropDownButtonWidget<T> extends StatelessWidget {
color: AppColor.colorInputBorderCreateMailbox,
width: 1,
),
color: colorButton ?? AppColor.colorInputBackgroundCreateMailbox,
color: colorButton,
),
itemHeight: heightItem,
buttonHeight: heightItem,
@@ -0,0 +1,63 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:pointer_interceptor/pointer_interceptor.dart';
class PopupItemNoIconWidget extends StatelessWidget {
final String _nameAction;
final String? svgIconSelected;
final bool isSelected;
final double? maxWidth;
final TextStyle? styleName;
final EdgeInsets? padding;
final VoidCallback? onCallbackAction;
const PopupItemNoIconWidget(
this._nameAction,
{
Key? key,
this.isSelected = false,
this.svgIconSelected,
this.maxWidth,
this.styleName,
this.padding,
this.onCallbackAction
}
) : super(key: key);
@override
Widget build(BuildContext context) {
return PointerInterceptor(
child: InkWell(
onTap: onCallbackAction,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
child: SizedBox(
width: maxWidth,
child: Row(children: [
Expanded(child: Text(
_nameAction,
style: const TextStyle(
fontSize: 17,
color: Colors.black,
fontWeight: FontWeight.normal
)
)),
if (isSelected && svgIconSelected != null)
...[
const SizedBox(width: 12),
SvgPicture.asset(
svgIconSelected!,
width: 24,
height: 24,
fit: BoxFit.fill
),
]
]),
),
)
)
);
}
}