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,12 +387,13 @@ 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(
......@@ -404,6 +405,8 @@ class _SelectOrderHelpScreenState extends State<SelectOrderHelpScreen> {
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
SvgPicture.asset(
"assets/svg/tick_ic.svg",
......@@ -413,9 +416,9 @@ class _SelectOrderHelpScreenState extends State<SelectOrderHelpScreen> {
? AppColors.greenICBg
: AppColors.subtitleText,
),
const SizedBox(width: 4),
const SizedBox(width: 2),
Text(
"AMC Protected",
"AMC ",
style: TextStyle(
fontSize: 11,
fontFamily: "PoppinsBold",
......@@ -427,9 +430,33 @@ class _SelectOrderHelpScreenState extends State<SelectOrderHelpScreen> {
: 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(
......@@ -445,16 +472,16 @@ class _SelectOrderHelpScreenState extends State<SelectOrderHelpScreen> {
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
SvgPicture.asset(
"assets/svg/tick2_ic.svg",
height: 14,
color:
warranty == "1"
? AppColors.warning
: AppColors.subtitleText,
? "assets/svg/tick2_ic.svg"
: "assets/svg/tick3_ic.svg",
),
const SizedBox(width: 4),
const SizedBox(width: 2),
Text(
"Warranty",
style: TextStyle(
......@@ -468,6 +495,15 @@ class _SelectOrderHelpScreenState extends State<SelectOrderHelpScreen> {
: 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,7 +1356,8 @@ class _HomeScreenState extends State<HomeScreen> {
builder: (context) {
return StatefulBuilder(
builder: (context, setState) {
return Padding(
return SafeArea(
child: Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
top: 16,
......@@ -1578,6 +1579,7 @@ class _HomeScreenState extends State<HomeScreen> {
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,7 +219,12 @@ class _TransactionScreenState extends State<TransactionListScreen> {
Provider.of<TransactionsProvider>(context, listen: false)
.fetchTransactions(widget.accId, widget.sessionId);
},
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
......@@ -427,6 +434,7 @@ class _TransactionScreenState extends State<TransactionListScreen> {
],
),
),
),
);
}
......@@ -663,7 +671,8 @@ class _TransactionScreenState extends State<TransactionListScreen> {
builder: (context) {
return StatefulBuilder(
builder: (context, setState) {
return Padding(
return SafeArea(
child: Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
top: 16,
......@@ -884,6 +893,7 @@ class _TransactionScreenState extends State<TransactionListScreen> {
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,19 +234,36 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
child: Scaffold(
backgroundColor: Color(0xFF4076FF),
appBar: AppBar(
backgroundColor: Color(0xFF4076FF),
body: CustomScrollView(
slivers: [
SliverAppBar(
automaticallyImplyLeading: false,
// elevation: 2.0,
title: SizedBox(
child: Row(
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: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(width: 8,),
InkResponse(
onTap: () {
HapticFeedback.selectionClick();
Navigator.pop(context, true);
},
child: SvgPicture.asset(
......@@ -276,13 +294,9 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
),
],
),
),
),
body: CustomScrollView(
slivers: [
SliverToBoxAdapter(
child: Container(
color: const Color(0xFF4076FF),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 12,
......@@ -561,7 +575,13 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
],
),
),
],
),
)
),
),
),
SliverFillRemaining(
hasScrollBody: false,
......@@ -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