You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PatientApp-KKUMC/lib/pages/InPatientServices/meal_plan.dart

120 lines
3.9 KiB
Dart

import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.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_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MealPlanPage extends StatefulWidget {
const MealPlanPage({Key key}) : super(key: key);
@override
State<MealPlanPage> createState() => _MealPlanPageState();
}
class _MealPlanPageState extends State<MealPlanPage> {
ProjectViewModel projectViewModel;
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
showNewAppBarTitle: true,
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).mealPlanTitle,
body: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(21.0),
child: Column(
children: [
Container(
decoration: containerRadius(Colors.white, 12),
child: AppExpandableNotifier(
title: "Breakfast TAT: 10:00 AM",
isTitleSingleLine: false,
widgetColor: Colors.transparent,
bodyWidget: Column(
children: [
getDivider(),
Container(
height: 200.0,
),
],
),
),
),
mHeight(21),
Container(
decoration: containerRadius(Colors.white, 12),
child: AppExpandableNotifier(
title: "Lunch TAT: 04:00 PM",
isTitleSingleLine: false,
widgetColor: Colors.transparent,
bodyWidget: Column(
children: [
getDivider(),
Container(
height: 200.0,
),
],
),
),
),
mHeight(21),
Container(
decoration: containerRadius(Colors.white, 12),
child: AppExpandableNotifier(
title: "Dinner TAT: 12:00 AM",
isTitleSingleLine: false,
widgetColor: Colors.transparent,
bodyWidget: Column(
children: [
getDivider(),
Container(
height: 200.0,
),
],
),
),
),
],
),
),
),
);
}
Widget getDivider() {
return Padding(
padding: EdgeInsets.only(left: 15, right: 15),
child: Divider(
height: 1.5,
thickness: 2.0,
color: Colors.black,
),
);
}
void getAdmittedPatientDetails() {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getAdmittedPatientDetails(projectViewModel.user.patientID, projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo, 0, 0, 0, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
// AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully);
Navigator.of(context).pop();
}).catchError((err) {
print(err);
});
}
}