WD: header added to location list

merge-update-with-lab-changes
taha.alam 1 year ago
parent 633059b0be
commit f80892b630

@ -115,58 +115,40 @@ class _LocationListExpandedBodyState extends State<LocationListExpandedBody> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
Expanded(
child: TextField(
controller: controller,
onChanged: (v) {
tempListData.clear();
if (v.length > 0) {
for (int i = 0; i < widget.data.length; i++) {
if (widget.data[i].name
?.toLowerCase()
.contains(v.toLowerCase()) ==
true) {
tempListData.add(widget.data[i]);
}
}
} else {
tempListData.addAll(widget.data);
}
setState(() {});
},
decoration: InputDecoration(
hintStyle: TextStyle(fontSize: 12),
hintText: TranslationBase.of(context).searchByBranch,
suffixIcon: Icon(Icons.search),
contentPadding: EdgeInsets.symmetric(vertical: 9,horizontal: 14),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8.0),
borderSide: BorderSide(
color: Colors.grey, // Normal border color
width: 1.0,
),
),
),
SelectBranchHeader(),
SizedBox(height: 8,),
TextField(
controller: controller,
onChanged: (v) {
tempListData.clear();
if (v.length > 0) {
for (int i = 0; i < widget.data.length; i++) {
if (widget.data[i].name
?.toLowerCase()
.contains(v.toLowerCase()) ==
true) {
tempListData.add(widget.data[i]);
}
}
} else {
tempListData.addAll(widget.data);
}
setState(() {});
},
decoration: InputDecoration(
hintStyle: TextStyle(fontSize: 12),
hintText: TranslationBase.of(context).searchByBranch,
suffixIcon: Icon(Icons.search),
contentPadding: EdgeInsets.symmetric(vertical: 9,horizontal: 14),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8.0),
borderSide: BorderSide(
color: Colors.grey, // Normal border color
width: 1.0,
),
),
SizedBox(width: 8,),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Icon(Icons.close),
))
],
),
SizedBox(
height: 16,
),
),
SizedBox(
height: 16,
),
@ -220,27 +202,7 @@ class LocationListWrapBody extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
TranslationBase.of(context).selectBranch,
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w600,
color: Colors.black,
letterSpacing: -0.96),
),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Icon(Icons.close),
))
],
),
SelectBranchHeader(),
SizedBox(
height: 24,
),
@ -298,3 +260,30 @@ class LocationListWrapBody extends StatelessWidget {
);
}
}
class SelectBranchHeader extends StatelessWidget{
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
TranslationBase.of(context).selectBranch,
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w600,
color: Colors.black,
letterSpacing: -0.96),
),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Icon(Icons.close),
))
],
);
}
}

Loading…
Cancel
Save