I hope you guys are doing fine. This is my first project for flutter and I would like to seek some guidance from you guys.
This is my current layout but I would like to align the 3 rows of text label and the star rating
Sorry I have 2 more questions as
How can I space out the space between the first star rating and the text field?
Is there any way to create a bigger text field? I've tried height but it doesn't make the field bigger.
Thank you and hope you guys have a nice day :)
This is my current code:
@override
Widget build(BuildContext context) {
return Scaffold(
body: Form(
key: _formKey,
child: Container(
padding: EdgeInsets.all(30),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SizedBox(height: 100),
new TextFormField(
style: new TextStyle(
height: 1.0,
),
validator: (value) {
if (value.isEmpty) {
return 'Field can\'t be empty!';
}
return null;
},
onSaved: (value) => _feedback = value,
decoration: new InputDecoration(
labelText: "Enter Message",
fillColor: Colors.white),
keyboardType: TextInputType.text,
),
new Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"AACCDDEE",
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 20),
),
StarRating(
rating: safetyrating,
starConfig: StarConfig(
size: 30.0,
),
onChangeRating: (int rating) {
setState(() {
this.safetyrating = rating.toDouble();
});
},
)
],
),
new Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Text(
"B",
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 20),
),
StarRating(
rating: speedrating,
starConfig: StarConfig(
size: 30.0,
),
onChangeRating: (int rating) {
setState(() {
this.speedrating = rating.toDouble();
});
},
)
],
),
new Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Text(
"AAS",
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 20),
),
StarRating(
rating: enjoymentrating,
starConfig: StarConfig(
size: 30.0,
),
onChangeRating: (int rating) {
setState(() {
this.enjoymentrating = rating.toDouble();
});
},
)
],
),
new Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
child: Text('SUBMIT'),
// height: 50.0,
// minWidth: 150.0,
color: Colors.blueGrey,
splashColor: Colors.black,
textColor: Colors.black,
// child: new Icon(FontAwesomeIcons.signInAlt),
onPressed: feedback,
),
],
),
],
),
))));
}