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,31 +300,76 @@ class DoctorReplayChat extends StatelessWidget {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
child:TextFields( width: double.infinity,
hasLabelText: msgController.text != '' // height: MediaQuery.of(context).size.height * 0.12,
? true child: Column(
: false, mainAxisSize: MainAxisSize.min,
showLabelText: false, children: <Widget>[
hintText: TranslationBase FractionallySizedBox(
.of(context) child: Container(
.typeHereToReply, child: TextFields(
fontSize: 13.5, borderRadius: 0,
suffixIcon: FontAwesomeIcons.arrowRight, hasLabelText: msgController.text != ''
suffixIconColor: Colors.green, ? true
// hintColor: Colors.black, : false,
fontWeight: FontWeight.w600, showLabelText: false,
maxLines: 50, hintText: "\n"+TranslationBase
minLines: 3, .of(context)
controller: msgController, .typeHereToReply,
validator: (value) { fontSize: 13.5,
if (value == null || value == "")
return TranslationBase.of(context) suffixIcon: FontAwesomeIcons.arrowRight,
.emptyMessage; suffixIconColor: Colors.green,
else // hintColor: Colors.black,
return null; fontWeight: FontWeight.w600,
}), maxLines: 50,
height: MediaQuery.of(context).size.height * 0.1, minLines: 3,
), controller: msgController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
),
],
),
)
// 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