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(
color: Colors.white,
),
height: 130,
height: 115,
child: Container(
color: Colors.red,
padding: EdgeInsets.only(
left: 10, right: 10),
margin: EdgeInsets.only(top: 50),
margin: EdgeInsets.only(top: 40),
child: Column(
children: [
Row(
@ -301,31 +300,76 @@ class DoctorReplayChat extends StatelessWidget {
),
),
bottomSheet: Container(
child:TextFields(
hasLabelText: msgController.text != ''
? true
: false,
showLabelText: false,
hintText: 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.1,
),
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 != ''
? 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;
}),
),
),
],
),
)
// 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.onTapTextFields,
this.hasLabelText = false,
this.showLabelText = false})
this.showLabelText = false, this.borderRadius= 8.0})
: super(key: key);
final String hintText;
@ -116,6 +116,8 @@ class TextFields extends StatefulWidget {
final Color fillColor;
final bool hasBorder;
final bool showLabelText;
final double borderRadius;
bool hasLabelText;
@override
@ -276,6 +278,7 @@ class _TextFieldsState extends State<TextFields> {
hintText: widget.hintText,
hintStyle: TextStyle(
fontSize: widget.fontSize,
fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme.of(context).hintColor,
),
@ -304,7 +307,7 @@ class _TextFieldsState extends State<TextFields> {
width: 1.0)
: BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0),
),
focusedErrorBorder: OutlineInputBorder(
@ -315,13 +318,13 @@ class _TextFieldsState extends State<TextFields> {
.withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.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(
borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0)
: BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0),
),
disabledBorder: OutlineInputBorder(
@ -329,14 +332,14 @@ class _TextFieldsState extends State<TextFields> {
? BorderSide(color: Colors.grey, width: 1.0)
: BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0)),
enabledBorder: OutlineInputBorder(
borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0)
: BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0),
),
),

Loading…
Cancel
Save