dev_v3.13.6_CS_V2
Haroon Amjad 1 year ago
parent 84c718656b
commit 48a0e0d949

@ -31,8 +31,8 @@ class ProjectViewModel extends BaseViewModel {
} }
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
Locale _appLocale = Locale('ar'); Locale _appLocale = Locale('en');
String currentLanguage = 'ar'; String currentLanguage = 'en';
bool _isArabic = true; bool _isArabic = true;
bool isInternetConnection = true; bool isInternetConnection = true;
bool isLoading = false; bool isLoading = false;

@ -164,7 +164,8 @@ class _MyApp extends State<MyApp> {
navigatorKey: locator<NavigationService>().navigatorKey, navigatorKey: locator<NavigationService>().navigatorKey,
showSemanticsDebugger: false, showSemanticsDebugger: false,
title: 'Dr. AlHabib', title: 'Dr. AlHabib',
locale: projectProvider.appLocal, // locale: projectProvider.appLocal,
locale: Locale('en'),
localizationsDelegates: [ localizationsDelegates: [
TranslationBaseDelegate(), TranslationBaseDelegate(),
GlobalMaterialLocalizations.delegate, GlobalMaterialLocalizations.delegate,

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/vital_signs/GenderSelector.dart';
import 'package:diplomaticquarterapp/vital_signs/vital_sign.dart'; import 'package:diplomaticquarterapp/vital_signs/vital_sign.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -79,18 +80,20 @@ class _HomePageState2 extends State<HomePage2> {
], ],
), ),
), ),
child: Padding( child: Stack(
children: [
SvgPicture.asset("assets/images/HealthSnap/background.svg", height: MediaQuery.sizeOf(context).height,width: MediaQuery.sizeOf(context).width),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
SvgPicture.asset( SvgPicture.asset(
'assets/images/new/cloud_logo.svg', 'assets/images/new/cloud_logo.svg',
width: 80, width: 80,
height: 80, height: 80,
), ),
// mHeight(48.0), mHeight(96.0),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -102,60 +105,25 @@ class _HomePageState2 extends State<HomePage2> {
"HealthSnap", "HealthSnap",
style: TextStyle(color: Color(0XFF2B353E), fontSize: 26, letterSpacing: 1.28, fontWeight: FontWeight.bold), style: TextStyle(color: Color(0XFF2B353E), fontSize: 26, letterSpacing: 1.28, fontWeight: FontWeight.bold),
), ),
mHeight(8.0), mHeight(84.0),
Container( Row(
padding: EdgeInsets.only(left: 6, right: 6), mainAxisAlignment: MainAxisAlignment.center,
child: Row(
children: [
Flexible(
child: Row(
children: [ children: [
Radio( GenderSelector(vectorUrl: 'assets/images/HealthSnap/female.svg', isSelected: radioValue == "female", onTap: (){
value: TranslationBase.of(context).male,
groupValue: radioValue,
onChanged: (v) {
setState(() { setState(() {
radioValue = v!; radioValue = "female";
}); });
}, }),
), mWidth(24),
Text( GenderSelector(vectorUrl: 'assets/images/HealthSnap/male.svg', isSelected: radioValue == "male", onTap: (){
TranslationBase.of(context).male,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
),
Flexible(
child: Row(
children: [
Radio(
value: TranslationBase.of(context).female,
groupValue: radioValue,
onChanged: (v) {
setState(() { setState(() {
radioValue = v!; radioValue = "male";
}); });
}, })
),
Text(
TranslationBase.of(context).female,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
], ],
), ),
), mHeight(64.0),
],
),
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -181,7 +149,7 @@ class _HomePageState2 extends State<HomePage2> {
: () { : () {
final UserInfo userInfo = UserInfo( final UserInfo userInfo = UserInfo(
age: double.parse(ageTextController.text), age: double.parse(ageTextController.text),
gender: radioValue == TranslationBase.of(context).male ? Gender.male : Gender.female, gender: radioValue == "male" ? Gender.male : Gender.female,
weight: double.parse(weightTextController.text), weight: double.parse(weightTextController.text),
// kg, Optional // kg, Optional
height: double.parse(heightTextController.text), height: double.parse(heightTextController.text),
@ -219,6 +187,8 @@ class _HomePageState2 extends State<HomePage2> {
], ],
), ),
), ),
],
),
), ),
), ),
), ),

@ -0,0 +1,42 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class GenderSelector extends StatelessWidget{
final String vectorUrl;
final bool isSelected;
final VoidCallback onTap;
const GenderSelector({super.key, required this.vectorUrl, required this.isSelected, required this.onTap});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: (){
onTap();
},
behavior: HitTestBehavior.opaque,
child: SizedBox(
height: 120,width: 120,
child: Material(
shape: RoundedRectangleBorder(
side: isSelected?BorderSide(width: 5, color: CustomColors.accentColor): BorderSide.none,
borderRadius: BorderRadius.circular(100),
),
child: Material(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100),
),
child: Padding(
padding: const EdgeInsets.all(22.0),
child: SvgPicture.asset(vectorUrl, ),
),
),
),
),
);
}
}

@ -49,12 +49,9 @@ class ResultScreen extends StatelessWidget {
), ),
), ),
], ],
body: Padding( body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(15), padding: const EdgeInsets.all(15),
child: ListView(
shrinkWrap: true,
children: [
Expanded(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
if (_holisticAnalysis != null && _holisticAnalysis?.generalWellness != null) if (_holisticAnalysis != null && _holisticAnalysis?.generalWellness != null)
VitalSignWidget( VitalSignWidget(
@ -299,8 +296,6 @@ class ResultScreen extends StatelessWidget {
// healthResult?.scanParameters?.signalQuality)), // healthResult?.scanParameters?.signalQuality)),
]), ]),
), ),
],
),
), ),
); );
} }

@ -226,7 +226,7 @@ flutter:
- assets/payment_options/ - assets/payment_options/
- assets/images/new/ - assets/images/new/
- assets/images/new/HealthSnap/ - assets/images/HealthSnap/
- assets/images/new/zoom/ - assets/images/new/zoom/
- assets/images/new/inpatient/ - assets/images/new/inpatient/
- assets/images/new/mass/ - assets/images/new/mass/

Loading…
Cancel
Save