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.
76 lines
2.9 KiB
Dart
76 lines
2.9 KiB
Dart
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
import 'package:doctor_app_flutter/screens/doctor/doctor_repaly_chat.dart';
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
import 'package:doctor_app_flutter/widgets/doctor/doctor_reply_widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
/*
|
|
*@author: Mohammad Aljammal
|
|
*@Date:28/4/2020
|
|
*@param:
|
|
*@return:
|
|
*@desc: Doctor Reply Screen display data from GtMyPatientsQuestions service
|
|
*/
|
|
class DoctorReplyScreen extends StatelessWidget {
|
|
|
|
final Function changeCurrentTab;
|
|
|
|
const DoctorReplyScreen({Key key, this.changeCurrentTab}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BaseView<DoctorReplayViewModel>(
|
|
onModelReady: (model) {
|
|
model.getDoctorReply();
|
|
},
|
|
builder: (_, model, w) => WillPopScope(
|
|
onWillPop: ()async{
|
|
changeCurrentTab();
|
|
return false;
|
|
},
|
|
child: AppScaffold(
|
|
baseViewModel: model,
|
|
appBarTitle: TranslationBase.of(context).replay2,
|
|
isShowAppBar: false,
|
|
body: model.listDoctorWorkingHoursTable.isEmpty
|
|
? DrAppEmbeddedError(error: TranslationBase.of(context).noItem)
|
|
: Container(
|
|
padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
|
|
child: ListView(
|
|
children: [
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children:
|
|
model.listDoctorWorkingHoursTable.map((reply) {
|
|
return InkWell(
|
|
onTap: reply.status != 2
|
|
? null
|
|
: () {
|
|
// Navigator.push(
|
|
// context,
|
|
// MaterialPageRoute(
|
|
// builder: (BuildContext context) =>
|
|
// DoctorReplayChat(
|
|
// reply: reply,
|
|
// previousModel: model,
|
|
// )));
|
|
},
|
|
child: DoctorReplyWidget(reply: reply),
|
|
);
|
|
}).toList(),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
|
|
}
|
|
}
|