Commit 9ff648e8 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

17-11-2025 tex scaler

parent a3215481
...@@ -44,18 +44,24 @@ android { ...@@ -44,18 +44,24 @@ android {
versionName = flutter.versionName versionName = flutter.versionName
} }
signingConfigs { signingConfigs {
// create("release") { create("release") {
// keyAlias = keystoreProperties["keyAlias"] as String keyAlias = keystoreProperties["keyAlias"] as String
// keyPassword = keystoreProperties["keyPassword"] as String keyPassword = keystoreProperties["keyPassword"] as String
// storeFile = keystoreProperties["storeFile"]?.let { file(it) } storeFile = keystoreProperties["storeFile"]?.let { file(it) }
// storePassword = keystoreProperties["storePassword"] as String storePassword = keystoreProperties["storePassword"] as String
// } }
} }
buildTypes { buildTypes {
release { release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
// TODO: Add your own signing config for the release build. // TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works. // Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug") signingConfig = signingConfigs.getByName("release")
} }
} }
} }
......
-keep class androidx.window.extensions.** { *; }
-keep interface androidx.window.extensions.** { *; }
-keep class androidx.window.sidecar.** { *; }
-keep interface androidx.window.sidecar.** { *; }
-keep class androidx.window.** { *; }
-dontwarn androidx.window.**
-keep class androidx.window.layout.adapter.extensions.** { *; }
-keep class androidx.window.layout.adapter.sidecar.** { *; }
\ No newline at end of file
...@@ -15,8 +15,6 @@ import 'package:provider/provider.dart'; ...@@ -15,8 +15,6 @@ import 'package:provider/provider.dart';
import '../Models/generatorDetailsResponse.dart'; import '../Models/generatorDetailsResponse.dart';
import '../Utility/AppColors.dart'; import '../Utility/AppColors.dart';
class Generatordetailsscreen extends StatefulWidget { class Generatordetailsscreen extends StatefulWidget {
final accId; final accId;
final sessionId; final sessionId;
...@@ -59,12 +57,12 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -59,12 +57,12 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
final isLoading = detailsProvider.isLoading; final isLoading = detailsProvider.isLoading;
final error = detailsProvider.errorMessage; final error = detailsProvider.errorMessage;
final data = detailsProvider.detailsResponse; final data = detailsProvider.detailsResponse;
final genDetails = data?.genDetails??GenDetails(); final genDetails = data?.genDetails ?? GenDetails();
final locDetails = data?.locationDetails??LocationDetails(); final locDetails = data?.locationDetails ?? LocationDetails();
final quotationsList = data?.quotations??[]; final quotationsList = data?.quotations ?? [];
final scheduleList = data?.schedule ?? []; final scheduleList = data?.schedule ?? [];
final amcQuotationsList = data?.amcQuotations??[]; final amcQuotationsList = data?.amcQuotations ?? [];
final complaintList = data?.complaints??[]; final complaintList = data?.complaints ?? [];
List<String> sectionTitles = ["Generator Details", "Location Details"]; List<String> sectionTitles = ["Generator Details", "Location Details"];
List<String> headings1 = [ List<String> headings1 = [
...@@ -164,7 +162,8 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -164,7 +162,8 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
await Future.delayed(const Duration(milliseconds: 300)); await Future.delayed(const Duration(milliseconds: 300));
// Retry fetching data // Retry fetching data
final detailsProvider = Provider.of<Generatordetailsprovider>( final detailsProvider =
Provider.of<Generatordetailsprovider>(
context, context,
listen: false, listen: false,
); );
...@@ -234,25 +233,24 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -234,25 +233,24 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
child: Scaffold( child: Scaffold(
backgroundColor: Color(0xFF4076FF), backgroundColor: Color(0xFF4076FF),
body: CustomScrollView( body: CustomScrollView(
slivers: [ slivers: [
SliverAppBar( SliverAppBar(
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
stretch: true, stretch: true,
onStretchTrigger: () async { onStretchTrigger: () async {},
},
stretchTriggerOffset: 300.0, stretchTriggerOffset: 300.0,
backgroundColor: Color(0xFF4076FF), backgroundColor: Color(0xFF4076FF),
expandedHeight: detailsProvider.showMoreDetails?screenHeight*0.62:screenHeight*0.26, expandedHeight: screenHeight * 0.26,
flexibleSpace: FlexibleSpaceBar( flexibleSpace: FlexibleSpaceBar(
stretchModes: const [ stretchModes: const [
StretchMode.zoomBackground, StretchMode.zoomBackground,
StretchMode.blurBackground, StretchMode.blurBackground,
], ],
background: Container( background: Container(
decoration: const BoxDecoration(gradient: AppColors.commonAppBarGradient), decoration: const BoxDecoration(
gradient: AppColors.commonAppBarGradient,
),
child: SafeArea( child: SafeArea(
child: Column( child: Column(
children: [ children: [
...@@ -260,7 +258,7 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -260,7 +258,7 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(width: 8,), SizedBox(width: 8),
InkResponse( InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick(); HapticFeedback.selectionClick();
...@@ -295,23 +293,26 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -295,23 +293,26 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
], ],
), ),
SizedBox(height: 10,), SizedBox(height: 10),
Container( Container(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
vertical: 12, vertical: 5,
), ),
child: Column( child: Column(
children: [ children: [
// Product Info Row // Product Info Row
Padding( Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0), padding: const EdgeInsets.symmetric(
vertical: 4.0,
),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
flex: 5, flex: 5,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
RichText( RichText(
text: TextSpan( text: TextSpan(
...@@ -322,15 +323,21 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -322,15 +323,21 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
fontSize: 13, fontSize: 13,
), ),
children: [ children: [
TextSpan(text: "#${data.hashId!}"),
TextSpan( TextSpan(
text: " | Engine: ${data.engine!}", text: "#${data.hashId!}",
),
TextSpan(
text:
" | Engine: ${data.engine!}",
), ),
], ],
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.symmetric(vertical: 3.0), padding:
const EdgeInsets.symmetric(
vertical: 3.0,
),
child: Text( child: Text(
data.prodName!, data.prodName!,
maxLines: 2, maxLines: 2,
...@@ -342,53 +349,72 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -342,53 +349,72 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
), ),
), ),
if (data.amc != "0") ...[ if (data.amc != "0") ...[
SizedBox(height: 5,), SizedBox(height: 5),
Container( Container(
padding: const EdgeInsets.symmetric( padding:
const EdgeInsets.symmetric(
horizontal: 8, horizontal: 8,
vertical: 4, vertical: 4,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: gradient:
data.amc == "1" data.amc == "1"
? AppColors.greenStripGradient ? AppColors
: AppColors.fadeGradient, .greenStripGradient
borderRadius: BorderRadius.circular(12), : AppColors
.fadeGradient,
borderRadius:
BorderRadius.circular(
12,
),
), ),
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize:
MainAxisSize.min,
children: [ children: [
SvgPicture.asset( SvgPicture.asset(
"assets/svg/tick_ic.svg", "assets/svg/tick_ic.svg",
height: 15, height: 15,
color: color:
data.amc == "1" data.amc == "1"
? Color(0xFF00BC56) ? Color(
: AppColors.subtitleText, 0xFF00BC56,
)
: AppColors
.subtitleText,
), ),
const SizedBox(width: 4), const SizedBox(width: 4),
Text( Text(
"AMC ", "AMC ",
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontFamily: "HemiHead", fontFamily:
fontStyle: FontStyle.italic, "HemiHead",
fontStyle:
FontStyle.italic,
color: color:
data.amc == "1" data.amc == "1"
? Color(0xFF00BC56) ? Color(
: AppColors.subtitleText, 0xFF00BC56,
)
: AppColors
.subtitleText,
), ),
), ),
Text( Text(
"PROTECTED", "PROTECTED",
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontFamily: "HemiHead", fontFamily:
fontStyle: FontStyle.italic, "HemiHead",
fontStyle:
FontStyle.italic,
color: color:
data.amc == "1" data.amc == "1"
? AppColors.normalText ? AppColors
: AppColors.subtitleText, .normalText
: AppColors
.subtitleText,
), ),
), ),
const SizedBox(width: 4), const SizedBox(width: 4),
...@@ -403,48 +429,64 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -403,48 +429,64 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
), ),
], ],
if (data.warranty != "0") ...[ if (data.warranty != "0") ...[
SizedBox(height: 5,), SizedBox(height: 5),
Row( Row(
mainAxisSize: MainAxisSize.min, mainAxisSize:
MainAxisSize.min,
children: [ children: [
Container( Container(
padding: const EdgeInsets.symmetric( padding:
const EdgeInsets.symmetric(
horizontal: 8, horizontal: 8,
vertical: 4, vertical: 4,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: gradient:
data.warranty == "1" data.warranty == "1"
? AppColors.yellowStripGradient ? AppColors
: AppColors.fadeGradient, .yellowStripGradient
borderRadius: BorderRadius.circular(12), : AppColors
.fadeGradient,
borderRadius:
BorderRadius.circular(
12,
),
), ),
child: Row( child: Row(
children: [ children: [
SvgPicture.asset( SvgPicture.asset(
data.warranty == "1" data.warranty == "1"
? "assets/svg/tick2_ic.svg": ? "assets/svg/tick2_ic.svg"
"assets/svg/tick3_ic.svg", : "assets/svg/tick3_ic.svg",
height: 15, height: 15,
), ),
const SizedBox(width: 6), const SizedBox(
width: 6,
),
Text( Text(
"WARRANTY", "WARRANTY",
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontFamily: "HemiHead", fontFamily:
fontStyle: FontStyle.italic, "HemiHead",
fontStyle:
FontStyle
.italic,
color: color:
data.warranty == "1" data.warranty ==
? AppColors.normalText "1"
? AppColors
.normalText
: AppColors : AppColors
.nearDarkText, .nearDarkText,
), ),
), ),
SizedBox(width: 6), SizedBox(width: 6),
if (data.warranty == "2") if (data.warranty ==
"2")
const Icon( const Icon(
Icons.error_outline, Icons
.error_outline,
color: Colors.red, color: Colors.red,
size: 15, size: 15,
), ),
...@@ -469,6 +511,24 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -469,6 +511,24 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
), ),
// Show More Details // Show More Details
],
),
),
],
),
),
),
),
),
SliverToBoxAdapter(
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 0,
),
child: Column(
children: [
if (detailsProvider.showMoreDetails) ...[ if (detailsProvider.showMoreDetails) ...[
const Divider(color: Colors.white), const Divider(color: Colors.white),
...List.generate(headings.length, (index) { ...List.generate(headings.length, (index) {
...@@ -517,11 +577,12 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -517,11 +577,12 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
vertical: 3, vertical: 3,
), ),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
sectionItems[i]??"-", sectionItems[i] ?? "-",
style: const TextStyle( style: const TextStyle(
fontSize: 14, fontSize: 14,
color: Color(0xFF48F3FF), color: Color(0xFF48F3FF),
...@@ -530,9 +591,10 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -530,9 +591,10 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
), ),
Expanded( Expanded(
child: Text( child: Text(
sectionSubItems[i]??"-", sectionSubItems[i] ?? "-",
maxLines: 3, maxLines: 3,
overflow: TextOverflow.ellipsis, overflow:
TextOverflow.ellipsis,
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: const TextStyle( style: const TextStyle(
fontSize: 14, fontSize: 14,
...@@ -605,14 +667,8 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -605,14 +667,8 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
], ],
), ),
), ),
],
),
)
),
),
), ),
SliverFillRemaining( SliverFillRemaining(
hasScrollBody: false, hasScrollBody: false,
child: Container( child: Container(
...@@ -657,7 +713,13 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -657,7 +713,13 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute(builder: (context) => SelectOrderHelpScreen(accId: widget.accId, sessionId: widget.sessionId)) MaterialPageRoute(
builder:
(context) => SelectOrderHelpScreen(
accId: widget.accId,
sessionId: widget.sessionId,
),
),
); );
}, },
child: Padding( child: Padding(
...@@ -673,10 +735,12 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -673,10 +735,12 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
), ),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: const [ children: const [
Text( Text(
'Facing Issues?', 'Facing Issues?',
...@@ -842,9 +906,10 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -842,9 +906,10 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
: Color(0xFF777777), : Color(0xFF777777),
), ),
), ),
///AMC Warranty ///AMC Warranty
if (data.amc != "0") ...[ if (data.amc != "0") ...[
SizedBox(height: 5,), SizedBox(height: 5),
Container( Container(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 5, horizontal: 5,
...@@ -907,7 +972,7 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -907,7 +972,7 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
), ),
], ],
if (data.warranty != "0") ...[ if (data.warranty != "0") ...[
SizedBox(height: 5,), SizedBox(height: 5),
Container( Container(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 8, horizontal: 8,
...@@ -927,8 +992,8 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -927,8 +992,8 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
children: [ children: [
SvgPicture.asset( SvgPicture.asset(
data.warranty == "1" data.warranty == "1"
? "assets/svg/tick2_ic.svg": ? "assets/svg/tick2_ic.svg"
"assets/svg/tick3_ic.svg", : "assets/svg/tick3_ic.svg",
height: 15, height: 15,
), ),
const SizedBox(width: 6), const SizedBox(width: 6),
...@@ -948,7 +1013,6 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> { ...@@ -948,7 +1013,6 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
SizedBox(width: 6), SizedBox(width: 6),
if (data.warranty == "2") if (data.warranty == "2")
const Icon( const Icon(
Icons.error_outline, Icons.error_outline,
color: Colors.red, color: Colors.red,
size: 15, size: 15,
......
...@@ -23,6 +23,7 @@ class MyApp extends StatelessWidget { ...@@ -23,6 +23,7 @@ class MyApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MultiProvider( return MultiProvider(
providers: [ providers: [
ChangeNotifierProvider(create: (_) => AuthProvider()), ChangeNotifierProvider(create: (_) => AuthProvider()),
...@@ -46,6 +47,14 @@ class MyApp extends StatelessWidget { ...@@ -46,6 +47,14 @@ class MyApp extends StatelessWidget {
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
home: SplashScreen(), home: SplashScreen(),
builder: (context, child) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaler: const TextScaler.linear(1.0),
),
child: child!,
);
},
); );
}, },
), ),
......
...@@ -141,10 +141,10 @@ packages: ...@@ -141,10 +141,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: fake_async name: fake_async
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.3" version: "1.3.2"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
...@@ -404,26 +404,26 @@ packages: ...@@ -404,26 +404,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker name: leak_tracker
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "11.0.2" version: "10.0.8"
leak_tracker_flutter_testing: leak_tracker_flutter_testing:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker_flutter_testing name: leak_tracker_flutter_testing
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.10" version: "3.0.9"
leak_tracker_testing: leak_tracker_testing:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker_testing name: leak_tracker_testing
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.2" version: "3.0.1"
lints: lints:
dependency: transitive dependency: transitive
description: description:
...@@ -809,10 +809,10 @@ packages: ...@@ -809,10 +809,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.6" version: "0.7.4"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
...@@ -921,10 +921,10 @@ packages: ...@@ -921,10 +921,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vector_math name: vector_math
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.0" version: "2.1.4"
vm_service: vm_service:
dependency: transitive dependency: transitive
description: description:
...@@ -974,5 +974,5 @@ packages: ...@@ -974,5 +974,5 @@ packages:
source: hosted source: hosted
version: "6.5.0" version: "6.5.0"
sdks: sdks:
dart: ">=3.8.0-0 <4.0.0" dart: ">=3.7.2 <4.0.0"
flutter: ">=3.29.0" flutter: ">=3.29.0"
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