Want to show fullscreen image at Flutter? Your problem is that Center will make the image to get it’s preferred size instead of the full size. The correct approach would be instead to force the image to expend.
1 2 3 4 5 6 7 8 9 | return new Scaffold( body: new Image.network( "https://cdn.pixabay.com/photo/2017/02/21/21/13/unicorn-2087450_1280.png", fit: BoxFit.cover, height: double.infinity, width: double.infinity, alignment: Alignment.center, ), ); |
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.