|  |  |  | @ -1,3 +1,5 @@ | 
		
	
		
			
				|  |  |  |  | import 'dart:convert'; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | import 'package:easy_localization/easy_localization.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:flutter/material.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/app_state/app_state.dart'; | 
		
	
	
		
			
				
					|  |  |  | @ -12,6 +14,7 @@ import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/widgets/balances_dashboard_widget.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/widgets/button/default_button.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/widgets/sso_webview_widget.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:provider/provider.dart'; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
	
		
			
				
					|  |  |  | @ -54,27 +57,26 @@ class _TicketDetailedScreenState extends State<TicketDetailedScreen> { | 
		
	
		
			
				|  |  |  |  |       backgroundColor: Colors.white, | 
		
	
		
			
				|  |  |  |  |       appBar: AppBarWidget(context, title: "Ticket Details"), | 
		
	
		
			
				|  |  |  |  |       body: Column( | 
		
	
		
			
				|  |  |  |  |         children: [ | 
		
	
		
			
				|  |  |  |  |         children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |           ListView( | 
		
	
		
			
				|  |  |  |  |             padding: const EdgeInsets.all(21), | 
		
	
		
			
				|  |  |  |  |             physics: const BouncingScrollPhysics(), | 
		
	
		
			
				|  |  |  |  |             children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |               if (dashboardProviderModel == null && dashboardProviderModel?.accrualTicketBalanceList == null) ...<Widget>[Utils.getNoDataWidget(context).paddingOnly(top: 50)] else ...<Widget>[ | 
		
	
		
			
				|  |  |  |  |                 // const BalancesDashboardWidget("Current Ticket Balance", false, showLoading: false), 12.height, | 
		
	
		
			
				|  |  |  |  |                 Container( | 
		
	
		
			
				|  |  |  |  |                   padding: const EdgeInsets.all(16.0), | 
		
	
		
			
				|  |  |  |  |                   decoration: BoxDecoration( | 
		
	
		
			
				|  |  |  |  |                     color: Colors.white, | 
		
	
		
			
				|  |  |  |  |                     borderRadius: BorderRadius.circular(12.0), | 
		
	
		
			
				|  |  |  |  |                     boxShadow: [BoxShadow(color: Colors.grey.withOpacity(0.2), spreadRadius: 2, blurRadius: 5, offset: const Offset(0, 3))], | 
		
	
		
			
				|  |  |  |  |                     boxShadow: <BoxShadow>[BoxShadow(color: Colors.grey.withOpacity(0.2), spreadRadius: 2, blurRadius: 5, offset: const Offset(0, 3))], | 
		
	
		
			
				|  |  |  |  |                   ), | 
		
	
		
			
				|  |  |  |  |                   child: Column( | 
		
	
		
			
				|  |  |  |  |                     children: [ | 
		
	
		
			
				|  |  |  |  |                     children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                       Row( | 
		
	
		
			
				|  |  |  |  |                         children: [ | 
		
	
		
			
				|  |  |  |  |                         children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                           "Current Ticket Balance".toText20().expanded, | 
		
	
		
			
				|  |  |  |  |                           Row( | 
		
	
		
			
				|  |  |  |  |                             children: [ | 
		
	
		
			
				|  |  |  |  |                             children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                               const Icon(Icons.calendar_month_rounded, color: MyColors.darkIconColor, size: 16), | 
		
	
		
			
				|  |  |  |  |                               5.width, | 
		
	
		
			
				|  |  |  |  |                               DateUtil.formatDateToDate(accrualDateTime, AppState().isArabic(context)).toText13(isUnderLine: true), | 
		
	
	
		
			
				
					|  |  |  | @ -109,6 +111,67 @@ class _TicketDetailedScreenState extends State<TicketDetailedScreen> { | 
		
	
		
			
				|  |  |  |  |                     ], | 
		
	
		
			
				|  |  |  |  |                   ), | 
		
	
		
			
				|  |  |  |  |                 ), | 
		
	
		
			
				|  |  |  |  |                 const SizedBox(height: 21), | 
		
	
		
			
				|  |  |  |  |                 dashboardProviderModel == null && dashboardProviderModel!.ticketHistoryTransactionList == null | 
		
	
		
			
				|  |  |  |  |                     ? const SizedBox() | 
		
	
		
			
				|  |  |  |  |                     : ListView( | 
		
	
		
			
				|  |  |  |  |                       shrinkWrap: true, | 
		
	
		
			
				|  |  |  |  |                       physics: const NeverScrollableScrollPhysics(), | 
		
	
		
			
				|  |  |  |  |                       children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                         "Tickets History".toText20().expanded, | 
		
	
		
			
				|  |  |  |  |                         12.height, | 
		
	
		
			
				|  |  |  |  |                         ListView.separated( | 
		
	
		
			
				|  |  |  |  |                           physics: const NeverScrollableScrollPhysics(), | 
		
	
		
			
				|  |  |  |  |                           shrinkWrap: true, | 
		
	
		
			
				|  |  |  |  |                           padding: EdgeInsets.zero, | 
		
	
		
			
				|  |  |  |  |                           itemBuilder: (BuildContext cxt, int cardIndex) { | 
		
	
		
			
				|  |  |  |  |                             var transactionDetails = dashboardProviderModel!.ticketHistoryTransactionList![cardIndex]; | 
		
	
		
			
				|  |  |  |  |                             const allowedSegmentNames = <String>{ | 
		
	
		
			
				|  |  |  |  |                               "TICKETS_ROUTE", | 
		
	
		
			
				|  |  |  |  |                               "TRAVELER_NAME", | 
		
	
		
			
				|  |  |  |  |                               "TICKETS_EFFECTIVE_DATE", | 
		
	
		
			
				|  |  |  |  |                               "TICKET_ARRIVAL", | 
		
	
		
			
				|  |  |  |  |                               "TICKET_AMOUNT", | 
		
	
		
			
				|  |  |  |  |                               "TICKET_COMP_SHARE", | 
		
	
		
			
				|  |  |  |  |                               "TICKET_EMP_SHARE", | 
		
	
		
			
				|  |  |  |  |                             }; | 
		
	
		
			
				|  |  |  |  |                             var uniqueDetails = | 
		
	
		
			
				|  |  |  |  |                                 transactionDetails | 
		
	
		
			
				|  |  |  |  |                                     .where((item) => item.dISPLAYFLAG != 'N' && item.sEGMENTPROMPT != null && item.sEGMENTPROMPT!.isNotEmpty && allowedSegmentNames.contains(item.sEGMENTNAME)) | 
		
	
		
			
				|  |  |  |  |                                     .toList(); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |                             return Column( | 
		
	
		
			
				|  |  |  |  |                               crossAxisAlignment: CrossAxisAlignment.start, | 
		
	
		
			
				|  |  |  |  |                               mainAxisSize: MainAxisSize.min, | 
		
	
		
			
				|  |  |  |  |                               children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                                 ListView.builder( | 
		
	
		
			
				|  |  |  |  |                                   physics: const NeverScrollableScrollPhysics(), | 
		
	
		
			
				|  |  |  |  |                                   shrinkWrap: true, | 
		
	
		
			
				|  |  |  |  |                                   itemCount: (uniqueDetails.length / 2).ceil(), | 
		
	
		
			
				|  |  |  |  |                                   itemBuilder: (context, rowIndex) { | 
		
	
		
			
				|  |  |  |  |                                     int firstIndex = rowIndex * 2; | 
		
	
		
			
				|  |  |  |  |                                     int? secondIndex = (firstIndex + 1 < uniqueDetails.length) ? firstIndex + 1 : null; | 
		
	
		
			
				|  |  |  |  |                                     bool isLastRow = (rowIndex == (uniqueDetails.length / 2).ceil() - 1); | 
		
	
		
			
				|  |  |  |  |                                     var item1 = uniqueDetails[firstIndex]; | 
		
	
		
			
				|  |  |  |  |                                     var child1 = ItemDetailViewCol(item1.sEGMENTPROMPT!, item1.vARCHAR2VALUE ?? item1.nUMBERVALUE?.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                                     Widget child2; | 
		
	
		
			
				|  |  |  |  |                                     if (secondIndex != null) { | 
		
	
		
			
				|  |  |  |  |                                       var item2 = uniqueDetails[secondIndex]; | 
		
	
		
			
				|  |  |  |  |                                       child2 = ItemDetailViewCol(item2.sEGMENTPROMPT!, item2.vARCHAR2VALUE ?? item2.nUMBERVALUE?.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                                     } else { | 
		
	
		
			
				|  |  |  |  |                                       child2 = const SizedBox(); // Empty widget if there is no second item | 
		
	
		
			
				|  |  |  |  |                                     } | 
		
	
		
			
				|  |  |  |  |                                     return ItemDetailGrid(child1, child2, isItLast: isLastRow); | 
		
	
		
			
				|  |  |  |  |                                   }, | 
		
	
		
			
				|  |  |  |  |                                 ), | 
		
	
		
			
				|  |  |  |  |                               ], | 
		
	
		
			
				|  |  |  |  |                             ).objectContainerView(); | 
		
	
		
			
				|  |  |  |  |                           }, | 
		
	
		
			
				|  |  |  |  |                           separatorBuilder: (BuildContext cxt, int index) => 12.height, | 
		
	
		
			
				|  |  |  |  |                           itemCount: dashboardProviderModel!.ticketHistoryTransactionList!.length, | 
		
	
		
			
				|  |  |  |  |                         ), | 
		
	
		
			
				|  |  |  |  |                       ], | 
		
	
		
			
				|  |  |  |  |                     ), | 
		
	
		
			
				|  |  |  |  |               ], | 
		
	
		
			
				|  |  |  |  |             ], | 
		
	
		
			
				|  |  |  |  |           ).expanded, | 
		
	
	
		
			
				
					|  |  |  | 
 |