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

17-11-2025 tex scaler

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