Image Scale type center crop on flutter?

Android ScaleType and BoxFit should match like this:

  1. CENTER = none
  2. CENTER_CROP = cover
  3. CENTER_INSIDE = scaleDown
  4. FIT_CENTER = contain (alignment.center)
  5. FIT_END = contain (alignment.bottomright)
  6. FIT_START = contain (alignment.topleft)
  7. FIT_XY = fill

Ex :- Image.asset('assets/images/your_image.png',fit: BoxFit.fill)

So you should use Cover to achieve the CENTER_CROP result.

EDIT:

The problem should be crossAxisAlignment of the Column widget.
Setting this property to crossAxisAlignment: CrossAxisAlignment.stretch should fix your issue.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)