lighthouse
lighthouse copied to clipboard
`lh assets:resize`
the goal
- add images in the beast quality and use the best resolution based on the screen size for better performance
How it will works
- add your assets in 3x folder
assets/images/3x - the
LHwill look into these folder resize images to other lower resolutions - you will use your assets normally and flutter will do the rest 💙 docs
example
- assets/images/3x/foo.png
- use the lh command
- lh will resize it to smaller resolutions
- use it like this
return Image.asset('assets/images/foo.png');
- flutter will load the best resolution based on the screen size either form 1x or 2x or 3x
Notes
- the command will delete the 2x and 1x folder then create them from scratch
- support nested folders not just 1 level deep
- support all platforms