Change image assets from png to webp
Before Width: | Height: | Size: 92 KiB |
BIN
lib/assets/creator.webp
Normal file
After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 384 KiB |
BIN
lib/assets/drawer-bottom.webp
Normal file
After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 105 KiB |
BIN
lib/assets/drawer-top.webp
Normal file
After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 60 KiB |
BIN
lib/assets/image-error.webp
Normal file
After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 413 KiB |
BIN
lib/assets/splash.webp
Normal file
After Width: | Height: | Size: 34 KiB |
|
@ -16,7 +16,7 @@ class MainDrawer extends StatelessWidget {
|
|||
// color: Colors.amberAccent,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('lib/assets/drawer-top.jpg'),
|
||||
image: AssetImage('lib/assets/drawer-top.webp'),
|
||||
fit: BoxFit.fill),
|
||||
),
|
||||
),
|
||||
|
@ -61,7 +61,7 @@ class MainDrawer extends StatelessWidget {
|
|||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('lib/assets/drawer-bottom.png'))),
|
||||
image: AssetImage('lib/assets/drawer-bottom.webp'))),
|
||||
))
|
||||
],
|
||||
)),
|
||||
|
|
|
@ -83,7 +83,7 @@ class _SearchState extends State<Search> {
|
|||
child: CachedNetworkImage(
|
||||
imageUrl: data[index]['image'],
|
||||
placeholder: (context, url) => CupertinoActivityIndicator(),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.jpg'),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.webp'),
|
||||
fadeOutDuration: Duration(milliseconds: 5),
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
width: 400,
|
||||
|
|
|
@ -131,7 +131,7 @@ class _SplashScreenState extends State<SplashScreen> {
|
|||
height: 200,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('lib/assets/splash.png')
|
||||
image: AssetImage('lib/assets/splash.webp')
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
|
@ -30,7 +30,7 @@ class _AboutState extends State<About> {
|
|||
width: 160,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('lib/assets/creator.jpg'),
|
||||
image: AssetImage('lib/assets/creator.webp'),
|
||||
fit: BoxFit.scaleDown
|
||||
),
|
||||
),
|
||||
|
|
|
@ -44,7 +44,7 @@ class AnimeDetail extends StatelessWidget {
|
|||
placeholder: (context, url) =>
|
||||
CupertinoActivityIndicator(),
|
||||
errorWidget: (context, url, error) =>
|
||||
Image.asset('lib/assets/image-error.jpg'),
|
||||
Image.asset('lib/assets/image-error.webp'),
|
||||
fadeOutDuration: Duration(milliseconds: 5),
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
width: 120,
|
||||
|
|
|
@ -87,7 +87,7 @@ class _AnimeState extends State<Anime>
|
|||
child: CachedNetworkImage(
|
||||
imageUrl: listData[index]['image'],
|
||||
placeholder: (context, url) => CupertinoActivityIndicator(),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.jpg'),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.webp'),
|
||||
fadeOutDuration: Duration(milliseconds: 5),
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
width: 400,
|
||||
|
|
|
@ -39,7 +39,7 @@ class BatchDetail extends StatelessWidget {
|
|||
child: CachedNetworkImage(
|
||||
imageUrl: data['image'],
|
||||
placeholder: (context, url) => CupertinoActivityIndicator(),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.jpg'),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.webp'),
|
||||
fadeOutDuration: Duration(milliseconds: 5),
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
width: 200,
|
||||
|
@ -83,7 +83,7 @@ class BatchDetail extends StatelessWidget {
|
|||
child: CachedNetworkImage(
|
||||
imageUrl: data['image'],
|
||||
placeholder: (context, url) => CupertinoActivityIndicator(),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.jpg'),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.webp'),
|
||||
fadeOutDuration: Duration(milliseconds: 5),
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
width: 120,
|
||||
|
|
|
@ -90,7 +90,7 @@ class _BatchState extends State<Batch>
|
|||
child: CachedNetworkImage(
|
||||
imageUrl: listData[index]['image'],
|
||||
placeholder: (context, url) => CupertinoActivityIndicator(),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.jpg'),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.webp'),
|
||||
fadeOutDuration: Duration(milliseconds: 5),
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
width: 400,
|
||||
|
|
|
@ -107,7 +107,7 @@ class _EpisodeDetailState extends State<EpisodeDetail> {
|
|||
child: CachedNetworkImage(
|
||||
imageUrl: data['image'],
|
||||
placeholder: (context, url) => CupertinoActivityIndicator(),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.jpg'),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.webp'),
|
||||
fadeOutDuration: Duration(milliseconds: 5),
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
width: 120,
|
||||
|
|
|
@ -71,7 +71,7 @@ class MovieDetail extends StatelessWidget {
|
|||
child: CachedNetworkImage(
|
||||
imageUrl: data['image'],
|
||||
placeholder: (context, url) => CupertinoActivityIndicator(),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.jpg'),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.webp'),
|
||||
fadeOutDuration: Duration(milliseconds: 5),
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
width: 120,
|
||||
|
|
|
@ -87,7 +87,7 @@ class _MovieState extends State<Movie>
|
|||
child: CachedNetworkImage(
|
||||
imageUrl: listData[index]['image'],
|
||||
placeholder: (context, url) => CupertinoActivityIndicator(),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.jpg'),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.webp'),
|
||||
fadeOutDuration: Duration(milliseconds: 5),
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
width: 400,
|
||||
|
|
|
@ -87,7 +87,7 @@ class _NewReleaseState extends State<NewRelease>
|
|||
child: CachedNetworkImage(
|
||||
imageUrl: listData[index]['image'],
|
||||
placeholder: (context, url) => CupertinoActivityIndicator(),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.jpg'),
|
||||
errorWidget: (context, url, error) => Image.asset('lib/assets/image-error.webp'),
|
||||
fadeOutDuration: Duration(milliseconds: 5),
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
width: 400,
|
||||
|
|
10
pubspec.yaml
|
@ -53,11 +53,11 @@ flutter:
|
|||
uses-material-design: true
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
assets:
|
||||
- lib/assets/splash.png
|
||||
- lib/assets/drawer-top.jpg
|
||||
- lib/assets/drawer-bottom.png
|
||||
- lib/assets/creator.jpg
|
||||
- lib/assets/image-error.jpg
|
||||
- lib/assets/splash.webp
|
||||
- lib/assets/drawer-top.webp
|
||||
- lib/assets/drawer-bottom.webp
|
||||
- lib/assets/creator.webp
|
||||
- lib/assets/image-error.webp
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||
# For details regarding adding assets from package dependencies, see
|
||||
|
|