resolved fSize issue

faiz_dev
faizatflutter 1 week ago
parent c1971ef287
commit 28f8aec60f

@ -7,7 +7,6 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -21,6 +20,7 @@ import 'package:provider/provider.dart';
class TrackingScreen extends StatelessWidget {
final OrderTrackingState state = OrderTrackingState.ended;
@override
Widget build(BuildContext context) {
return Scaffold(
@ -51,6 +51,7 @@ class TrackingScreen extends StatelessWidget {
))),
);
}
animationSection() {
switch (state) {
case OrderTrackingState.waitingForCall:
@ -95,7 +96,9 @@ class TrackingScreen extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16,),
SizedBox(
height: 16,
),
CustomButton(
text: "Cancel Request".needTranslation,
onPressed: () async {},
@ -119,7 +122,7 @@ class TrackingScreen extends StatelessWidget {
backgroundColor: AppColors.lightRedButtonColor,
borderColor: Colors.transparent,
text: "Share Your Live Locatin on Whatsapp".needTranslation,
fontSize: 12.fSize,
fontSize: 12.f,
textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor,
onPressed: () {},
@ -131,11 +134,7 @@ class TrackingScreen extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 12.h,
children: [
dividerSection,
doctorSection(),
mapSection(context)
],
children: [dividerSection, doctorSection(), mapSection(context)],
);
case OrderTrackingState.ended:
default:
@ -170,17 +169,14 @@ class TrackingScreen extends StatelessWidget {
return Row(
spacing: 16.h,
children: [
Utils.buildImgWithNetwork(url: "", iconColor: Colors.transparent)
.circle(52.h),
Utils.buildImgWithNetwork(url: "", iconColor: Colors.transparent).circle(52.h),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Dr. John Doe".toText16(
color: AppColors.textColor, weight: FontWeight.w600),
"Dr. John Doe".toText16(color: AppColors.textColor, weight: FontWeight.w600),
SizedBox(height: 4.h),
"MBBS, MD - General Medicine".toText12(
color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
"MBBS, MD - General Medicine".toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
),
),
@ -204,23 +200,16 @@ class TrackingScreen extends StatelessWidget {
Widget mapForRequestedCoordinate(BuildContext context) {
// return SizedBox.shrink();
if (context.read<EmergencyServicesViewModel>().isGMSAvailable ||
Platform.isIOS)
if (context.read<EmergencyServicesViewModel>().isGMSAvailable || Platform.isIOS)
return GMSMap(
myLocationEnabled: false,
currentLocation:
context.read<EmergencyServicesViewModel>().getGMSLocation(),
onCameraMoved: (value) => context
.read<EmergencyServicesViewModel>()
.handleGMSMapCameraMoved(value));
currentLocation: context.read<EmergencyServicesViewModel>().getGMSLocation(),
onCameraMoved: (value) => context.read<EmergencyServicesViewModel>().handleGMSMapCameraMoved(value));
else
return HMSMap(
myLocationEnabled: false,
currentLocation:
context.read<EmergencyServicesViewModel>().getHMSLocation(),
onCameraMoved: (value) => context
.read<EmergencyServicesViewModel>()
.handleHMSMapCameraMoved(value));
currentLocation: context.read<EmergencyServicesViewModel>().getHMSLocation(),
onCameraMoved: (value) => context.read<EmergencyServicesViewModel>().handleHMSMapCameraMoved(value));
}
informationRegardingTrackingSection() {
@ -229,8 +218,7 @@ class TrackingScreen extends StatelessWidget {
children: [
currentStatus(),
SizedBox(height: 4.h),
"You will receive a call from HMG for confirmation ".toText12(
color: AppColors.greyTextColor, fontWeight: FontWeight.w500)
"You will receive a call from HMG for confirmation ".toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500)
],
);
}
@ -244,7 +232,7 @@ class TrackingScreen extends StatelessWidget {
TextSpan(
text: "Please wait for the call".needTranslation,
style: TextStyle(
fontSize: 21.fSize,
fontSize: 21.f,
fontWeight: FontWeight.w600,
color: AppColors.textColor,
),
@ -252,7 +240,7 @@ class TrackingScreen extends StatelessWidget {
TextSpan(
text: "...".needTranslation,
style: TextStyle(
fontSize: 21.fSize,
fontSize: 21.f,
fontWeight: FontWeight.w600,
color: AppColors.errorColor,
),
@ -265,7 +253,7 @@ class TrackingScreen extends StatelessWidget {
TextSpan(
text: "15:30".needTranslation,
style: TextStyle(
fontSize: 21.fSize,
fontSize: 21.f,
fontWeight: FontWeight.w600,
color: AppColors.textColor,
),
@ -273,7 +261,7 @@ class TrackingScreen extends StatelessWidget {
TextSpan(
text: " mins ".needTranslation,
style: TextStyle(
fontSize: 21.fSize,
fontSize: 21.f,
fontWeight: FontWeight.w600,
color: AppColors.errorColor,
),
@ -281,7 +269,7 @@ class TrackingScreen extends StatelessWidget {
TextSpan(
text: "to hospital".needTranslation,
style: TextStyle(
fontSize: 21.fSize,
fontSize: 21.f,
fontWeight: FontWeight.w600,
color: AppColors.textColor,
),
@ -290,9 +278,7 @@ class TrackingScreen extends StatelessWidget {
);
case OrderTrackingState.ended:
default:
return "Arrived"
.needTranslation
.toText21(color: AppColors.textColor, weight: FontWeight.w600);
return "Arrived".needTranslation.toText21(color: AppColors.textColor, weight: FontWeight.w600);
}
}
@ -308,19 +294,15 @@ class TrackingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8.h,
children: [
"Req ID:1234567890"
.toText16(color: AppColors.textColor, weight: FontWeight.w600),
"Req ID:1234567890".toText16(color: AppColors.textColor, weight: FontWeight.w600),
Row(
spacing: 8.h,
children: [
Chip("location name".needTranslation, AppAssets.location_pickup,
AppColors.blackBgColor),
Chip("hotel name ".needTranslation, AppAssets.hospital,
AppColors.blackBgColor),
Chip("location name".needTranslation, AppAssets.location_pickup, AppColors.blackBgColor),
Chip("hotel name ".needTranslation, AppAssets.hospital, AppColors.blackBgColor),
],
),
Chip("hotel name ".needTranslation, AppAssets.hospital,
AppColors.blackBgColor),
Chip("hotel name ".needTranslation, AppAssets.hospital, AppColors.blackBgColor),
],
),
);
@ -350,11 +332,8 @@ class TrackingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4.h,
children: [
"Contact Rapid Response Team (RRT)".needTranslation.toText14(
color: AppColors.textColor, weight: FontWeight.w600),
"1223456789".needTranslation.toText12(
color: AppColors.primaryRedColor,
fontWeight: FontWeight.w500),
"Contact Rapid Response Team (RRT)".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w600),
"1223456789".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
SizedBox(height: 8.h),
],
),
@ -390,18 +369,14 @@ class TrackingScreen extends StatelessWidget {
getTitle(OrderTrackingState state) {
switch (state) {
case OrderTrackingState.waitingForCall:
return "Confirmation Call".needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w600);
return "Confirmation Call".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.dispactched:
return "Pickup Up from Home".needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w600);
return "Pickup Up from Home".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.returning:
return " On The Way To Hospital".needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w600);
return " On The Way To Hospital".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.ended:
default:
return "Arrived at Hospital".needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w600);
return "Arrived at Hospital".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
}
}
@ -409,8 +384,7 @@ class TrackingScreen extends StatelessWidget {
return SizedBox(
height: 170.h,
width: double.infinity,
child: ClipRRect(
borderRadius: BorderRadius.circular(20.h),child: mapForRequestedCoordinate(context)),
child: ClipRRect(borderRadius: BorderRadius.circular(20.h), child: mapForRequestedCoordinate(context)),
);
}
}

Loading…
Cancel
Save