feat(ui): Fix inconsistent image size

This commit is contained in:
PapaTutuWawa 2023-02-04 20:25:26 +01:00
parent 182a257fdd
commit 8b17f68eed
2 changed files with 4 additions and 9 deletions

View File

@ -14,7 +14,7 @@ class AnimeCoverImage extends StatelessWidget {
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
child: SizedBox( child: SizedBox(
height: 100 * (16 / 9), height: 100 * (16 / 9),
width: 100, width: 120,
child: DecoratedBox( child: DecoratedBox(
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(

View File

@ -1,4 +1,5 @@
import 'package:anitrack/src/data/anime.dart'; import 'package:anitrack/src/data/anime.dart';
import 'package:anitrack/src/ui/widgets/image.dart';
import 'package:anitrack/src/ui/widgets/swipe_icon.dart'; import 'package:anitrack/src/ui/widgets/swipe_icon.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:swipeable_tile/swipeable_tile.dart'; import 'package:swipeable_tile/swipeable_tile.dart';
@ -67,14 +68,8 @@ class ListItem extends StatelessWidget {
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
ClipRRect( AnimeCoverImage(
borderRadius: BorderRadius.circular(8), url: thumbnailUrl,
child: SizedBox(
width: 100,
child: Image.network(
thumbnailUrl,
),
),
), ),
Expanded( Expanded(