|
|
|
|
@ -7,11 +7,11 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/TextFields.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
@ -24,7 +24,7 @@ class DoctorReplayChat extends StatefulWidget {
|
|
|
|
|
final DoctorReplayViewModel previousModel;
|
|
|
|
|
bool showMsgBox = false;
|
|
|
|
|
DoctorReplayChat(
|
|
|
|
|
{Key? key, this.reply, this.previousModel,
|
|
|
|
|
{Key? key, required this.reply, required this.previousModel,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -37,8 +37,8 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
if(widget.reply.doctorResponse.isNotEmpty){
|
|
|
|
|
msgController.text = widget.reply.doctorResponse;
|
|
|
|
|
if(widget.reply.doctorResponse!.isNotEmpty){
|
|
|
|
|
msgController.text = widget.reply.doctorResponse!;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
widget.showMsgBox = true;
|
|
|
|
|
@ -172,7 +172,7 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 0),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
launch("tel://" +widget.reply.mobileNumber);
|
|
|
|
|
launch("tel://" +widget.reply.mobileNumber!);
|
|
|
|
|
},
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.phone,
|
|
|
|
|
@ -194,7 +194,7 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
|
|
|
|
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
widget.reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(widget.reply.createdOn)):AppDateUtils.getHour(DateTime.now()),
|
|
|
|
|
widget.reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(widget.reply.createdOn!)):AppDateUtils.getHour(DateTime.now()),
|
|
|
|
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
@ -236,7 +236,7 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
|
|
|
|
|
SizedBox(height: 30,),
|
|
|
|
|
|
|
|
|
|
SizedBox(height: 30,),
|
|
|
|
|
if(widget.reply.doctorResponse != null && widget.reply.doctorResponse.isNotEmpty)
|
|
|
|
|
if(widget.reply.doctorResponse != null && widget.reply.doctorResponse!.isNotEmpty)
|
|
|
|
|
Align(
|
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
|
child: Container(
|
|
|
|
|
@ -269,7 +269,7 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
|
|
|
|
|
width: 50,
|
|
|
|
|
height: 50,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
widget.previousModel.doctorProfile.gender == 0
|
|
|
|
|
widget.previousModel.doctorProfile!.gender == 0
|
|
|
|
|
? 'assets/images/male_avatar.png'
|
|
|
|
|
: 'assets/images/female_avatar.png',
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
@ -280,7 +280,7 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.35,
|
|
|
|
|
child: AppText(
|
|
|
|
|
widget.previousModel.doctorProfile.doctorName,
|
|
|
|
|
widget.previousModel.doctorProfile!.doctorName,
|
|
|
|
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
color: Color(0xFF2B353E),
|
|
|
|
|
|