Commit d24e453e authored by Sai Srinivas's avatar Sai Srinivas
Browse files

19-06-2025 By Sai Srinivas

Finance Module Test cases & Safe Area
parent 4807bee4
...@@ -56,7 +56,7 @@ class _MonthlycollectionState extends State<Monthlycollection> { ...@@ -56,7 +56,7 @@ class _MonthlycollectionState extends State<Monthlycollection> {
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar2(context, "Payment Collection",provider.resetAll, sendWidget), appBar: appbar2(context, "Payment Collection",provider.resetAll, sendWidget),
body: provider.paymenCollectionList.isNotEmpty?Container( body: SafeArea(child: provider.paymenCollectionList.isNotEmpty?Container(
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
...@@ -232,7 +232,7 @@ class _MonthlycollectionState extends State<Monthlycollection> { ...@@ -232,7 +232,7 @@ class _MonthlycollectionState extends State<Monthlycollection> {
); );
}, },
), ),
):Emptywidget(context), ):Emptywidget(context),)
), ),
); );
}, },
......
...@@ -213,7 +213,8 @@ class _NearbygeneratorsState extends State<Nearbygenerators> { ...@@ -213,7 +213,8 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar2(context, "Nearby Generators",provider.resetAll,sendWidget), appBar: appbar2(context, "Nearby Generators",provider.resetAll,sendWidget),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: Container( body: SafeArea(
child: Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child:Column( child:Column(
children: [ children: [
...@@ -254,6 +255,7 @@ class _NearbygeneratorsState extends State<Nearbygenerators> { ...@@ -254,6 +255,7 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
), ),
), ),
), ),
),
); );
},); },);
} }
......
...@@ -94,7 +94,8 @@ class _PcwalletState extends State<Pcwallet> { ...@@ -94,7 +94,8 @@ class _PcwalletState extends State<Pcwallet> {
), ),
), ),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: Container( body: SafeArea(
child: Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
...@@ -320,6 +321,7 @@ class _PcwalletState extends State<Pcwallet> { ...@@ -320,6 +321,7 @@ class _PcwalletState extends State<Pcwallet> {
), ),
), ),
), ),
),
); );
}, },
); );
......
...@@ -65,7 +65,8 @@ class _PaymentdetailsState extends State<Paymentdetails> { ...@@ -65,7 +65,8 @@ class _PaymentdetailsState extends State<Paymentdetails> {
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar(context, "Payment Details"), appBar: appbar(context, "Payment Details"),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: Container( body: SafeArea(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10), padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 10), margin: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -457,6 +458,7 @@ class _PaymentdetailsState extends State<Paymentdetails> { ...@@ -457,6 +458,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
), ),
), ),
), ),
),
floatingActionButtonLocation: FloatingActionButtonLocation floatingActionButtonLocation: FloatingActionButtonLocation
.centerFloat, .centerFloat,
floatingActionButton: InkWell( floatingActionButton: InkWell(
......
...@@ -55,7 +55,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -55,7 +55,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
child: SvgPicture.asset("assets/svg/scanner.svg"), child: SvgPicture.asset("assets/svg/scanner.svg"),
), ),
), ),
body: provider.technician_complaint_list.isNotEmpty?Container( body: SafeArea(child: provider.technician_complaint_list.isNotEmpty?Container(
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
...@@ -241,7 +241,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -241,7 +241,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
); );
}, },
), ),
):Emptywidget(context), ):Emptywidget(context),)
), ),
); );
}, },
......
...@@ -50,7 +50,7 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> { ...@@ -50,7 +50,7 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, provider.title), appBar: appbar(context, provider.title),
body: body:SafeArea(child:
provider.visitsList.isNotEmpty provider.visitsList.isNotEmpty
? Container( ? Container(
child: ListView.builder( child: ListView.builder(
...@@ -281,7 +281,7 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> { ...@@ -281,7 +281,7 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
}, },
), ),
) )
: Emptywidget(context), : Emptywidget(context),)
), ),
); );
}, },
......
...@@ -31,7 +31,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -31,7 +31,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar(context, "Update Complaint"), appBar: appbar(context, "Update Complaint"),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: Container( body: SafeArea(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10), padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
...@@ -411,6 +412,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -411,6 +412,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
), ),
), ),
), ),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButton: InkResponse( floatingActionButton: InkResponse(
onTap:provider.submitLoading?null: () { onTap:provider.submitLoading?null: () {
......
...@@ -43,7 +43,8 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -43,7 +43,8 @@ class _VisitdetailsState extends State<Visitdetails> {
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar(context, "Visit Details"), appBar: appbar(context, "Visit Details"),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: Container( body: SafeArea(
child: SizedBox(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
...@@ -291,6 +292,7 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -291,6 +292,7 @@ class _VisitdetailsState extends State<Visitdetails> {
), ),
), ),
), ),
),
floatingActionButton: Align( floatingActionButton: Align(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: InkWell( child: InkWell(
......
...@@ -41,7 +41,8 @@ class _ScancomplaintdetailsState extends State<Scancomplaintdetails> { ...@@ -41,7 +41,8 @@ class _ScancomplaintdetailsState extends State<Scancomplaintdetails> {
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "Pending Complaints"), appBar: appbar(context, "Pending Complaints"),
body: Container( body: SafeArea(
child: Container(
decoration: BoxDecoration(color: Colors.black), decoration: BoxDecoration(color: Colors.black),
child: Column( child: Column(
children: [ children: [
...@@ -100,6 +101,7 @@ class _ScancomplaintdetailsState extends State<Scancomplaintdetails> { ...@@ -100,6 +101,7 @@ class _ScancomplaintdetailsState extends State<Scancomplaintdetails> {
), ),
), ),
), ),
),
); );
}, },
); );
......
...@@ -94,7 +94,8 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> { ...@@ -94,7 +94,8 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> {
), ),
), ),
), ),
body: Container( body: SafeArea(
child: Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
...@@ -315,6 +316,7 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> { ...@@ -315,6 +316,7 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> {
), ),
), ),
), ),
),
); );
}, },
); );
......
...@@ -141,7 +141,8 @@ class _SplashState extends State<Splash> { ...@@ -141,7 +141,8 @@ class _SplashState extends State<Splash> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
body: Consumer<SplashVersionNotifier>( body: SafeArea(
child: Consumer<SplashVersionNotifier>(
builder: (context, value, child) { builder: (context, value, child) {
return Container( return Container(
alignment: Alignment.center, alignment: Alignment.center,
...@@ -154,6 +155,7 @@ class _SplashState extends State<Splash> { ...@@ -154,6 +155,7 @@ class _SplashState extends State<Splash> {
); );
}, },
), ),
),
); );
} }
} }
...@@ -1652,7 +1652,9 @@ class ApiCalling { ...@@ -1652,7 +1652,9 @@ class ApiCalling {
}; };
final res = await post(data, paymentRequesitionPaymentsListUrl, {}); final res = await post(data, paymentRequesitionPaymentsListUrl, {});
if (res != null) { if (res != null) {
debugPrint(res.body); print(data);
print("payment req:${res.body}");
return paymentRequisitionPaymentsListResponse.fromJson( return paymentRequisitionPaymentsListResponse.fromJson(
jsonDecode(res.body), jsonDecode(res.body),
); );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment