I want to have a card/container which fits the whole screen. In this card exists an image asset. However, trying to fit the image in a Expanded Widget just scale it as far as it reaches a boundayry of the screen.
Is there any way to scale it up (and of course clip/crop the image by this) so it fills up the entire screen without reaching these overflow messages? Also the user should not be able to scroll in the overflowed part.
This code should help you, you can use the image as a widget as a Container's child too;
Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(filepath),
),
),
);