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.
178 lines
7.0 KiB
Dart
178 lines
7.0 KiB
Dart
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
import 'package:doctor_app_flutter/models/list_gt_my_pationents_question_model.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/patients/profile/large_avatar.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
class DoctorReplyWidget extends StatefulWidget {
|
|
final ListGtMyPatientsQuestions reply;
|
|
bool isShowMore = false;
|
|
|
|
DoctorReplyWidget({Key key, this.reply});
|
|
|
|
@override
|
|
_DoctorReplyWidgetState createState() => _DoctorReplyWidgetState();
|
|
}
|
|
|
|
class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Stack(
|
|
children: <Widget>[
|
|
Container(
|
|
margin: EdgeInsets.symmetric(vertical: 10.0),
|
|
width: double.infinity,
|
|
decoration: BoxDecoration(
|
|
color: Hexcolor('#FFFFFF'),
|
|
borderRadius: BorderRadius.all(
|
|
Radius.circular(20.0),
|
|
),
|
|
),
|
|
child: Container(
|
|
margin: EdgeInsets.all(5),
|
|
child: Column(
|
|
children: <Widget>[
|
|
SizedBox(height: 18,),
|
|
Container(
|
|
margin: EdgeInsets.only(right: 15),
|
|
child: Row(
|
|
children: <Widget>[
|
|
SizedBox(width: 5,),
|
|
LargeAvatar(name: widget.reply.patientName,url: '',),
|
|
SizedBox(width: 15,),
|
|
Expanded(
|
|
child: Container(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
AppText(
|
|
widget.reply.patientName,
|
|
fontSize: 1.5 * SizeConfig.textMultiplier,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
SizedBox(
|
|
height: 5,
|
|
),
|
|
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
TranslationBase.of(context).fileNo,
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(left: 5),
|
|
child: AppText(
|
|
'${widget.reply.patientID}',
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 5,
|
|
),
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
TranslationBase.of(context).mobileNo,
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(left: 5),
|
|
child: AppText(
|
|
widget.reply.mobileNumber,
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 5,
|
|
),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Container(
|
|
width: 70,
|
|
height: 20,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(60.0)),
|
|
color: Colors.green[600]
|
|
),
|
|
child: Center(
|
|
child: AppText(
|
|
widget.reply.requestTime,
|
|
fontSize: 1.5 * SizeConfig.textMultiplier,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
|
|
child: AppText(
|
|
'${Helpers.getDate(widget.reply.requestDate)}',
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.black,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
|
|
],
|
|
),
|
|
),
|
|
)
|
|
|
|
],
|
|
),
|
|
),
|
|
|
|
!widget.isShowMore ? SizedBox(height: 18,) :
|
|
AnimatedContainer(
|
|
duration: Duration(milliseconds: 200),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Divider(color: Colors.grey),
|
|
SizedBox(height: 5,),
|
|
AppText(
|
|
widget.reply.remarks,
|
|
fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
//fontWeight: FontWeight.bold,
|
|
),
|
|
SizedBox(height: 10,)
|
|
],
|
|
),
|
|
),
|
|
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Positioned(
|
|
right: 5,
|
|
top: 20,
|
|
child: InkWell(
|
|
onTap: (){
|
|
setState(() {
|
|
widget.isShowMore = !widget.isShowMore;
|
|
});
|
|
},
|
|
child: Icon(widget.isShowMore? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down)),
|
|
)
|
|
],
|
|
|
|
);
|
|
}
|
|
}
|