ui improvements

main_production_RSG
Sikander Saleem 2 months ago
parent 831cc1fef5
commit 40ec8947af

@ -131,7 +131,7 @@ class _AllRequestsSearchPageState extends State<AllRequestsSearchPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
context.translation.searchBy.heading5(context), Text(context.translation.searchBy, style: AppTextStyles.heading5.copyWith(color: AppColor.labelTextStyleColor(context))),
8.height, 8.height,
RequestsSearchButtons( RequestsSearchButtons(
items: [search!.requestNumber!, search!.assetName!, search!.assetNo!, search!.manufacture!, search!.sn!, search!.model!], items: [search!.requestNumber!, search!.assetName!, search!.assetNo!, search!.manufacture!, search!.sn!, search!.model!],
@ -151,13 +151,9 @@ class _AllRequestsSearchPageState extends State<AllRequestsSearchPage> {
controller: search!.searchBySelectedValue?.controller, controller: search!.searchBySelectedValue?.controller,
labelText: search!.searchBySelectedValue?.label, labelText: search!.searchBySelectedValue?.label,
textInputType: search!.searchBySelectedValue?.inputType, textInputType: search!.searchBySelectedValue?.inputType,
// labelStyle: AppTextStyles.bodyText2,
// style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)),
// floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)),
// labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff767676)),
labelStyle: AppTextStyles.textFieldLabelStyle, labelStyle: AppTextStyles.textFieldLabelStyle,
hintStyle: AppTextStyles.textFieldLabelStyle, hintStyle: AppTextStyles.textFieldLabelStyle,
// showBorder: true, showBorder: true,
onChange: (text) { onChange: (text) {
search!.searchBySelectedValue?.controller?.text = text; search!.searchBySelectedValue?.controller?.text = text;
search!.searchBySelectedValue?.controller?.selection = TextSelection.fromPosition(TextPosition(offset: search!.searchBySelectedValue!.controller!.text.length)); search!.searchBySelectedValue?.controller?.selection = TextSelection.fromPosition(TextPosition(offset: search!.searchBySelectedValue!.controller!.text.length));
@ -168,7 +164,10 @@ class _AllRequestsSearchPageState extends State<AllRequestsSearchPage> {
}, },
), ),
16.height, 16.height,
"Sort".heading5(context), RichText(
text: TextSpan(text: "Sort ", style: AppTextStyles.heading5.copyWith(color: AppColor.textStyleColor(context)), children: [
TextSpan(text: "(By Date)", style: AppTextStyles.bodyText2.copyWith(color: AppColor.textStyleColor(context))),
])),
8.height, 8.height,
Row( Row(
children: [ children: [
@ -209,7 +208,7 @@ class _AllRequestsSearchPageState extends State<AllRequestsSearchPage> {
], ],
), ),
16.height, 16.height,
context.translation.pickDate.heading5(context), Text(context.translation.pickDate, style: AppTextStyles.heading5.copyWith(color: AppColor.labelTextStyleColor(context))),
8.height, 8.height,
Row( Row(
children: [ children: [

@ -12,7 +12,7 @@ class RequestsSearchButtons extends StatefulWidget {
final List<SearchAllRequestsBaseModel> items; final List<SearchAllRequestsBaseModel> items;
final SearchAllRequestsBaseModel initialValue; final SearchAllRequestsBaseModel initialValue;
const RequestsSearchButtons({Key? key, required this.items,required this.initialValue,required this.onSelect}) : super(key: key); const RequestsSearchButtons({Key? key, required this.items, required this.initialValue, required this.onSelect}) : super(key: key);
@override @override
State<RequestsSearchButtons> createState() => _RequestsSearchButtonsState(); State<RequestsSearchButtons> createState() => _RequestsSearchButtonsState();
@ -45,25 +45,17 @@ class _RequestsSearchButtonsState extends State<RequestsSearchButtons> {
children: widget.items children: widget.items
.map( .map(
(data) => Container( (data) => Container(
padding: EdgeInsets.symmetric(vertical: 8.toScreenHeight, horizontal: (_data == data ? 12 : 8).toScreenWidth), padding: EdgeInsets.symmetric(vertical: 8.toScreenHeight, horizontal: 12.toScreenWidth),
foregroundDecoration: _data != data
? null
: ShapeDecoration(
color: (context.isDark ? AppColor.neutral30 : AppColor.neutral50).withOpacity(0.1),
shape: RoundedRectangleBorder(
side: BorderSide(width: 1, color: AppColor.blueStatus(context)),
borderRadius: BorderRadius.circular(7),
),
),
decoration: ShapeDecoration( decoration: ShapeDecoration(
color: _data == data ? AppColor.selectedButtonColor(context) : AppColor.unSelectedButtonColor(context), color: AppColor.background(context),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: _data == data ? BorderSide(width: 1, color: AppColor.blueStatus(context)) : BorderSide.none, side: BorderSide(width: 1, color: _data == data ? AppColor.primary10 : AppColor.border2Color(context)),
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(6),
), ),
shadows: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 14, offset: const Offset(0, 0), spreadRadius: 0)], shadows: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 14, offset: const Offset(0, 0), spreadRadius: 0)],
), ),
child: data.label!.tinyFont(context).custom(color: AppColor.filterButtonTextColor(context)), child: data.label!.tinyFont(context).custom(color: _data == data ? AppColor.primary10 : AppColor.filterButtonTextColor(context)),
// child: data.label!.tinyFont(context).custom(color: AppColor.filterButtonTextColor(context)),
).onPress( ).onPress(
() { () {
setState(() { setState(() {

@ -47,19 +47,13 @@ class _RequestsTypeFilterState extends State<RequestsTypeFilter> {
padding: EdgeInsets.symmetric(vertical: 8.toScreenHeight, horizontal: 12.toScreenWidth), padding: EdgeInsets.symmetric(vertical: 8.toScreenHeight, horizontal: 12.toScreenWidth),
decoration: ShapeDecoration( decoration: ShapeDecoration(
color: AppColor.background(context), color: AppColor.background(context),
// _selected.contains(widget.items[data]) ? AppColor.selectedButtonColor(context) : AppColor.unSelectedButtonColor(context),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: BorderSide(width: 1, color: _selected.contains(widget.items[data]) ? AppColor.primary10 : AppColor.border2Color(context)), side: BorderSide(width: 1, color: _selected.contains(widget.items[data]) ? AppColor.primary10 : AppColor.border2Color(context)),
// side: _selected.contains(widget.items[data]) ? BorderSide(width: 1, color: AppColor.loadingColor(context)) : BorderSide.none,
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
), ),
shadows: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 14, offset: const Offset(0, 0), spreadRadius: 0)], shadows: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 14, offset: const Offset(0, 0), spreadRadius: 0)],
), ),
child: data.tinyFont(context).custom(color: _selected.contains(widget.items[data]) ? AppColor.primary10 : AppColor.filterButtonTextColor(context) child: data.tinyFont(context).custom(color: _selected.contains(widget.items[data]) ? AppColor.primary10 : AppColor.filterButtonTextColor(context)),
// AppColor.filterButtonTextColor(context)
),
).onPress( ).onPress(
() { () {
if (_selected.contains(widget.items[data])) { if (_selected.contains(widget.items[data])) {

Loading…
Cancel
Save