I have seen that I can\'t set the width of a RaisedButton
in Flutter. If I have well understood, I should put the RaisedButton
into a SizedBox
This worked for me. The Container provides the height and FractionallySizedBox provides the width for the RaisedButton.
Container(
height: 50.0, //Provides height for the RaisedButton
child: FractionallySizedBox(
widthFactor: 0.7, ////Provides 70% width for the RaisedButton
child: RaisedButton(
onPressed: () {},
),
),
),