Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
gen_rentals
Compare Revisions
c2fe4726adedec75237f81698a15c884c057f42c...497a4fa726230cf42036aef2eb640408d42c1b59
Commits (2)
Few pay fixes
· 5037c228
Sai Srinivas
authored
Nov 18, 2025
5037c228
Merge remote-tracking branch 'origin/main'
· 497a4fa7
Sai Srinivas
authored
Nov 18, 2025
497a4fa7
Show whitespace changes
Inline
Side-by-side
android/app/build.gradle.kts
View file @
497a4fa7
...
...
@@ -32,7 +32,7 @@ android {
applicationId
=
"in.webgrid.genrentals"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk
=
23
minSdk
=
flutter
.
minSdkVersion
targetSdk
=
36
versionCode
=
flutter
.
versionCode
versionName
=
flutter
.
versionName
...
...
assets/images/temp_background.jpg
deleted
100644 → 0
View file @
c2fe4726
99.3 KB
lib/Models/RentalPaymentDetailsResponse.dart
deleted
100644 → 0
View file @
c2fe4726
class
RentalPaymentDetailsResponse
{
List
<
Bill
>?
bill
;
int
?
error
;
String
?
message
;
RentalPaymentDetailsResponse
({
this
.
bill
,
this
.
error
,
this
.
message
});
RentalPaymentDetailsResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'bill'
]
!=
null
)
{
bill
=
<
Bill
>[];
json
[
'bill'
].
forEach
((
v
)
{
bill
!.
add
(
new
Bill
.
fromJson
(
v
));
});
}
error
=
json
[
'error'
];
message
=
json
[
'message'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
if
(
this
.
bill
!=
null
)
{
data
[
'bill'
]
=
this
.
bill
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
return
data
;
}
}
class
Bill
{
String
?
narration
;
String
?
amount
;
String
?
mode
;
String
?
ref
;
String
?
datetime
;
Bill
({
this
.
narration
,
this
.
amount
,
this
.
mode
,
this
.
ref
,
this
.
datetime
});
Bill
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
narration
=
json
[
'narration'
];
amount
=
json
[
'amount'
];
mode
=
json
[
'mode'
];
ref
=
json
[
'ref'
];
datetime
=
json
[
'datetime'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'narration'
]
=
this
.
narration
;
data
[
'amount'
]
=
this
.
amount
;
data
[
'mode'
]
=
this
.
mode
;
data
[
'ref'
]
=
this
.
ref
;
data
[
'datetime'
]
=
this
.
datetime
;
return
data
;
}
}
lib/Models/billProductResponse.dart
deleted
100644 → 0
View file @
c2fe4726
class
BillProductResponse
{
List
<
Bp
>?
bp
;
int
?
error
;
String
?
message
;
BillProductResponse
({
this
.
bp
,
this
.
error
,
this
.
message
});
BillProductResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'bp'
]
!=
null
)
{
bp
=
<
Bp
>[];
json
[
'bp'
].
forEach
((
v
)
{
bp
!.
add
(
new
Bp
.
fromJson
(
v
));
});
}
error
=
json
[
'error'
];
message
=
json
[
'message'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
if
(
this
.
bp
!=
null
)
{
data
[
'bp'
]
=
this
.
bp
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
return
data
;
}
}
class
Bp
{
String
?
pname
;
String
?
qty
;
String
?
totalAmount
;
Bp
({
this
.
pname
,
this
.
qty
,
this
.
totalAmount
});
Bp
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
pname
=
json
[
'pname'
];
qty
=
json
[
'qty'
];
totalAmount
=
json
[
'total_amount'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'pname'
]
=
this
.
pname
;
data
[
'qty'
]
=
this
.
qty
;
data
[
'total_amount'
]
=
this
.
totalAmount
;
return
data
;
}
}
lib/Models/orderDetailsBillResponse.dart
deleted
100644 → 0
View file @
c2fe4726
class
OrderDetailsBillResponse
{
List
<
Bill
>?
bill
;
int
?
error
;
String
?
message
;
OrderDetailsBillResponse
({
this
.
bill
,
this
.
error
,
this
.
message
});
OrderDetailsBillResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'bill'
]
!=
null
)
{
bill
=
<
Bill
>[];
json
[
'bill'
].
forEach
((
v
)
{
bill
!.
add
(
new
Bill
.
fromJson
(
v
));
});
}
error
=
json
[
'error'
];
message
=
json
[
'message'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
if
(
this
.
bill
!=
null
)
{
data
[
'bill'
]
=
this
.
bill
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
return
data
;
}
}
class
Bill
{
String
?
totalAmount
;
String
?
datetime
;
String
?
billNarration
;
String
?
billId
;
Bill
({
this
.
totalAmount
,
this
.
datetime
,
this
.
billNarration
,
this
.
billId
});
Bill
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
totalAmount
=
json
[
'total_amount'
];
datetime
=
json
[
'datetime'
];
billNarration
=
json
[
'bill_narration'
];
billId
=
json
[
'bill_id'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'total_amount'
]
=
this
.
totalAmount
;
data
[
'datetime'
]
=
this
.
datetime
;
data
[
'bill_narration'
]
=
this
.
billNarration
;
data
[
'bill_id'
]
=
this
.
billId
;
return
data
;
}
}
lib/Models/orderDetailsMainResponse.dart
deleted
100644 → 0
View file @
c2fe4726
class
OrderDetailsMainResponse
{
List
<
Bill
>?
bill
;
int
?
error
;
String
?
message
;
OrderDetailsMainResponse
({
this
.
bill
,
this
.
error
,
this
.
message
});
OrderDetailsMainResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'bill'
]
!=
null
)
{
bill
=
<
Bill
>[];
json
[
'bill'
].
forEach
((
v
)
{
bill
!.
add
(
new
Bill
.
fromJson
(
v
));
});
}
error
=
json
[
'error'
];
message
=
json
[
'message'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
if
(
this
.
bill
!=
null
)
{
data
[
'bill'
]
=
this
.
bill
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
return
data
;
}
}
class
Bill
{
String
?
dispAddress
;
String
?
tenure
;
Bill
({
this
.
dispAddress
,
this
.
tenure
});
Bill
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
dispAddress
=
json
[
'disp_address'
];
tenure
=
json
[
'tenure'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'disp_address'
]
=
this
.
dispAddress
;
data
[
'tenure'
]
=
this
.
tenure
;
return
data
;
}
}
lib/Models/orderDetailsProductResponse.dart
deleted
100644 → 0
View file @
c2fe4726
class
OrderDetailsProductResponse
{
List
<
Products
>?
products
;
int
?
error
;
String
?
message
;
OrderDetailsProductResponse
({
this
.
products
,
this
.
error
,
this
.
message
});
OrderDetailsProductResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'products'
]
!=
null
)
{
products
=
<
Products
>[];
json
[
'products'
].
forEach
((
v
)
{
products
!.
add
(
new
Products
.
fromJson
(
v
));
});
}
error
=
json
[
'error'
];
message
=
json
[
'message'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
if
(
this
.
products
!=
null
)
{
data
[
'products'
]
=
this
.
products
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
return
data
;
}
}
class
Products
{
String
?
pname
;
String
?
qty
;
String
?
totalAmount
;
String
?
type
;
Products
({
this
.
pname
,
this
.
qty
,
this
.
totalAmount
,
this
.
type
});
Products
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
pname
=
json
[
'pname'
];
qty
=
json
[
'qty'
];
totalAmount
=
json
[
'total_amount'
];
type
=
json
[
'type'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'pname'
]
=
this
.
pname
;
data
[
'qty'
]
=
this
.
qty
;
data
[
'total_amount'
]
=
this
.
totalAmount
;
data
[
'type'
]
=
this
.
type
;
return
data
;
}
}
lib/Models/rentalAccountResponse.dart
deleted
100644 → 0
View file @
c2fe4726
class
RentalAccountResponse
{
List
<
Account
>?
account
;
int
?
error
;
String
?
message
;
RentalAccountResponse
({
this
.
account
,
this
.
error
,
this
.
message
});
RentalAccountResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'account'
]
!=
null
)
{
account
=
<
Account
>[];
json
[
'account'
].
forEach
((
v
)
{
account
!.
add
(
new
Account
.
fromJson
(
v
));
});
}
error
=
json
[
'error'
];
message
=
json
[
'message'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
if
(
this
.
account
!=
null
)
{
data
[
'account'
]
=
this
.
account
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
return
data
;
}
}
class
Account
{
String
?
id
;
String
?
name
;
String
?
address
;
Account
({
this
.
id
,
this
.
name
,
this
.
address
});
Account
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
name
=
json
[
'name'
];
address
=
json
[
'address'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'id'
]
=
this
.
id
;
data
[
'name'
]
=
this
.
name
;
data
[
'address'
]
=
this
.
address
;
return
data
;
}
}
lib/Models/rentalContactResponse.dart
deleted
100644 → 0
View file @
c2fe4726
class
RentalContactResponse
{
int
?
error
;
String
?
message
;
int
?
exist
;
String
?
city
;
String
?
raname
;
String
?
mob
;
String
?
mail
;
String
?
address
;
String
?
state
;
String
?
accId
;
int
?
otp
;
RentalContactResponse
(
{
this
.
error
,
this
.
message
,
this
.
exist
,
this
.
city
,
this
.
raname
,
this
.
mob
,
this
.
mail
,
this
.
address
,
this
.
state
,
this
.
accId
,
this
.
otp
});
RentalContactResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
error
=
json
[
'error'
];
message
=
json
[
'message'
];
exist
=
json
[
'exist'
];
city
=
json
[
'city'
];
raname
=
json
[
'raname'
];
mob
=
json
[
'mob'
];
mail
=
json
[
'mail'
];
address
=
json
[
'address'
];
state
=
json
[
'state'
];
accId
=
json
[
'acc_id'
];
otp
=
json
[
'otp'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
data
[
'exist'
]
=
this
.
exist
;
data
[
'city'
]
=
this
.
city
;
data
[
'raname'
]
=
this
.
raname
;
data
[
'mob'
]
=
this
.
mob
;
data
[
'mail'
]
=
this
.
mail
;
data
[
'address'
]
=
this
.
address
;
data
[
'state'
]
=
this
.
state
;
data
[
'acc_id'
]
=
this
.
accId
;
data
[
'otp'
]
=
this
.
otp
;
return
data
;
}
}
lib/Screens/DashboardScreen.dart
View file @
497a4fa7
...
...
@@ -1067,7 +1067,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
child:
Row
(
children:
[
SizedBox
(
width:
screenWidth
*
0.02
),
Icon
(
Icons
.
info
_outline
,
color:
Colors
.
red
,
size:
getResponsiveIconSize
(
context
,
15
)),
Icon
(
Icons
.
error
_outline
,
color:
Colors
.
red
,
size:
getResponsiveIconSize
(
context
,
15
)),
SizedBox
(
width:
screenWidth
*
0.01
),
Expanded
(
child:
Text
(
...
...
lib/Services/api_URLs.dart
View file @
497a4fa7
...
...
@@ -2,13 +2,9 @@
const
baseUrl
=
"https://erp.gengroup.in/ci/app/Rental/Rental_Home/"
;
const
baseUrl2
=
"https://erp.gengroup.in/ci/app/Rental/"
;
/// tokens url
const
addFcmTokenUrl
=
"
${baseUrl}
add_fcm_token"
;
/// payments and bills
const
addPaymentUrl
=
"
${baseUrl}
add_payment"
;
const
transactionsUrl
=
"
${baseUrl}
transactions"
;
const
balanceUrl
=
"
${baseUrl}
balance"
;
const
billDetailsUrl
=
"
${baseUrl}
bill_details"
;
const
billListUrl
=
"
${baseUrl}
bill_list"
;
const
downloadBillUrl
=
"
${baseUrl}
download_bill"
;
...
...
@@ -17,17 +13,10 @@ const downloadReceiptUrl = "${baseUrl}download_receipt";
const
payAmountUrl
=
"
${baseUrl}
pay_amount"
;
const
getPaymentStatusUrl
=
"
${baseUrl}
get_payment_status"
;
/// info
const
checkInOutSubmitUrl
=
"
${baseUrl}
check_in_out_submit"
;
const
rentalContactUrl
=
"
${baseUrl}
rental_contact"
;
const
getRentalAccInfoUrl
=
"
${baseUrl}
get_rental_acc_info"
;
/// order
const
orderDetailsBillUrl
=
"
${baseUrl}
order_details_bill"
;
const
orderDetailsMainUrl
=
"
${baseUrl}
order_details_main"
;
const
orderDetailsProductUrl
=
"
${baseUrl}
order_details_product"
;
const
subsOrderDetails
=
"
${baseUrl}
subs_order_details"
;
const
tagOrderUrl
=
"
${baseUrl}
tag_order"
;
/// tickets
const
addEnquiryUrl
=
"
${baseUrl}
add_enquiry"
;
...
...
lib/Services/api_calling.dart
View file @
497a4fa7
...
...
@@ -6,19 +6,14 @@ import 'package:gen_rentals/Models/HelpAndEnquiryModels/TicketChatDisplayRespons
import
'package:gen_rentals/Models/BillsModels/billListResponse.dart'
;
import
'package:gen_rentals/Models/ProfileResponse.dart'
;
import
'package:gen_rentals/Models/TransactionModels/PaymentReceiptDetailsResponse.dart'
;
import
'package:gen_rentals/Models/billProductResponse.dart'
;
import
'package:gen_rentals/Models/orderDetailsMainResponse.dart'
;
import
'package:gen_rentals/Models/orderDetailsProductResponse.dart'
;
import
'package:gen_rentals/Models/SubscribeOrderDetailsResponse.dart'
;
import
'package:gen_rentals/Models/HelpAndEnquiryModels/ticketListResponse.dart'
;
import
'../Models/BillsModels/BillDetailsResponse.dart'
;
import
'../Models/DashboardResponse.dart'
;
import
'../Models/RentalPaymentDetailsResponse.dart'
;
import
'../Models/TransactionModels/PayAmountResponse.dart'
;
import
'../Models/TransactionModels/TransactionsResponse.dart'
;
import
'../Models/orderDetailsBillResponse.dart'
;
import
'../Models/rentalAccountResponse.dart'
;
import
'../Models/rentalContactResponse.dart'
;
import
'../Notifier/PayAmountProvider.dart'
;
import
'../Notifier/RentalContactProvider .dart'
;
import
'api_URLs.dart'
;
...
...
@@ -121,7 +116,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
payAmountUrl
,
{});
debugPrint
(
"PayAmount Response
${res?.body}
"
);
//
debugPrint("PayAmount Response ${res?.body}");
if
(
res
!=
null
)
{
return
PayAmountResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
...
...
@@ -204,7 +199,7 @@ class ApiCalling {
final
res
=
await
post
(
data
,
billDetailsUrl
,
{});
debugPrint
(
"Bill Details Response
${res?.body}
"
);
//
debugPrint("Bill Details Response ${res?.body}");
if
(
res
!=
null
)
{
return
BillDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -260,7 +255,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
paymentReceiptDetailsUrl
,
{});
debugPrint
(
"TR Response
${res?.body}
"
);
//
debugPrint("TR Response ${res?.body}");
if
(
res
!=
null
)
{
return
PaymentReceiptDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
...
...
@@ -288,7 +283,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
downloadReceiptUrl
,
{});
debugPrint
(
"DownloadApi Response
${res}
"
);
//
debugPrint("DownloadApi Response${res}");
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
...
...
@@ -317,7 +312,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
subsOrderDetails
,
{});
debugPrint
(
"Subscribe order details Response:
${res?.body}
"
);
//
debugPrint("Subscribe order details Response: ${res?.body}");
if
(
res
!=
null
)
{
return
SubscribeOrderDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
...
...
@@ -333,34 +328,6 @@ class ApiCalling {
/// Fetch Order Details Main
static
Future
<
OrderDetailsMainResponse
?>
fetchOrderDetailMainApi
(
String
sessionId
,
String
empId
,
String
orderId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"session_id"
:
sessionId
,
"emp_id"
:
empId
,
"ord_id"
:
orderId
,
};
final
res
=
await
post
(
data
,
orderDetailsMainUrl
,
{});
if
(
res
!=
null
)
{
return
OrderDetailsMainResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ API Error (fetchOrderDetailMain):
$e
"
);
return
null
;
}
}
/// Fetch Rental Transaction
static
Future
<
TransactionsResponse
?>
fetchRentalsTransactionsApi
(
String
sessionId
,
...
...
@@ -426,8 +393,8 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
ticketChatDetailsUrl
,
{});
// debugPrint("
🟢
Raw API Response:\n${res?.body}");
// debugPrint("
🟢
Response Type: ${res?.body.runtimeType}");
// debugPrint(" Raw API Response:\n${res?.body}");
// debugPrint(" Response Type: ${res?.body.runtimeType}");
if
(
res
!=
null
)
{
return
TicketChatDisplayResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
...
...
@@ -440,33 +407,6 @@ class ApiCalling {
return
null
;
}
}
//
// static Future<addTicketResponse?> addTicketAPI(
// type, description, List<http.MultipartFile> newList) async {
// if (await CheckHeaderValidity()) {
// try {
// Map<String, String> data = {
// 'type': type.toString(),
// 'description': description.toString(),
// //ticket_image
// };
// // print("Add ticket ${data}");
// final header = await HeaderValues();
// final res = await PostMultipleImagesNew(
// data, addTicketsUrl, header, newList);
// if (res != null) {
// return addTicketResponse.fromJson(jsonDecode(res));
// } else {
// return null;
// }
// } catch (e) {
// debugPrint('hello bev=bug $e ');
// return null;
// }
// } else {
// return addTicketResponse(error: "401");
// }
// }
/// Send Message Chat Api
...
...
@@ -559,31 +499,6 @@ class ApiCalling {
/// Fetch Tag Order
static
Future
<
CommonResponse
?>
fetchTagOrderApi
(
String
sessionId
,
String
empId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"session_id"
:
sessionId
,
"emp_id"
:
empId
,
};
final
res
=
await
post
(
data
,
tagOrderUrl
,
{});
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ API Error (fetchTagOrder):
$e
"
);
return
null
;
}
}
/// Submit Enquiry Api
static
Future
<
CommonResponse
?>
submitEnquiryApi
(
...
...
@@ -621,117 +536,8 @@ class ApiCalling {
}
}
/// Fetch CheckInOut Submit
static
Future
<
CommonResponse
?>
fetchCheckInOutSubmitApi
(
String
sessionId
,
String
empId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"session_id"
:
sessionId
,
"emp_id"
:
empId
,
};
final
res
=
await
post
(
data
,
checkInOutSubmitUrl
,
{});
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ API Error (CheckInOutSubmit):
$e
"
);
return
null
;
}
}
/// Fetch Balance
static
Future
<
CommonResponse
?>
fetchBalanceApi
(
String
sessionId
,
String
empId
,
String
accId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"session_id"
:
sessionId
,
"emp_id"
:
empId
,
"acc_id"
:
accId
,
};
final
res
=
await
post
(
data
,
balanceUrl
,
{});
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ API Error (fetch Balance):
$e
"
);
return
null
;
}
}
/// Add Payment
static
Future
<
CommonResponse
?>
fetchAddPaymentApi
(
String
sessionId
,
String
empId
,
String
amount
,
String
orderId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"session_id"
:
sessionId
,
"emp_id"
:
empId
,
"amount"
:
amount
,
"order_id"
:
orderId
,
};
final
res
=
await
post
(
data
,
addPaymentUrl
,
{});
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ API Error (AddPaymentApi):
$e
"
);
return
null
;
}
}
/// Add Fcm Token
static
Future
<
CommonResponse
?>
fetchAddFcmTokenApi
(
String
sessionId
,
String
empId
,
String
amount
,
String
orderId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"session_id"
:
sessionId
,
"emp_id"
:
empId
,
"amount"
:
amount
,
"order_id"
:
orderId
,
};
final
res
=
await
post
(
data
,
addFcmTokenUrl
,
{});
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ API Error (fetch Add Payment Api):
$e
"
);
return
null
;
}
}
/// Fetch Dashboard
static
Future
<
DashboardResponse
?>
fetchDashboardApi
(
...
...
pubspec.lock
View file @
497a4fa7
...
...
@@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: async
sha256:
"758e6d74e
971c
3
e5
aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
sha256:
d2872f9c1
97
3
1c
2
e5
f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.1
3
.0"
version: "2.1
2
.0"
boolean_selector:
dependency: transitive
description:
...
...
@@ -412,10 +412,10 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "
8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0
"
sha256: "
33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de
"
url: "https://pub.dev"
source: hosted
version: "11.0.
1
"
version: "11.0.
2
"
leak_tracker_flutter_testing:
dependency: transitive
description:
...
...
@@ -865,10 +865,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256:
fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
sha256:
"522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.dev"
source: hosted
version: "0.7.
4
"
version: "0.7.
6
"
typed_data:
dependency: transitive
description:
...
...
@@ -913,18 +913,18 @@ packages:
dependency: transitive
description:
name: vector_math
sha256:
"80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
sha256:
d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
version: "2.
1.4
"
version: "2.
2.0
"
vm_service:
dependency: transitive
description:
name: vm_service
sha256:
ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
sha256:
"0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
version: "1
5.0.0
"
version: "1
4.3.1
"
web:
dependency: transitive
description:
...
...
@@ -966,5 +966,5 @@ packages:
source: hosted
version: "6.5.0"
sdks:
dart: ">=3.
7.2
<4.0.0"
dart: ">=3.
8.0-0
<4.0.0"
flutter: ">=3.29.0"