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
30024bcbe3b31effc44c18fac572b2f929f39d92...c2fe4726adedec75237f81698a15c884c057f42c
Commits (2)
fixes
· db93d1c9
Sai Srinivas
authored
Nov 11, 2025
and
Sai Srinivas
committed
Nov 18, 2025
db93d1c9
Merge remote-tracking branch 'origin/main'
· c2fe4726
Sai Srinivas
authored
Nov 18, 2025
c2fe4726
Show whitespace changes
Inline
Side-by-side
lib/Notifier/RentalContactProvider .dart
View file @
c2fe4726
...
@@ -197,16 +197,11 @@ class RentalProvider extends ChangeNotifier {
...
@@ -197,16 +197,11 @@ class RentalProvider extends ChangeNotifier {
if
(
response
!=
null
&&
response
.
error
==
0
)
{
if
(
response
!=
null
&&
response
.
error
==
0
)
{
// Clear user data if needed
// await SharedPrefHelper.clearAll();
// Show toast/snackbar
// Show toast/snackbar
CustomSnackBar
.
showSuccess
(
CustomSnackBar
.
showSuccess
(
context:
context
,
context:
context
,
message:
response
.
message
??
"Logout successful"
message:
response
.
message
??
"Logout successful"
);
);
// Navigate to login screen
// Navigate to login screen
// Navigator.pushNamedAndRemoveUntil(context, '/login', (_) => false);
// Navigator.pushNamedAndRemoveUntil(context, '/login', (_) => false);
}
else
{
}
else
{
...
...
lib/Screens/BillScreens/BillDetailListScreen.dart
View file @
c2fe4726
...
@@ -9,6 +9,7 @@ import 'package:razorpay_flutter/razorpay_flutter.dart';
...
@@ -9,6 +9,7 @@ import 'package:razorpay_flutter/razorpay_flutter.dart';
import
'../../Notifier/BillProvider.dart'
;
import
'../../Notifier/BillProvider.dart'
;
import
'../../Notifier/PayAmountProvider.dart'
;
import
'../../Notifier/PayAmountProvider.dart'
;
import
'../../Utility/CustomSnackbar.dart'
;
import
'../../Utility/CustomSnackbar.dart'
;
import
'../../Utility/SharedpreferencesService.dart'
;
import
'../DashboardScreen.dart'
;
import
'../DashboardScreen.dart'
;
import
'../TransactionScreens/PaymentSuccessfailScreen.dart'
;
import
'../TransactionScreens/PaymentSuccessfailScreen.dart'
;
import
'BillDetailScreen.dart'
;
import
'BillDetailScreen.dart'
;
...
@@ -36,7 +37,7 @@ class _BillDetailListScreenState extends State<BillDetailListScreen> {
...
@@ -36,7 +37,7 @@ class _BillDetailListScreenState extends State<BillDetailListScreen> {
bool
?
isSuccess
;
bool
?
isSuccess
;
var
paymentMethod
=
""
;
var
paymentMethod
=
""
;
var
User_contact
=
"0"
;
var
User_contact
=
"0"
;
final
prefs
=
SharedPreferencesService
.
instance
;
@override
@override
void
initState
()
{
void
initState
()
{
...
@@ -75,6 +76,7 @@ class _BillDetailListScreenState extends State<BillDetailListScreen> {
...
@@ -75,6 +76,7 @@ class _BillDetailListScreenState extends State<BillDetailListScreen> {
// buttonLoading = false;
// buttonLoading = false;
});
});
}
}
void
_handlePaymentError
(
PaymentFailureResponse
response
)
{
void
_handlePaymentError
(
PaymentFailureResponse
response
)
{
setState
(()
{
setState
(()
{
CustomSnackBar
.
showError
(
CustomSnackBar
.
showError
(
...
@@ -141,6 +143,9 @@ class _BillDetailListScreenState extends State<BillDetailListScreen> {
...
@@ -141,6 +143,9 @@ class _BillDetailListScreenState extends State<BillDetailListScreen> {
//razorpay payments__________________________________________________________
//razorpay payments__________________________________________________________
void
openCheckout
(
razorPayOrderId
,
String
razorpayKey
)
async
{
void
openCheckout
(
razorPayOrderId
,
String
razorpayKey
)
async
{
final
String
?
mobNumber
=
await
prefs
.
getString
(
"mob_number"
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_SUCCESS
,
_handlePaymentSuccess
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_SUCCESS
,
_handlePaymentSuccess
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_ERROR
,
_handlePaymentError
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_ERROR
,
_handlePaymentError
);
_razorpay
.
on
(
Razorpay
.
EVENT_EXTERNAL_WALLET
,
_handleExternalWallet
);
_razorpay
.
on
(
Razorpay
.
EVENT_EXTERNAL_WALLET
,
_handleExternalWallet
);
...
@@ -153,7 +158,7 @@ class _BillDetailListScreenState extends State<BillDetailListScreen> {
...
@@ -153,7 +158,7 @@ class _BillDetailListScreenState extends State<BillDetailListScreen> {
'description'
:
"Bill"
,
'description'
:
"Bill"
,
'currency'
:
'INR'
,
'currency'
:
'INR'
,
'method'
:
'upi'
,
'method'
:
'upi'
,
'prefill'
:
{
'contact'
:
User_contact
,
'email'
:
''
}
'prefill'
:
{
'contact'
:
mobNumber
,
'email'
:
''
}
};
};
// print(options);
// print(options);
try
{
try
{
...
...
lib/Screens/BillScreens/BillDetailScreen.dart
View file @
c2fe4726
...
@@ -7,6 +7,7 @@ import '../../Notifier/PayAmountProvider.dart';
...
@@ -7,6 +7,7 @@ import '../../Notifier/PayAmountProvider.dart';
import
'../../Utility/AppColors.dart'
;
import
'../../Utility/AppColors.dart'
;
import
'../../Utility/CustomSnackbar.dart'
;
import
'../../Utility/CustomSnackbar.dart'
;
import
'../../Utility/Reusablewidgets.dart'
;
import
'../../Utility/Reusablewidgets.dart'
;
import
'../../Utility/SharedpreferencesService.dart'
;
import
'../TransactionScreens/PaymentSuccessfailScreen.dart'
;
import
'../TransactionScreens/PaymentSuccessfailScreen.dart'
;
class
BillDetailScreen
extends
StatefulWidget
{
class
BillDetailScreen
extends
StatefulWidget
{
...
@@ -30,7 +31,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -30,7 +31,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
bool
?
isSuccess
;
bool
?
isSuccess
;
var
paymentMethod
=
""
;
var
paymentMethod
=
""
;
var
User_contact
=
"0"
;
var
User_contact
=
"0"
;
final
prefs
=
SharedPreferencesService
.
instance
;
// Responsive text size function
// Responsive text size function
double
getResponsiveTextSize
(
BuildContext
context
,
double
baseSize
)
{
double
getResponsiveTextSize
(
BuildContext
context
,
double
baseSize
)
{
...
@@ -172,6 +173,9 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -172,6 +173,9 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
//razorpay payments__________________________________________________________
//razorpay payments__________________________________________________________
void
openCheckout
(
razorPayOrderId
,
String
razorpayKey
)
async
{
void
openCheckout
(
razorPayOrderId
,
String
razorpayKey
)
async
{
final
String
?
mobNumber
=
await
prefs
.
getString
(
"mob_number"
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_SUCCESS
,
_handlePaymentSuccess
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_SUCCESS
,
_handlePaymentSuccess
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_ERROR
,
_handlePaymentError
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_ERROR
,
_handlePaymentError
);
_razorpay
.
on
(
Razorpay
.
EVENT_EXTERNAL_WALLET
,
_handleExternalWallet
);
_razorpay
.
on
(
Razorpay
.
EVENT_EXTERNAL_WALLET
,
_handleExternalWallet
);
...
@@ -184,7 +188,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -184,7 +188,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
'description'
:
"Bill"
,
'description'
:
"Bill"
,
'currency'
:
'INR'
,
'currency'
:
'INR'
,
'method'
:
'upi'
,
'method'
:
'upi'
,
'prefill'
:
{
'contact'
:
User_contact
,
'email'
:
''
}
'prefill'
:
{
'contact'
:
mobNumber
,
'email'
:
''
}
};
};
// print(options);
// print(options);
try
{
try
{
...
...
lib/Screens/DashboardScreen.dart
View file @
c2fe4726
...
@@ -15,6 +15,7 @@ import 'package:provider/provider.dart';
...
@@ -15,6 +15,7 @@ import 'package:provider/provider.dart';
import
'../Models/DashboardResponse.dart'
;
import
'../Models/DashboardResponse.dart'
;
import
'../Notifier/DashboardProvider.dart'
;
import
'../Notifier/DashboardProvider.dart'
;
import
'../Notifier/PayAmountProvider.dart'
;
import
'../Notifier/PayAmountProvider.dart'
;
import
'../Utility/SharedpreferencesService.dart'
;
import
'TransactionScreens/PaymentSuccessfailScreen.dart'
;
import
'TransactionScreens/PaymentSuccessfailScreen.dart'
;
import
'authScreen/LoginScreen.dart'
;
import
'authScreen/LoginScreen.dart'
;
import
'package:razorpay_flutter/razorpay_flutter.dart'
;
import
'package:razorpay_flutter/razorpay_flutter.dart'
;
...
@@ -36,7 +37,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
...
@@ -36,7 +37,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
var
paymentMethod
=
""
;
var
paymentMethod
=
""
;
var
User_contact
=
"0"
;
var
User_contact
=
"0"
;
final
prefs
=
SharedPreferencesService
.
instance
;
@override
@override
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
...
@@ -144,6 +145,8 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
...
@@ -144,6 +145,8 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
//razorpay payments__________________________________________________________
//razorpay payments__________________________________________________________
void
openCheckout
(
razorPayOrderId
,
String
razorpayKey
)
async
{
void
openCheckout
(
razorPayOrderId
,
String
razorpayKey
)
async
{
final
String
?
mobNumber
=
await
prefs
.
getString
(
"mob_number"
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_SUCCESS
,
_handlePaymentSuccess
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_SUCCESS
,
_handlePaymentSuccess
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_ERROR
,
_handlePaymentError
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_ERROR
,
_handlePaymentError
);
_razorpay
.
on
(
Razorpay
.
EVENT_EXTERNAL_WALLET
,
_handleExternalWallet
);
_razorpay
.
on
(
Razorpay
.
EVENT_EXTERNAL_WALLET
,
_handleExternalWallet
);
...
@@ -156,7 +159,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
...
@@ -156,7 +159,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
'description'
:
"Payment"
,
'description'
:
"Payment"
,
'currency'
:
'INR'
,
'currency'
:
'INR'
,
'method'
:
'upi'
,
'method'
:
'upi'
,
'prefill'
:
{
'contact'
:
User_contact
,
'email'
:
''
}
'prefill'
:
{
'contact'
:
mobNumber
,
'email'
:
''
}
};
};
// print(options);
// print(options);
try
{
try
{
...
...
lib/Screens/ProfileScreen.dart
View file @
c2fe4726
...
@@ -477,7 +477,6 @@ class _ProfileScreenState extends State<ProfileScreen> {
...
@@ -477,7 +477,6 @@ class _ProfileScreenState extends State<ProfileScreen> {
],
],
),
),
const
SizedBox
(
height:
30
),
const
SizedBox
(
height:
30
),
],
],
),
),
),
),
...
...
lib/Screens/TransactionScreens/TransactionsScreen.dart
View file @
c2fe4726
...
@@ -9,6 +9,7 @@ import '../../Notifier/PayAmountProvider.dart';
...
@@ -9,6 +9,7 @@ import '../../Notifier/PayAmountProvider.dart';
import
'../../Notifier/TransactionsProvider.dart'
;
import
'../../Notifier/TransactionsProvider.dart'
;
import
'../../Utility/AppColors.dart'
;
import
'../../Utility/AppColors.dart'
;
import
'../../Utility/CustomSnackbar.dart'
;
import
'../../Utility/CustomSnackbar.dart'
;
import
'../../Utility/SharedpreferencesService.dart'
;
import
'../BillScreens/BillDetailScreen.dart'
;
import
'../BillScreens/BillDetailScreen.dart'
;
import
'../DashboardScreen.dart'
;
import
'../DashboardScreen.dart'
;
import
'BillPendingToast.dart'
;
import
'BillPendingToast.dart'
;
...
@@ -33,7 +34,7 @@ class _TransactionsScreenState extends State<TransactionsScreen> {
...
@@ -33,7 +34,7 @@ class _TransactionsScreenState extends State<TransactionsScreen> {
late
Razorpay
_razorpay
;
late
Razorpay
_razorpay
;
var
paymentMethod
=
""
;
var
paymentMethod
=
""
;
var
User_contact
=
"0"
;
var
User_contact
=
"0"
;
final
prefs
=
SharedPreferencesService
.
instance
;
@override
@override
void
initState
()
{
void
initState
()
{
...
@@ -145,6 +146,9 @@ class _TransactionsScreenState extends State<TransactionsScreen> {
...
@@ -145,6 +146,9 @@ class _TransactionsScreenState extends State<TransactionsScreen> {
//razorpay payments__________________________________________________________
//razorpay payments__________________________________________________________
void
openCheckout
(
razorPayOrderId
,
String
razorpayKey
)
async
{
void
openCheckout
(
razorPayOrderId
,
String
razorpayKey
)
async
{
final
String
?
mobNumber
=
await
prefs
.
getString
(
"mob_number"
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_SUCCESS
,
_handlePaymentSuccess
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_SUCCESS
,
_handlePaymentSuccess
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_ERROR
,
_handlePaymentError
);
_razorpay
.
on
(
Razorpay
.
EVENT_PAYMENT_ERROR
,
_handlePaymentError
);
_razorpay
.
on
(
Razorpay
.
EVENT_EXTERNAL_WALLET
,
_handleExternalWallet
);
_razorpay
.
on
(
Razorpay
.
EVENT_EXTERNAL_WALLET
,
_handleExternalWallet
);
...
@@ -157,7 +161,7 @@ class _TransactionsScreenState extends State<TransactionsScreen> {
...
@@ -157,7 +161,7 @@ class _TransactionsScreenState extends State<TransactionsScreen> {
'description'
:
"Payment"
,
'description'
:
"Payment"
,
'currency'
:
'INR'
,
'currency'
:
'INR'
,
'method'
:
'upi'
,
'method'
:
'upi'
,
'prefill'
:
{
'contact'
:
User_contact
,
'email'
:
''
}
'prefill'
:
{
'contact'
:
mobNumber
,
'email'
:
''
}
};
};
// print(options);
// print(options);
try
{
try
{
...
...
lib/Screens/authScreen/OTP_Screen.dart
View file @
c2fe4726
...
@@ -92,6 +92,7 @@ class _OtpScreenState extends State<OtpScreen> {
...
@@ -92,6 +92,7 @@ class _OtpScreenState extends State<OtpScreen> {
if
(
rentalProvider
.
otpResponse
?.
accId
!=
null
)
{
if
(
rentalProvider
.
otpResponse
?.
accId
!=
null
)
{
await
prefs
.
saveString
(
"accId"
,
rentalProvider
.
otpResponse
!.
accId
!);
await
prefs
.
saveString
(
"accId"
,
rentalProvider
.
otpResponse
!.
accId
!);
await
prefs
.
saveString
(
"session_id"
,
rentalProvider
.
otpResponse
!.
sessionId
!);
await
prefs
.
saveString
(
"session_id"
,
rentalProvider
.
otpResponse
!.
sessionId
!);
await
prefs
.
saveString
(
"mob_number"
,
widget
.
mob
);
}
}
// Navigate to dashboard
// Navigate to dashboard
...
@@ -237,7 +238,7 @@ class _OtpScreenState extends State<OtpScreen> {
...
@@ -237,7 +238,7 @@ class _OtpScreenState extends State<OtpScreen> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
async
{
onWillPop:
()
async
{
Navigator
.
pop
(
context
);
// 👈 Goes back to previous (login) screen
Navigator
.
pop
(
context
);
return
false
;
// Prevents app from closing
return
false
;
// Prevents app from closing
},
},
child:
Scaffold
(
child:
Scaffold
(
...
...
lib/Utility/AppColors.dart
View file @
c2fe4726
lib/Utility/CustomSnackbar.dart
View file @
c2fe4726
...
@@ -9,7 +9,7 @@ class CustomSnackBar {
...
@@ -9,7 +9,7 @@ class CustomSnackBar {
String
?
title
,
String
?
title
,
IconData
?
icon
,
IconData
?
icon
,
Color
backgroundColor
=
const
Color
(
0xFF324563
),
Color
backgroundColor
=
const
Color
(
0xFF324563
),
Duration
duration
=
const
Duration
(
seconds:
4
),
Duration
duration
=
const
Duration
(
seconds:
2
),
SnackBarAction
?
action
,
SnackBarAction
?
action
,
bool
showCloseIcon
=
true
,
bool
showCloseIcon
=
true
,
bool
enableHaptic
=
true
,
bool
enableHaptic
=
true
,
...
...