The idea is simply to retreive a list of data from the backend, and the user has to submit quantities (it's like calling purchase order quotation from back end then choose delivried quantites) as follow :
I created the card widget and here is the code :
class FormListCard extends StatelessWidget {
String title;
String subTitle;
KTextField field;
FormListCard(
{required this.title, required this.subTitle, required this.field});
@override
Widget build(BuildContext context) {
bool isLandScape =
MediaQuery.of(context).orientation == Orientation.landscape;
return Column(
mainAxisSize: MainAxisSize.min,
children: [
const Divider(),
Row(
children: [
Text(
title,
style: TextStyle(
fontSize: isLandScape ? 18.sp : 32.sp,
fontWeight: FontWeight.w600),
),
const Spacer(),
textInput(isLandScape),
SizedBox(
width: 20.w,
),
Text(
subTitle,
style: TextStyle(
fontSize: isLandScape ? 18.sp : 32.sp,
fontWeight: FontWeight.w600),
)
],
)
],
);
}
Widget textInput(bool isLandScape) {
return SizedBox(
width: isLandScape ? 150.w : 300.w,
height: isLandScape ? 150.h : 80.h,
child: field);
}
}
But i couldn't acheive to create the customized FormBuilderField, any idea how to acheive this ?
