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

31 lines
751 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(16))
),
child: Padding(
padding:
const EdgeInsets
.symmetric(
vertical: 16,
horizontal: 8
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [Text(title), Text(calories)],
),
),
);
}
}