Open name27 opened 1 year ago
// ignore_for_file: prefer_const_constructors
// ignore_for_file: prefer_const_literals_to_create_immutables
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/container.dart';
import 'package:flutter/src/widgets/framework.dart';
class DrinkTile extends StatelessWidget {
const DrinkTile({super.key, required this.title, required this.subtitle, required this.price, required this.imgUrl});
final String title;
final String subtitle;
final int price;
final String imgUrl;
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(bottom: 16),
child: Row(
children: [
CircleAvatar(
backgroundImage: AssetImage(imgUrl),
radius: 48,
),
SizedBox(width: 16,),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: TextStyle(
fontSize: 16,
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
Text(
subtitle,
style: TextStyle(
fontSize: 14,
color: Colors.black45,
fontWeight: FontWeight.w200,
),
),
Text(
'$price원',
style: TextStyle(
fontSize: 16,
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
],
),
],
),
);
}
}