Commit 6f73c3f4 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

UI changes

parent 72fe8e92
......@@ -204,7 +204,7 @@ class _ComplaintListScreenState extends State<ComplaintListScreen> {
physics: const ClampingScrollPhysics(),
slivers: <Widget>[
SliverAppBar(
leading: Container(),
automaticallyImplyLeading: false,
stretch: _stretch,
backgroundColor: const Color(0xFF4076FF),
onStretchTrigger: () async {
......@@ -221,7 +221,7 @@ class _ComplaintListScreenState extends State<ComplaintListScreen> {
StretchMode.blurBackground,
],
background: Container(
decoration: const BoxDecoration(color: AppColors.primary),
decoration: const BoxDecoration(gradient: AppColors.commonAppBarGradient),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16,
......@@ -259,7 +259,7 @@ class _ComplaintListScreenState extends State<ComplaintListScreen> {
SliverToBoxAdapter(
child: Container(
padding: const EdgeInsets.only(top: 1),
color: AppColors.primary,
color: AppColors.backgroundBottom,
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 16,
......
......@@ -387,49 +387,76 @@ class _SelectOrderHelpScreenState extends State<SelectOrderHelpScreen> {
/// AMC & Warranty tags
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.start,
children: [
// Status Badge with checkmark for AMC Protected
if (amc == "1" || amc == "2")
Container(
padding: const EdgeInsets.symmetric(
horizontal: 8,
horizontal: 5,
vertical: 4,
),
decoration: BoxDecoration(
gradient:
amc == "1"
? AppColors.greenStripGradient
: AppColors.fadeGradient,
amc == "1"
? AppColors.greenStripGradient
: AppColors.fadeGradient,
borderRadius: BorderRadius.circular(12),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset(
"assets/svg/tick_ic.svg",
height: 14,
color:
Row(
children: [
SvgPicture.asset(
"assets/svg/tick_ic.svg",
height: 14,
color:
amc == "1"
? AppColors.greenICBg
: AppColors.subtitleText,
),
const SizedBox(width: 4),
Text(
"AMC Protected",
style: TextStyle(
fontSize: 11,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
),
const SizedBox(width: 2),
Text(
"AMC ",
style: TextStyle(
fontSize: 11,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
amc == "1"
? AppColors.greenICBg
: AppColors.subtitleText,
),
),
),
Text(
"Protected",
style: TextStyle(
fontSize: 11,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
amc == "1"
? AppColors.normalText
: AppColors.subtitleText,
),
),
SizedBox(width: 4),
if (amc == "2")
const Icon(
Icons.info_outline,
color: Colors.red,
size: 12,
),
],
),
],
),
),
if (amc == "1" || amc == "2") SizedBox(width: 16),
// for warranty
if (warranty == "1" || warranty == "2")
Container(
padding: const EdgeInsets.symmetric(
......@@ -438,35 +465,44 @@ class _SelectOrderHelpScreenState extends State<SelectOrderHelpScreen> {
),
decoration: BoxDecoration(
gradient:
warranty == "1"
? AppColors.yellowStripGradient
: AppColors.fadeGradient,
warranty == "1"
? AppColors.yellowStripGradient
: AppColors.fadeGradient,
borderRadius: BorderRadius.circular(12),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset(
"assets/svg/tick2_ic.svg",
height: 14,
color:
Row(
children: [
SvgPicture.asset(
height: 14,
warranty == "1"
? AppColors.warning
: AppColors.subtitleText,
),
const SizedBox(width: 4),
Text(
"Warranty",
style: TextStyle(
fontSize: 11,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
? "assets/svg/tick2_ic.svg"
: "assets/svg/tick3_ic.svg",
),
const SizedBox(width: 2),
Text(
"Warranty",
style: TextStyle(
fontSize: 11,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
warranty == "1"
? AppColors.normalText
: AppColors.subtitleText,
),
),
),
SizedBox(width: 4),
if (warranty == "2")
const Icon(
Icons.info_outline,
color: Colors.red,
size: 12,
),
],
),
],
),
......
......@@ -793,7 +793,7 @@ class _HomeScreenState extends State<HomeScreen> {
if (amc == "1" || amc == "2")
Container(
padding: const EdgeInsets.symmetric(
horizontal: 8,
horizontal: 5,
vertical: 4,
),
decoration: BoxDecoration(
......@@ -816,7 +816,7 @@ class _HomeScreenState extends State<HomeScreen> {
? AppColors.greenICBg
: AppColors.subtitleText,
),
const SizedBox(width: 4),
const SizedBox(width: 2),
Text(
"AMC ",
style: TextStyle(
......@@ -881,9 +881,9 @@ class _HomeScreenState extends State<HomeScreen> {
? "assets/svg/tick2_ic.svg"
: "assets/svg/tick3_ic.svg",
),
const SizedBox(width: 6),
const SizedBox(width: 2),
Text(
" Warranty",
"Warranty",
style: TextStyle(
fontSize: 11,
fontFamily: "PoppinsBold",
......@@ -895,7 +895,7 @@ class _HomeScreenState extends State<HomeScreen> {
: AppColors.subtitleText,
),
),
SizedBox(width: 6),
SizedBox(width: 4),
if (warranty == "2")
const Icon(
Icons.info_outline,
......@@ -1356,227 +1356,229 @@ class _HomeScreenState extends State<HomeScreen> {
builder: (context) {
return StatefulBuilder(
builder: (context, setState) {
return Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
top: 16,
left: 16,
right: 16,
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Handle Bar
Center(
child: Container(
width: 40,
height: 4,
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(4),
return SafeArea(
child: Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
top: 16,
left: 16,
right: 16,
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Handle Bar
Center(
child: Container(
width: 40,
height: 4,
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(4),
),
),
),
),
const SizedBox(height: 16),
// Title
const Text(
"Balance Amount Bill",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
fontFamily: "Poppins",
const SizedBox(height: 16),
// Title
const Text(
"Balance Amount Bill",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
fontFamily: "Poppins",
),
),
),
const SizedBox(height: 6),
Divider(),
const SizedBox(height: 10),
// Pay Total Option
GestureDetector(
onTap: () {
setState(() => isPartPayment = false);
},
child: Row(
children: [
Radio<bool>(
value: false,
groupValue: isPartPayment,
onChanged: (v) => setState(() => isPartPayment = v!),
activeColor: const Color(0xFF008CDE),
),
// Radio<bool>(
// value: false,
// groupValue: isPartPayment,
// onChanged: (v) => setState(() => isPartPayment = v!),
// ),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Pay Total",
style: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
const SizedBox(height: 6),
Divider(),
const SizedBox(height: 10),
// Pay Total Option
GestureDetector(
onTap: () {
setState(() => isPartPayment = false);
},
child: Row(
children: [
Radio<bool>(
value: false,
groupValue: isPartPayment,
onChanged: (v) => setState(() => isPartPayment = v!),
activeColor: const Color(0xFF008CDE),
),
// Radio<bool>(
// value: false,
// groupValue: isPartPayment,
// onChanged: (v) => setState(() => isPartPayment = v!),
// ),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Pay Total",
style: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
),
),
),
Text(
"Avoid late payment fees.",
style: TextStyle(
color: Color(0xff5FBB54),
fontSize: 12,
fontFamily: "Poppins",
Text(
"Avoid late payment fees.",
style: TextStyle(
color: Color(0xff5FBB54),
fontSize: 12,
fontFamily: "Poppins",
),
),
],
),
const Spacer(),
Text(
"₹${totalAmount.toStringAsFixed(0)}",
style: const TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
),
],
),
const Spacer(),
Text(
"₹${totalAmount.toStringAsFixed(0)}",
style: const TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
),
),
],
],
),
),
),
const SizedBox(height: 10),
// Part Payment Option
GestureDetector(
onTap: () {
setState(() => isPartPayment = true);
},
child: Row(
children: [
Radio<bool>(
value: true,
groupValue: isPartPayment,
onChanged: (v) => setState(() => isPartPayment = v!),
activeColor: const Color(0xFF008CDE),
),
const Text(
"Part Payment",
style: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
const SizedBox(height: 10),
// Part Payment Option
GestureDetector(
onTap: () {
setState(() => isPartPayment = true);
},
child: Row(
children: [
Radio<bool>(
value: true,
groupValue: isPartPayment,
onChanged: (v) => setState(() => isPartPayment = v!),
activeColor: const Color(0xFF008CDE),
),
),
const SizedBox(width: 24),
Expanded(
child: Container(
height: 50,
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.grey.shade100,
borderRadius: BorderRadius.circular(12),
const Text(
"Part Payment",
style: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
),
child: TextFormField(
controller: amountController,
enabled: isPartPayment,
style: const TextStyle(
fontSize: 14,
fontFamily: "Poppins",
color: Colors.black87,
),
const SizedBox(width: 24),
Expanded(
child: Container(
height: 50,
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.grey.shade100,
borderRadius: BorderRadius.circular(12),
),
keyboardType: TextInputType.number,
decoration: const InputDecoration(
hintText: "Enter amount",
hintStyle: TextStyle(
child: TextFormField(
controller: amountController,
enabled: isPartPayment,
style: const TextStyle(
fontSize: 14,
fontFamily: "Poppins",
color: Colors.grey,
color: Colors.black87,
),
keyboardType: TextInputType.number,
decoration: const InputDecoration(
hintText: "Enter amount",
hintStyle: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
color: Colors.grey,
),
border: InputBorder.none,
),
border: InputBorder.none,
),
),
),
),
],
],
),
),
),
const SizedBox(height: 6),
Divider(),
const SizedBox(height: 6),
// Continue Button
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: () {
double enteredAmount =
isPartPayment
? double.tryParse(amountController.text) ?? 0
: totalAmount;
if (enteredAmount <= 0) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text("Please enter a valid amount"),
),
);
return;
}
if (isPartPayment && enteredAmount > totalAmount) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
"Entered amount cannot exceed total amount",
const SizedBox(height: 6),
Divider(),
const SizedBox(height: 6),
// Continue Button
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: () {
double enteredAmount =
isPartPayment
? double.tryParse(amountController.text) ?? 0
: totalAmount;
if (enteredAmount <= 0) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text("Please enter a valid amount"),
),
),
);
return;
}
Navigator.pop(context);
// Pass selected amount to your payAmountFunction
payAmountFunction(enteredAmount.toStringAsFixed(2));
},
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF008CDE),
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
);
return;
}
if (isPartPayment && enteredAmount > totalAmount) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
"Entered amount cannot exceed total amount",
),
),
);
return;
}
Navigator.pop(context);
// Pass selected amount to your payAmountFunction
payAmountFunction(enteredAmount.toStringAsFixed(2));
},
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF008CDE),
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
padding: const EdgeInsets.symmetric(vertical: 16),
),
padding: const EdgeInsets.symmetric(vertical: 16),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 22),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
"Continue Payment",
style: TextStyle(
fontFamily: "Poppins",
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 22),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
"Continue Payment",
style: TextStyle(
fontFamily: "Poppins",
color: Colors.white,
fontSize: 16,
),
),
SvgPicture.asset(
"assets/svg/continue_ic.svg",
color: Colors.white,
fontSize: 16,
height: 25,
width: 25,
),
),
SvgPicture.asset(
"assets/svg/continue_ic.svg",
color: Colors.white,
height: 25,
width: 25,
),
],
],
),
),
),
),
),
const SizedBox(height: 16),
],
const SizedBox(height: 16),
],
),
),
);
},
......
......@@ -399,7 +399,7 @@ class _SplashScreenState extends State<SplashScreen> with SingleTickerProviderSt
child: Column(
children: [
Text(
"Gen Services",
"My Gen",
style: TextStyle(
fontSize: 36,
fontWeight: FontWeight.w900,
......
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:gen_service/Screens/TransactionScreens/BillDetailScreen.dart';
......@@ -217,214 +219,220 @@ class _TransactionScreenState extends State<TransactionListScreen> {
Provider.of<TransactionsProvider>(context, listen: false)
.fetchTransactions(widget.accId, widget.sessionId);
},
child: Scaffold(
backgroundColor: AppColors.backgroundRegular,
body: CustomScrollView(
controller: _scrollController, // Add controller here
physics: const BouncingScrollPhysics(),
slivers: [
/// Top SliverAppBar (balance card) - No changes
SliverAppBar(
stretch: _stretch,
pinned: true,
expandedHeight: isPending ? 252 : 210,
backgroundColor: isPending ? AppColors.errorBg : Color(0xFF4076FF),
elevation: 0,
leading: Container(),
toolbarHeight: 0,
collapsedHeight: 0,
flexibleSpace: FlexibleSpaceBar(
stretchModes: const [StretchMode.zoomBackground],
background: Container(
decoration: BoxDecoration(
gradient: isPending
? AppColors.balanceBarGradientP
: AppColors.balanceBarGradientA,
),
child: SafeArea(
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
SizedBox(width: 8,),
InkResponse(
onTap: () => Navigator.pop(context, true),
child: SvgPicture.asset(
color: Colors.white,
"assets/svg/continue_left_ic.svg",
height: 30,
),
),
const SizedBox(width: 10),
const Text(
"Transactions",
style: TextStyle(
fontSize: 16,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
color: Colors.white,
),
),
],
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 18),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
child: SafeArea(
top: false,
bottom: Platform.isIOS?false:true,
maintainBottomViewPadding: true,
child: Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.backgroundRegular,
body: CustomScrollView(
controller: _scrollController, // Add controller here
physics: const BouncingScrollPhysics(),
slivers: [
/// Top SliverAppBar (balance card) - No changes
SliverAppBar(
stretch: _stretch,
pinned: true,
expandedHeight: isPending ? 252 : 210,
backgroundColor: isPending ? AppColors.errorBg : Color(0xFF4076FF),
elevation: 0,
leading: Container(),
toolbarHeight: 0,
collapsedHeight: 0,
flexibleSpace: FlexibleSpaceBar(
stretchModes: const [StretchMode.zoomBackground],
background: Container(
decoration: BoxDecoration(
gradient: isPending
? AppColors.balanceBarGradientP
: AppColors.balanceBarGradientA,
),
child: SafeArea(
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
const SizedBox(height: 20),
Text(
"₹$balance",
style: const TextStyle(
SizedBox(width: 8,),
InkResponse(
onTap: () => Navigator.pop(context, true),
child: SvgPicture.asset(
color: Colors.white,
fontSize: 34,
fontWeight: FontWeight.w500,
"assets/svg/continue_left_ic.svg",
height: 30,
),
),
const SizedBox(height: 2),
Text(
"$balanceType",
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
const SizedBox(width: 10),
const Text(
"Transactions",
style: TextStyle(
fontSize: 16,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
color: Colors.white,
),
),
if(isPending == false)
const SizedBox(height: 4),
if(isPending == false)
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.check_circle,
color: Colors.green,
size: 20,
],
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 18),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox(height: 20),
Text(
"₹$balance",
style: const TextStyle(
color: Colors.white,
fontSize: 34,
fontWeight: FontWeight.w500,
),
SizedBox(width: 2,),
Text(
"Last Paid on $lastPaid.",
maxLines: 1,
style: TextStyle(
color: const Color(0xFeFFFFFF),
fontSize: 12,
fontWeight: FontWeight.w400,
),
const SizedBox(height: 2),
Text(
"$balanceType",
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
),
if(isPending == false)
const SizedBox(height: 4),
if(isPending == false)
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.check_circle,
color: Colors.green,
size: 20,
),
),
],
),
const SizedBox(height: 10),
if (isPending)
ElevatedButton(
onPressed: () =>_openPaymentSheet(context, balance),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
foregroundColor: Colors.deepOrange,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
SizedBox(width: 2,),
Text(
"Last Paid on $lastPaid.",
maxLines: 1,
style: TextStyle(
color: const Color(0xFeFFFFFF),
fontSize: 12,
fontWeight: FontWeight.w400,
),
),
),
child: Text(
"Pay Now",
style: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w500,
color: AppColors.buttonColor,
],
),
const SizedBox(height: 10),
if (isPending)
ElevatedButton(
onPressed: () =>_openPaymentSheet(context, balance),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
foregroundColor: Colors.deepOrange,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
),
child: Text(
"Pay Now",
style: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w500,
color: AppColors.buttonColor,
),
),
),
SizedBox(height: 8,),
if (isPending)
Text(
"*Make sure to pay before you incur any fines.",
maxLines: 1,
style: TextStyle(
color: const Color(0xAAFFFFFF),
fontSize: 12,
fontWeight: FontWeight.w400,
),
),
SizedBox(height: 8,),
if (isPending)
Text(
"*Make sure to pay before you incur any fines.",
maxLines: 1,
style: TextStyle(
color: const Color(0xAAFFFFFF),
fontSize: 12,
fontWeight: FontWeight.w400,
),
),
],
],
),
),
),
],
],
),
),
),
),
),
),
/// Summary Row and Transaction List
SliverToBoxAdapter(
child: Container(
color: isPending ? AppColors.errorBg : Color(0xFF4076FF),
/// Summary Row and Transaction List
SliverToBoxAdapter(
child: Container(
decoration: const BoxDecoration(
color: AppColors.backgroundRegular,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30),
topRight: Radius.circular(30),
color: isPending ? AppColors.errorBg : Color(0xFF4076FF),
child: Container(
decoration: const BoxDecoration(
color: AppColors.backgroundRegular,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30),
topRight: Radius.circular(30),
),
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 4),
// Summary Card
Container(
margin: const EdgeInsets.all(16),
padding: const EdgeInsets.all(14),
decoration: BoxDecoration(
color: const Color(0xFFD7F0FF),
borderRadius: BorderRadius.circular(16),
border: Border.all(width: 1.1, color: AppColors.buttonColor),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildSummaryItem("₹$totalCredit", "Bill Paid", Colors.green),
Container(height: 30, width: 1, color: Colors.grey.shade300),
_buildSummaryItem("₹$totalDebit", "Bill Pending", Colors.red),
],
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 4),
// Summary Card
Container(
margin: const EdgeInsets.all(16),
padding: const EdgeInsets.all(14),
decoration: BoxDecoration(
color: const Color(0xFFD7F0FF),
borderRadius: BorderRadius.circular(16),
border: Border.all(width: 1.1, color: AppColors.buttonColor),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildSummaryItem("₹$totalCredit", "Bill Paid", Colors.green),
Container(height: 30, width: 1, color: Colors.grey.shade300),
_buildSummaryItem("₹$totalDebit", "Bill Pending", Colors.red),
],
),
),
),
// Transaction List
_buildTransactionList(provider, transactions),
],
// Transaction List
_buildTransactionList(provider, transactions),
],
),
),
),
),
),
/// Loading indicator for pagination
if (provider.isLoadingMore)
const SliverToBoxAdapter(
child: Padding(
padding: EdgeInsets.all(16.0),
child: Center(
child: CircularProgressIndicator(color: AppColors.buttonColor),
/// Loading indicator for pagination
if (provider.isLoadingMore)
const SliverToBoxAdapter(
child: Padding(
padding: EdgeInsets.all(16.0),
child: Center(
child: CircularProgressIndicator(color: AppColors.buttonColor),
),
),
),
),
/// No more data indicator
if (!provider.hasMore && transactions.isNotEmpty)
const SliverToBoxAdapter(
child: Padding(
padding: EdgeInsets.all(16.0),
child: Center(
child: Text(
"No more transactions",
style: TextStyle(
color: Colors.grey,
fontSize: 14,
/// No more data indicator
if (!provider.hasMore && transactions.isNotEmpty)
const SliverToBoxAdapter(
child: Padding(
padding: EdgeInsets.all(16.0),
child: Center(
child: Text(
"No more transactions",
style: TextStyle(
color: Colors.grey,
fontSize: 14,
),
),
),
),
),
),
],
],
),
),
),
);
......@@ -663,226 +671,228 @@ class _TransactionScreenState extends State<TransactionListScreen> {
builder: (context) {
return StatefulBuilder(
builder: (context, setState) {
return Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
top: 16,
left: 16,
right: 16,
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Handle Bar
Center(
child: Container(
width: 40,
height: 4,
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(4),
return SafeArea(
child: Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
top: 16,
left: 16,
right: 16,
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Handle Bar
Center(
child: Container(
width: 40,
height: 4,
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(4),
),
),
),
),
const SizedBox(height: 16),
// Title
const Text(
"Balance Amount Bill",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
fontFamily: "Poppins",
const SizedBox(height: 16),
// Title
const Text(
"Balance Amount Bill",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
fontFamily: "Poppins",
),
),
),
const SizedBox(height: 6),
Divider(),
const SizedBox(height: 10),
// Pay Total Option
GestureDetector(
onTap: () {
setState(() => isPartPayment = false);
},
child: Row(
children: [
Radio<bool>(
value: false,
groupValue: isPartPayment,
onChanged: (v) => setState(() => isPartPayment = v!),
activeColor: const Color(0xFF008CDE),
),
// Radio<bool>(
// value: false,
// groupValue: isPartPayment,
// onChanged: (v) => setState(() => isPartPayment = v!),
// ),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Pay Total",
style: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
const SizedBox(height: 6),
Divider(),
const SizedBox(height: 10),
// Pay Total Option
GestureDetector(
onTap: () {
setState(() => isPartPayment = false);
},
child: Row(
children: [
Radio<bool>(
value: false,
groupValue: isPartPayment,
onChanged: (v) => setState(() => isPartPayment = v!),
activeColor: const Color(0xFF008CDE),
),
// Radio<bool>(
// value: false,
// groupValue: isPartPayment,
// onChanged: (v) => setState(() => isPartPayment = v!),
// ),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Pay Total",
style: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
),
),
),
Text(
"Avoid late payment fees.",
style: TextStyle(
color: Color(0xff5FBB54),
fontSize: 12,
fontFamily: "Poppins",
Text(
"Avoid late payment fees.",
style: TextStyle(
color: Color(0xff5FBB54),
fontSize: 12,
fontFamily: "Poppins",
),
),
],
),
const Spacer(),
Text(
"₹${totalAmount.toStringAsFixed(0)}",
style: const TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
),
],
),
const Spacer(),
Text(
"₹${totalAmount.toStringAsFixed(0)}",
style: const TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
),
),
],
],
),
),
),
const SizedBox(height: 10),
// Part Payment Option
GestureDetector(
onTap: () {
setState(() => isPartPayment = true);
},
child: Row(
children: [
Radio<bool>(
value: true,
groupValue: isPartPayment,
onChanged: (v) => setState(() => isPartPayment = v!),
activeColor: const Color(0xFF008CDE),
),
const Text(
"Part Payment",
style: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
const SizedBox(height: 10),
// Part Payment Option
GestureDetector(
onTap: () {
setState(() => isPartPayment = true);
},
child: Row(
children: [
Radio<bool>(
value: true,
groupValue: isPartPayment,
onChanged: (v) => setState(() => isPartPayment = v!),
activeColor: const Color(0xFF008CDE),
),
),
const SizedBox(width: 24),
Expanded(
child: Container(
height: 50,
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.grey.shade100,
borderRadius: BorderRadius.circular(12),
const Text(
"Part Payment",
style: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
fontWeight: FontWeight.w400,
),
child: TextFormField(
controller: amountController,
enabled: isPartPayment,
style: const TextStyle(
fontSize: 14,
fontFamily: "Poppins",
color: Colors.black87,
),
const SizedBox(width: 24),
Expanded(
child: Container(
height: 50,
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.grey.shade100,
borderRadius: BorderRadius.circular(12),
),
keyboardType: TextInputType.number,
decoration: const InputDecoration(
hintText: "Enter amount",
hintStyle: TextStyle(
child: TextFormField(
controller: amountController,
enabled: isPartPayment,
style: const TextStyle(
fontSize: 14,
fontFamily: "Poppins",
color: Colors.grey,
color: Colors.black87,
),
keyboardType: TextInputType.number,
decoration: const InputDecoration(
hintText: "Enter amount",
hintStyle: TextStyle(
fontSize: 14,
fontFamily: "Poppins",
color: Colors.grey,
),
border: InputBorder.none,
),
border: InputBorder.none,
),
),
),
),
],
],
),
),
),
const SizedBox(height: 6),
Divider(),
const SizedBox(height: 6),
// Continue Button
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: () {
double enteredAmount = isPartPayment
? double.tryParse(amountController.text) ?? 0
: totalAmount;
if (enteredAmount <= 0) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text("Please enter a valid amount"),
),
);
return;
}
if (isPartPayment && enteredAmount > totalAmount) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
"Entered amount cannot exceed total amount",
const SizedBox(height: 6),
Divider(),
const SizedBox(height: 6),
// Continue Button
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: () {
double enteredAmount = isPartPayment
? double.tryParse(amountController.text) ?? 0
: totalAmount;
if (enteredAmount <= 0) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text("Please enter a valid amount"),
),
),
);
return;
}
Navigator.pop(context);
// Pass selected amount to your payAmountFunction
payAmountFunction(enteredAmount.toStringAsFixed(2));
},
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF008CDE),
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
);
return;
}
if (isPartPayment && enteredAmount > totalAmount) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
"Entered amount cannot exceed total amount",
),
),
);
return;
}
Navigator.pop(context);
// Pass selected amount to your payAmountFunction
payAmountFunction(enteredAmount.toStringAsFixed(2));
},
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF008CDE),
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
padding: const EdgeInsets.symmetric(vertical: 16),
),
padding: const EdgeInsets.symmetric(vertical: 16),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 22),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
"Continue Payment",
style: TextStyle(
fontFamily: "Poppins",
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 22),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
"Continue Payment",
style: TextStyle(
fontFamily: "Poppins",
color: Colors.white,
fontSize: 16,
),
),
SvgPicture.asset(
"assets/svg/continue_ic.svg",
color: Colors.white,
fontSize: 16,
height: 25,
width: 25,
),
),
SvgPicture.asset(
"assets/svg/continue_ic.svg",
color: Colors.white,
height: 25,
width: 25,
),
],
],
),
),
),
),
),
const SizedBox(height: 16),
],
const SizedBox(height: 16),
],
),
),
);
},
......
......@@ -53,6 +53,7 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
@override
Widget build(BuildContext context) {
double screenHeight = MediaQuery.of(context).size.height;
return Consumer<Generatordetailsprovider>(
builder: (context, detailsProvider, child) {
final isLoading = detailsProvider.isLoading;
......@@ -233,336 +234,355 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
child: Scaffold(
backgroundColor: Color(0xFF4076FF),
appBar: AppBar(
backgroundColor: Color(0xFF4076FF),
automaticallyImplyLeading: false,
// elevation: 2.0,
title: SizedBox(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InkResponse(
onTap: () {
HapticFeedback.selectionClick();
Navigator.pop(context, true);
},
child: SvgPicture.asset(
"assets/svg/appbar_back.svg",
height: 25,
),
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: InkResponse(
onTap: () {
HapticFeedback.selectionClick();
Navigator.pop(context, true);
},
child: Text(
"Generator Details",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
fontSize: 16,
color: Colors.white,
height: 1.1,
),
),
),
),
],
),
),
),
body: CustomScrollView(
slivers: [
SliverToBoxAdapter(
child: Container(
color: const Color(0xFF4076FF),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 12,
),
child: Column(
children: [
// Product Info Row
Row(
SliverAppBar(
automaticallyImplyLeading: false,
stretch: true,
onStretchTrigger: () async {
},
stretchTriggerOffset: 300.0,
backgroundColor: Color(0xFF4076FF),
expandedHeight: detailsProvider.showMoreDetails?screenHeight*0.62:screenHeight*0.211,
flexibleSpace: FlexibleSpaceBar(
stretchModes: const [
StretchMode.zoomBackground,
StretchMode.blurBackground,
],
background: Container(
decoration: const BoxDecoration(gradient: AppColors.commonAppBarGradient),
child: SafeArea(
child: Column(
children: [
Expanded(
flex: 5,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RichText(
text: TextSpan(
style: const TextStyle(
fontFamily: 'Poppins',
color: Color(0xFF48F3FF),
fontSize: 12,
),
children: [
TextSpan(text: "#${data.hashId!}"),
TextSpan(
text: " | Engine: ${data.engine!}",
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(width: 8,),
InkResponse(
onTap: () {
HapticFeedback.selectionClick();
Navigator.pop(context, true);
},
child: SvgPicture.asset(
"assets/svg/appbar_back.svg",
height: 25,
),
Text(
data.prodName!,
maxLines: 2,
style: const TextStyle(
color: Colors.white,
fontSize: 14,
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: InkResponse(
onTap: () {
HapticFeedback.selectionClick();
Navigator.pop(context, true);
},
child: Text(
"Generator Details",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
fontSize: 16,
color: Colors.white,
height: 1.1,
),
),
),
if (data.amc != "0") ...[
Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset(
"assets/svg/tick_ic.svg",
height: 15,
color:
data.amc == "1"
? AppColors.greenICBg
: AppColors.subtitleText,
),
const SizedBox(width: 4),
Text(
"AMC ",
style: TextStyle(
fontSize: 15,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
data.amc == "1"
? AppColors.greenICBg
: AppColors.subtitleText,
),
),
Text(
"Protected",
style: TextStyle(
fontSize: 15,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
data.amc == "1"
? AppColors.normalText
: AppColors.subtitleText,
),
),
const SizedBox(width: 4),
if (data.amc == "2")
const Icon(
Icons.info_outline,
color: Colors.red,
size: 15,
),
],
),
],
if (data.warranty != "0") ...[
Row(
mainAxisSize: MainAxisSize.min,
children: [
Row(
),
],
),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 12,
),
child: Column(
children: [
// Product Info Row
Row(
children: [
Expanded(
flex: 5,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
"assets/svg/tick2_ic.svg",
height: 15,
color:
data.warranty == "1"
? AppColors.warning
: AppColors
.subtitleText,
RichText(
text: TextSpan(
style: const TextStyle(
fontFamily: 'Poppins',
color: Color(0xFF48F3FF),
fontSize: 12,
),
children: [
TextSpan(text: "#${data.hashId!}"),
TextSpan(
text: " | Engine: ${data.engine!}",
),
],
),
),
const SizedBox(width: 6),
Text(
"Warranty",
style: TextStyle(
fontSize: 15,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
data.warranty == "1"
? AppColors.normalText
: AppColors
.subtitleText,
data.prodName!,
maxLines: 2,
style: const TextStyle(
color: Colors.white,
fontSize: 14,
),
),
SizedBox(width: 6),
if (data.warranty == "2")
const Icon(
Icons.info_outline,
color: Colors.red,
size: 15,
if (data.amc != "0") ...[
Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset(
"assets/svg/tick_ic.svg",
height: 15,
color:
data.amc == "1"
? AppColors.greenICBg
: AppColors.subtitleText,
),
const SizedBox(width: 4),
Text(
"AMC ",
style: TextStyle(
fontSize: 15,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
data.amc == "1"
? AppColors.greenICBg
: AppColors.subtitleText,
),
),
Text(
"Protected",
style: TextStyle(
fontSize: 15,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
data.amc == "1"
? AppColors.normalText
: AppColors.subtitleText,
),
),
const SizedBox(width: 4),
if (data.amc == "2")
const Icon(
Icons.info_outline,
color: Colors.red,
size: 15,
),
],
),
],
if (data.warranty != "0") ...[
Row(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
SvgPicture.asset(
"assets/svg/tick2_ic.svg",
height: 15,
color:
data.warranty == "1"
? AppColors.warning
: AppColors
.subtitleText,
),
const SizedBox(width: 6),
Text(
"Warranty",
style: TextStyle(
fontSize: 15,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
data.warranty == "1"
? AppColors.normalText
: AppColors
.subtitleText,
),
),
SizedBox(width: 6),
if (data.warranty == "2")
const Icon(
Icons.info_outline,
color: Colors.red,
size: 15,
),
],
),
],
),
],
],
),
],
),
],
],
),
),
Expanded(
flex: 2,
child: Image.network(
data.prodImg!,
fit: BoxFit.scaleDown,
),
),
],
),
// Show More Details
if (detailsProvider.showMoreDetails) ...[
const Divider(color: Colors.white),
...List.generate(headings.length, (index) {
final sectionTitle = sectionTitles[index];
final sectionItems = headings[index];
final sectionSubItems = subHeadings[index];
return Padding(
padding: const EdgeInsets.only(top: 12),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 25,
width: 25,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
),
child: Center(
child: Text(
index == 0 ? "🔧" : "📍",
style: const TextStyle(fontSize: 14),
),
),
),
const SizedBox(width: 8),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
sectionTitle,
style: const TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 16,
),
Expanded(
flex: 2,
child: Image.network(
data.prodImg!,
fit: BoxFit.scaleDown,
),
const SizedBox(height: 8),
...List.generate(sectionItems.length, (
i,
) {
return Padding(
padding: const EdgeInsets.symmetric(
vertical: 3,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
sectionItems[i]??"-",
style: const TextStyle(
fontSize: 14,
color: Color(0xFF48F3FF),
),
),
),
],
),
// Show More Details
if (detailsProvider.showMoreDetails) ...[
const Divider(color: Colors.white),
...List.generate(headings.length, (index) {
final sectionTitle = sectionTitles[index];
final sectionItems = headings[index];
final sectionSubItems = subHeadings[index];
return Padding(
padding: const EdgeInsets.only(top: 12),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 25,
width: 25,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
),
child: Center(
child: Text(
index == 0 ? "🔧" : "📍",
style: const TextStyle(fontSize: 14),
),
Expanded(
child: Text(
sectionSubItems[i]??"-",
maxLines: 3,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.end,
),
),
const SizedBox(width: 8),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
sectionTitle,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 16,
),
),
),
],
const SizedBox(height: 8),
...List.generate(sectionItems.length, (
i,
) {
return Padding(
padding: const EdgeInsets.symmetric(
vertical: 3,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
sectionItems[i]??"-",
style: const TextStyle(
fontSize: 14,
color: Color(0xFF48F3FF),
),
),
),
Expanded(
child: Text(
sectionSubItems[i]??"-",
maxLines: 3,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.end,
style: const TextStyle(
fontSize: 14,
color: Colors.white,
),
),
),
],
),
);
}),
],
),
),
);
}),
],
),
),
],
),
);
}),
],
],
),
);
}),
],
Center(
child: InkResponse(
onTap:
() =>
detailsProvider.showMoreDetails =
!detailsProvider.showMoreDetails,
child: Container(
width: 125,
margin: const EdgeInsets.only(top: 5),
padding: const EdgeInsets.symmetric(vertical: 6),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
border: Border.all(
color: Colors.white,
width: 0.7,
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
detailsProvider.showMoreDetails
? "Hide Details"
: "View Details",
style: const TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: Colors.white,
),
),
const SizedBox(width: 4),
Transform.flip(
flipY: detailsProvider.showMoreDetails,
child: SvgPicture.asset(
"assets/svg/arrow_dropdown.svg",
height: 12,
width: 12,
colorFilter: const ColorFilter.mode(
Colors.white,
BlendMode.srcIn,
Center(
child: InkResponse(
onTap:
() =>
detailsProvider.showMoreDetails =
!detailsProvider.showMoreDetails,
child: Container(
width: 125,
margin: const EdgeInsets.only(top: 5),
padding: const EdgeInsets.symmetric(vertical: 6),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
border: Border.all(
color: Colors.white,
width: 0.7,
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
detailsProvider.showMoreDetails
? "Hide Details"
: "View Details",
style: const TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: Colors.white,
),
),
const SizedBox(width: 4),
Transform.flip(
flipY: detailsProvider.showMoreDetails,
child: SvgPicture.asset(
"assets/svg/arrow_dropdown.svg",
height: 12,
width: 12,
colorFilter: const ColorFilter.mode(
Colors.white,
BlendMode.srcIn,
),
),
),
],
),
),
),
),
const SizedBox(height: 10),
],
),
),
),
],
),
const SizedBox(height: 10),
],
)
),
),
),
SliverFillRemaining(
hasScrollBody: false,
child: Container(
......@@ -771,6 +791,7 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
],
SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (data.status == "Completed") ...[
Text(
......@@ -791,6 +812,126 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
: Color(0xFF777777),
),
),
///AMC Warranty
if (data.amc != "0") ...[
SizedBox(height: 5,),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 5,
vertical: 4,
),
decoration: BoxDecoration(
gradient:
data.amc == "1"
? AppColors.greenStripGradient
: AppColors.fadeGradient,
borderRadius: BorderRadius.circular(12),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset(
"assets/svg/tick_ic.svg",
height: 15,
color:
data.amc == "1"
? AppColors.greenICBg
: AppColors.subtitleText,
),
const SizedBox(width: 4),
Text(
"AMC ",
style: TextStyle(
fontSize: 12,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
data.amc == "1"
? AppColors.greenICBg
: AppColors.subtitleText,
),
),
Text(
"Protected",
style: TextStyle(
fontSize: 12,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
data.amc == "1"
? AppColors.normalText
: AppColors.subtitleText,
),
),
const SizedBox(width: 4),
if (data.amc == "2")
const Icon(
Icons.info_outline,
color: Colors.red,
size: 15,
),
],
),
),
],
if (data.warranty != "0") ...[
SizedBox(height: 5,),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
),
decoration: BoxDecoration(
gradient:
data.warranty == "1"
? AppColors.yellowStripGradient
: AppColors.fadeGradient,
borderRadius: BorderRadius.circular(12),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
SvgPicture.asset(
"assets/svg/tick2_ic.svg",
height: 15,
color:
data.warranty == "1"
? AppColors.warning
: AppColors
.subtitleText,
),
const SizedBox(width: 6),
Text(
"Warranty",
style: TextStyle(
fontSize: 15,
fontFamily: "PoppinsBold",
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w700,
color:
data.warranty == "1"
? AppColors.normalText
: AppColors
.subtitleText,
),
),
SizedBox(width: 6),
if (data.warranty == "2")
const Icon(
Icons.info_outline,
color: Colors.red,
size: 15,
),
],
),
],
),
),
],
],
),
),
......
......@@ -41,7 +41,7 @@ class MyApp extends StatelessWidget {
builder: (context, themeProvider, child) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Gen Services',
title: 'My Gen',
theme: ThemeData(
fontFamily: 'Poppins',
),
......
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