Merge branch 'images_info' into 'diplomatic-quarter-live'

add images info

See merge request Cloud_Solution/diplomatic-quarter!143
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit 5d72ff7670

@ -1 +1 @@
da98d9f0c1f407e541c636e84847ac81
f4a819c27119d0f472892c1088ad1ca3

@ -1044,4 +1044,9 @@ const Map localizedValues = {
"ar": "إستبيان"
},
"info-signs": {
"en": "This service allows you to view all vital signs were performed in the Habib Medical Group, e.x (height, weight, body mass index, heart rate, etc.) as well shows some statistics charts.",
"ar": "خدمة المؤشرات الحيوية: هذه الخدمة تمكنك من الاطلاع على جميع المؤشرات الحيوية على سبيل المثال (الطول، الوزن، مؤشر كتلة الجسم، معدل نبضات القلب الخ..) التي تمت في مجموعة الحبيب الطبية وكذلك رسوم بيانية على مستوى المؤشر."
},
};

@ -0,0 +1,6 @@
class ImagesInfo {
final String imageAr;
final String imageEn;
ImagesInfo({this.imageAr, this.imageEn});
}

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/patient_lookup.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/vital_sign_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_item.dart';
@ -17,9 +18,13 @@ class VitalSignDetailsScreen extends StatelessWidget {
int appointmentNo;
int projectID;
VitalSignDetailsScreen({this.appointmentNo, this.projectID});
List<ImagesInfo> imagesInfo = List();
@override
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/ar/1.png'));
return BaseView<VitalSignViewModel>(
onModelReady: appointmentNo != null && projectID != null
? (model) => model.getPatientRadOrders(
@ -29,6 +34,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).vitalSigns,
baseViewModel: mode,
description: TranslationBase.of(context).infoSigns,
imagesInfo: imagesInfo,
body: mode.vitalSignResModelList.length > 0
? Container(
child: ListView(

@ -867,6 +867,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode];
String get sendCopyRad => localizedValues['send-copy'][locale.languageCode];
String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode];
String get infoSigns => localizedValues['info-signs'][locale.languageCode];
}

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -40,6 +41,7 @@ class AppScaffold extends StatelessWidget {
final String image;
final bool isShowDecPage;
final List<String> infoList;
final List<ImagesInfo> imagesInfo;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@ -57,7 +59,7 @@ class AppScaffold extends StatelessWidget {
this.isShowDecPage = true,
this.isBottomBar,
this.image,
this.infoList});
this.infoList, this.imagesInfo});
@override
Widget build(BuildContext context) {
@ -125,6 +127,7 @@ class AppScaffold extends StatelessWidget {
title: appBarTitle,
description: description,
infoList: infoList,
imagesInfo: imagesInfo,
)
: baseViewModel != null
? NetworkBaseView(

@ -1,4 +1,6 @@
import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/routes.dart';
@ -12,12 +14,22 @@ import 'package:provider/provider.dart';
import '../../splashPage.dart';
class NotAutPage extends StatelessWidget {
class NotAutPage extends StatefulWidget {
final String title;
final String description;
final List<String> infoList;
final List<ImagesInfo> imagesInfo;
NotAutPage({@required this.title, @required this.description, this.infoList, this.imagesInfo});
@override
_NotAutPageState createState() => _NotAutPageState();
}
class _NotAutPageState extends State<NotAutPage> {
int _current = 0;
NotAutPage({@required this.title, @required this.description, this.infoList});
@override
Widget build(BuildContext context) {
@ -29,7 +41,7 @@ class NotAutPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
title ?? 'Service',
widget.title ?? 'Service',
fontWeight: FontWeight.w800,
fontSize: 25,
bold: true,
@ -40,17 +52,17 @@ class NotAutPage extends StatelessWidget {
height: 12,
),
Texts(
description ?? 'Description',
widget.description ?? 'Description',
fontWeight: FontWeight.normal,
fontSize: 17,
),
if (infoList != null)
if (widget.infoList != null)
SizedBox(
height: 12,
),
if (infoList != null)
if (widget.infoList != null)
...List.generate(
infoList.length,
widget.infoList.length,
(index) => Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -69,7 +81,7 @@ class NotAutPage extends StatelessWidget {
),
),
SizedBox(width: 6,),
Expanded(child: Texts('${infoList[index]}'))
Expanded(child: Texts('${widget.infoList[index]}'))
],
),
SizedBox(height: 12,),
@ -80,6 +92,7 @@ class NotAutPage extends StatelessWidget {
SizedBox(
height: 22,
),
if(!projectViewModel.isInternetConnection)
Center(
child: SizedBox(
height: MediaQuery.of(context).size.height * 0.55,
@ -89,6 +102,24 @@ class NotAutPage extends StatelessWidget {
: 'assets/images/wifi-EN.png'),
),
),
if(projectViewModel.isInternetConnection && widget.imagesInfo!=null)
CarouselSlider(
items: widget.imagesInfo.map((image) {
return Builder(
builder: (BuildContext context){
return SizedBox(
width: MediaQuery.of(context).size.width * 0.50,
child: Image.network(projectViewModel.isArabic ? image.imageAr : image.imageEn));
},
);
}).toList(),
options: CarouselOptions(
height: MediaQuery.of(context).size.height * 0.55,
autoPlay: true,
viewportFraction: 1.0,
),
),
SizedBox(
height: 77,
),

Loading…
Cancel
Save