39 lines
947 B
Dart
39 lines
947 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class CardTitleComponent extends StatelessWidget {
|
|
final String title;
|
|
final String calories;
|
|
|
|
const CardTitleComponent(this.title, this.calories, {super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
decoration: const BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.all(Radius.circular(12))
|
|
),
|
|
child: Padding(
|
|
padding:
|
|
const EdgeInsets.symmetric(vertical: 16,horizontal: 16),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(title,
|
|
style: const TextStyle(
|
|
fontSize: 20
|
|
),
|
|
),
|
|
Text(
|
|
calories,
|
|
style: const TextStyle(
|
|
fontSize: 17
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|