|
|
|
@ -60,48 +60,51 @@ class _DynamicListViewScreenState extends State<DynamicListViewScreen> {
|
|
|
|
super.dispose();
|
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
late bool isTicketRequest;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
if (dynamicParams == null) {
|
|
|
|
if (dynamicParams == null) {
|
|
|
|
dynamicParams = ModalRoute.of(context)!.settings.arguments as DynamicListViewParams;
|
|
|
|
dynamicParams = ModalRoute.of(context)!.settings.arguments as DynamicListViewParams;
|
|
|
|
|
|
|
|
isTicketRequest = dynamicParams!.dynamicId == "HMG_TKT_NEW_EIT_SS";
|
|
|
|
getTransactions();
|
|
|
|
getTransactions();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget dataWidget = ListView(
|
|
|
|
|
|
|
|
physics: const BouncingScrollPhysics(),
|
|
|
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
|
|
|
padding: const EdgeInsets.all(21),
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
// HMG_TKT_NEW_EIT_SS Id used for ticket balance dashboard
|
|
|
|
|
|
|
|
if (isTicketRequest) ...[const BalancesDashboardWidget("Current Ticket Balance", false), 12.height],
|
|
|
|
|
|
|
|
getEITTransactionList == null
|
|
|
|
|
|
|
|
? const SizedBox()
|
|
|
|
|
|
|
|
: (getEITTransactionList!.isEmpty
|
|
|
|
|
|
|
|
? Utils.getNoDataWidget(context).paddingOnly(top: isTicketRequest ? 50 : 0)
|
|
|
|
|
|
|
|
: ListView.separated(
|
|
|
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
|
|
|
itemBuilder: (cxt, int parentIndex) => getEITTransactionList![parentIndex].collectionTransaction!.isEmpty
|
|
|
|
|
|
|
|
? const SizedBox()
|
|
|
|
|
|
|
|
: Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
for (int t = 0; t < (getEITTransactionList![parentIndex].collectionTransaction ?? []).length; t++)
|
|
|
|
|
|
|
|
if (getEITTransactionList![parentIndex].collectionTransaction![t].dISPLAYFLAG == "Y")
|
|
|
|
|
|
|
|
ItemDetailView(getEITTransactionList![parentIndex].collectionTransaction![t].sEGMENTPROMPT!,
|
|
|
|
|
|
|
|
getEITTransactionList![parentIndex].collectionTransaction![t].sEGMENTVALUEDSP ?? ""),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
).objectContainerView(),
|
|
|
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
|
|
|
itemCount: getEITTransactionList!.length)),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
appBar: AppBarWidget(context, title: dynamicParams!.title),
|
|
|
|
appBar: AppBarWidget(context, title: dynamicParams!.title),
|
|
|
|
body: Center(
|
|
|
|
body: isTicketRequest ? dataWidget : dataWidget.center,
|
|
|
|
child: ListView(
|
|
|
|
|
|
|
|
physics: const BouncingScrollPhysics(),
|
|
|
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
|
|
|
padding: const EdgeInsets.all(21),
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
// HMG_TKT_NEW_EIT_SS Id used for ticket balance dashboard
|
|
|
|
|
|
|
|
if (dynamicParams!.dynamicId == "HMG_TKT_NEW_EIT_SS") ...[const BalancesDashboardWidget("Current Ticket Balance", false), 12.height],
|
|
|
|
|
|
|
|
getEITTransactionList == null
|
|
|
|
|
|
|
|
? const SizedBox()
|
|
|
|
|
|
|
|
: (getEITTransactionList!.isEmpty
|
|
|
|
|
|
|
|
? Utils.getNoDataWidget(context)
|
|
|
|
|
|
|
|
: ListView.separated(
|
|
|
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
|
|
|
itemBuilder: (cxt, int parentIndex) => getEITTransactionList![parentIndex].collectionTransaction!.isEmpty
|
|
|
|
|
|
|
|
? const SizedBox()
|
|
|
|
|
|
|
|
: Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
for (int t = 0; t < (getEITTransactionList![parentIndex].collectionTransaction ?? []).length; t++)
|
|
|
|
|
|
|
|
if (getEITTransactionList![parentIndex].collectionTransaction![t].dISPLAYFLAG == "Y")
|
|
|
|
|
|
|
|
ItemDetailView(getEITTransactionList![parentIndex].collectionTransaction![t].sEGMENTPROMPT!,
|
|
|
|
|
|
|
|
getEITTransactionList![parentIndex].collectionTransaction![t].sEGMENTVALUEDSP ?? ""),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
).objectContainerView(),
|
|
|
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
|
|
|
itemCount: getEITTransactionList!.length)),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
floatingActionButton: Container(
|
|
|
|
floatingActionButton: Container(
|
|
|
|
height: 54,
|
|
|
|
height: 54,
|
|
|
|
width: 54,
|
|
|
|
width: 54,
|
|
|
|
|