Merge remote-tracking branch 'origin/development_v3.3' into dev_v3.13.6
# Conflicts: # lib/pages/login/login.dart # lib/pages/medical/medical_profile_page_new.dart # lib/services/clinic_services/get_clinic_service.dart # lib/uitl/utils.dart # lib/widgets/dialogs/radio_selection_dialog.dartdev_v3.13.6_BLE_Faiz
commit
8441a0ef00
@ -0,0 +1,77 @@
|
||||
class GetDentalInstructionsResponseModel {
|
||||
List<Data> data;
|
||||
dynamic message;
|
||||
int status;
|
||||
|
||||
GetDentalInstructionsResponseModel({this.data, this.message, this.status});
|
||||
|
||||
GetDentalInstructionsResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
if (json['Data'] != null) {
|
||||
data = <Data>[];
|
||||
json['Data'].forEach((v) {
|
||||
data.add(new Data.fromJson(v));
|
||||
});
|
||||
}
|
||||
message = json['message'];
|
||||
status = json['status'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.data != null) {
|
||||
data['Data'] = this.data.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['message'] = this.message;
|
||||
data['status'] = this.status;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
String createdOn;
|
||||
String mobileNo;
|
||||
int patientId;
|
||||
int procedureId;
|
||||
int projectId;
|
||||
String setupId;
|
||||
String smsContent;
|
||||
int sourceReferenceNo;
|
||||
String sourceType;
|
||||
|
||||
Data(
|
||||
{this.createdOn,
|
||||
this.mobileNo,
|
||||
this.patientId,
|
||||
this.procedureId,
|
||||
this.projectId,
|
||||
this.setupId,
|
||||
this.smsContent,
|
||||
this.sourceReferenceNo,
|
||||
this.sourceType});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
createdOn = json['createdOn'];
|
||||
mobileNo = json['mobileNo'];
|
||||
patientId = json['patientId'];
|
||||
procedureId = json['procedureId'];
|
||||
projectId = json['projectId'];
|
||||
setupId = json['setupId'];
|
||||
smsContent = json['smsContent'];
|
||||
sourceReferenceNo = json['sourceReferenceNo'];
|
||||
sourceType = json['sourceType'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['createdOn'] = this.createdOn;
|
||||
data['mobileNo'] = this.mobileNo;
|
||||
data['patientId'] = this.patientId;
|
||||
data['procedureId'] = this.procedureId;
|
||||
data['projectId'] = this.projectId;
|
||||
data['setupId'] = this.setupId;
|
||||
data['smsContent'] = this.smsContent;
|
||||
data['sourceReferenceNo'] = this.sourceReferenceNo;
|
||||
data['sourceType'] = this.sourceType;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
import 'package:diplomaticquarterapp/models/get_dental_instructions_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
|
||||
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DentalInstructionsPage extends StatefulWidget {
|
||||
const DentalInstructionsPage();
|
||||
|
||||
@override
|
||||
State<DentalInstructionsPage> createState() => _DentalInstructionsPageState();
|
||||
}
|
||||
|
||||
class _DentalInstructionsPageState extends State<DentalInstructionsPage> {
|
||||
GetDentalInstructionsResponseModel getDentalInstructionsResponseModel;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
getDentalInstructions();
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
appBarTitle: TranslationBase.of(context).myinstructions,
|
||||
isShowAppBar: true,
|
||||
showNewAppBar: true,
|
||||
showNewAppBarTitle: true,
|
||||
isShowDecPage: false,
|
||||
backgroundColor: CustomColors.appBackgroudGrey2Color,
|
||||
body: Container(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
children: [
|
||||
getDentalInstructionsResponseModel != null && getDentalInstructionsResponseModel.data.isNotEmpty
|
||||
? ListView.builder(
|
||||
itemCount: getDentalInstructionsResponseModel.data.length,
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 16.0, bottom: 16.0),
|
||||
child: Text(
|
||||
getDentalInstructionsResponseModel.data[index].smsContent,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
letterSpacing: -0.56,
|
||||
color: Color(0xff575757),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
)
|
||||
: Center(child: getNoDataWidget(context)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
getDentalInstructions() {
|
||||
GifLoaderDialogUtils.showMyDialog(context);
|
||||
ClinicListService service = new ClinicListService();
|
||||
service.getDentalInstructions().then((res) {
|
||||
print(res["ProcedureNotificationResponse"]);
|
||||
getDentalInstructionsResponseModel = GetDentalInstructionsResponseModel.fromJson(res["ProcedureNotificationResponse"]);
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
setState(() {});
|
||||
}).catchError((err) {
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
print(err);
|
||||
AppToast.showErrorToast(message: err.toString());
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue