Padding inside Expanded. This is how padding is done with Expanded widget in flutter.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | class DicePage extends StatelessWidget { @override Widget build(BuildContext context) { return Center( child: Row( children: <Widget>[ Expanded( child: Padding( padding: const EdgeInsets.all(16.0), child: Image.asset('images/dice1.png'), ), ), Expanded( child: Padding( padding: const EdgeInsets.all(16.0), child: Image.asset('images/dice1.png'), ), ), ], ), ); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.