Flutter-Ernaehrungsapp/lib/android/components/card/card_title_component.dart

39 lines
947 B
Dart
Raw Normal View History

2023-05-29 22:04:44 +02:00
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,
2023-06-02 19:21:06 +02:00
borderRadius: BorderRadius.all(Radius.circular(12))
2023-05-29 22:04:44 +02:00
),
child: Padding(
padding:
2023-06-02 19:21:06 +02:00
const EdgeInsets.symmetric(vertical: 16,horizontal: 16),
2023-05-29 22:04:44 +02:00
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
2023-06-02 19:21:06 +02:00
children: [
Text(title,
style: const TextStyle(
fontSize: 20
),
),
Text(
calories,
style: const TextStyle(
fontSize: 17
),
)
],
2023-05-29 22:04:44 +02:00
),
),
);
}
}