fix replay design

merge-requests/431/head
Elham Rababah 4 years ago
parent 5f482663dd
commit d8cce04b8a

@ -43,12 +43,11 @@ class DoctorReplayChat extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
height: 130, height: 115,
child: Container( child: Container(
color: Colors.red,
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 10, right: 10), left: 10, right: 10),
margin: EdgeInsets.only(top: 50), margin: EdgeInsets.only(top: 40),
child: Column( child: Column(
children: [ children: [
Row( Row(
@ -301,15 +300,24 @@ class DoctorReplayChat extends StatelessWidget {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
child:TextFields( width: double.infinity,
// height: MediaQuery.of(context).size.height * 0.12,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
FractionallySizedBox(
child: Container(
child: TextFields(
borderRadius: 0,
hasLabelText: msgController.text != '' hasLabelText: msgController.text != ''
? true ? true
: false, : false,
showLabelText: false, showLabelText: false,
hintText: TranslationBase hintText: "\n"+TranslationBase
.of(context) .of(context)
.typeHereToReply, .typeHereToReply,
fontSize: 13.5, fontSize: 13.5,
suffixIcon: FontAwesomeIcons.arrowRight, suffixIcon: FontAwesomeIcons.arrowRight,
suffixIconColor: Colors.green, suffixIconColor: Colors.green,
// hintColor: Colors.black, // hintColor: Colors.black,
@ -324,8 +332,44 @@ class DoctorReplayChat extends StatelessWidget {
else else
return null; return null;
}), }),
height: MediaQuery.of(context).size.height * 0.1,
),
), ),
],
),
)
// Container(
// child:SingleChildScrollView(
// child: TextFields(
// borderRadius: 0,
// hasLabelText: msgController.text != ''
// ? true
// : false,
// showLabelText: false,
// hintText: "\n"+TranslationBase
// .of(context)
// .typeHereToReply,
// fontSize: 13.5,
//
// suffixIcon: FontAwesomeIcons.arrowRight,
// suffixIconColor: Colors.green,
// // hintColor: Colors.black,
// fontWeight: FontWeight.w600,
// maxLines: 50,
// minLines: 3,
// controller: msgController,
// validator: (value) {
// if (value == null || value == "")
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// }),
// ),
// height: MediaQuery.of(context).size.height * 0.11,
// ),
)); ));
} }
} }

@ -77,7 +77,7 @@ class TextFields extends StatefulWidget {
this.hasBorder = true, this.hasBorder = true,
this.onTapTextFields, this.onTapTextFields,
this.hasLabelText = false, this.hasLabelText = false,
this.showLabelText = false}) this.showLabelText = false, this.borderRadius= 8.0})
: super(key: key); : super(key: key);
final String hintText; final String hintText;
@ -116,6 +116,8 @@ class TextFields extends StatefulWidget {
final Color fillColor; final Color fillColor;
final bool hasBorder; final bool hasBorder;
final bool showLabelText; final bool showLabelText;
final double borderRadius;
bool hasLabelText; bool hasLabelText;
@override @override
@ -276,6 +278,7 @@ class _TextFieldsState extends State<TextFields> {
hintText: widget.hintText, hintText: widget.hintText,
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: widget.fontSize, fontSize: widget.fontSize,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme.of(context).hintColor, color: widget.hintColor ?? Theme.of(context).hintColor,
), ),
@ -304,7 +307,7 @@ class _TextFieldsState extends State<TextFields> {
width: 1.0) width: 1.0)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0), : BorderRadius.circular(0.0),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
@ -315,13 +318,13 @@ class _TextFieldsState extends State<TextFields> {
.withOpacity(widget.bare ? 0.0 : 0.5), .withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.0) width: 1.0)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)), borderRadius: BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: widget.hasBorder borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0) ? BorderSide(color: Colors.grey, width: 1.0)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0), : BorderRadius.circular(0.0),
), ),
disabledBorder: OutlineInputBorder( disabledBorder: OutlineInputBorder(
@ -329,14 +332,14 @@ class _TextFieldsState extends State<TextFields> {
? BorderSide(color: Colors.grey, width: 1.0) ? BorderSide(color: Colors.grey, width: 1.0)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0)), : BorderRadius.circular(0.0)),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: widget.hasBorder borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0) ? BorderSide(color: Colors.grey, width: 1.0)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0), : BorderRadius.circular(0.0),
), ),
), ),

Loading…
Cancel
Save