Created
February 14, 2020 22:11
-
-
Save arianimartins/11705b8f1c2a1ce0823fcd87f7760958 to your computer and use it in GitHub Desktop.
Dicas Flutter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Formas de deixar uma imagem de fundo | |
//Forma 1 | |
Container( | |
child: Image.asset('images/marvel_splash.jpg', | |
width: double.infinity, | |
height: double.infinity, | |
fit: BoxFit.fill, | |
), | |
); | |
//Forma 2 | |
Container( | |
decoration: BoxDecoration( | |
image: DecorationImage(image: AssetImage('images/marvel_splash.jpg'), fit: BoxFit.cover) | |
), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment