pmu_flutter/lec5/lib/view/home_page/home_card_image.dart

27 lines
587 B
Dart
Raw Permalink Normal View History

2024-10-11 19:12:12 +04:00
part of 'home_card.dart';
class _CardImage extends StatelessWidget {
final String imageUrl;
const _CardImage(this.imageUrl);
@override
Widget build(BuildContext context) {
return ClipRRect(
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(20),
topLeft: Radius.circular(20),
),
child: SizedBox(
height: double.infinity,
width: 115,
child: Image.network(
imageUrl,
fit: BoxFit.cover,
errorBuilder: (_, __, ___) => const Placeholder(),
),
),
);
}
}