Align an image to top left in Flutter. You have centered the column, that’s why everything in it is centered. Simply remove the top level Center() widget and your image will be aligned top left.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.username), backgroundColor: new Color(0xFF24292E), ), body: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[ Image.asset( 'assets/profile.png', width: 100.0, height: 100.0, ), ], ), ); } |
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.