93 lines
2.0 KiB
Dart

// Flutter
import 'package:flutter/material.dart';
class TitleCard extends StatelessWidget {
const TitleCard({
super.key,
required this.title,
});
final String title;
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Text(
title,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
decoration: TextDecoration.underline,
),
),
),
);
}
}
class SummaryCard extends StatelessWidget {
const SummaryCard({
super.key,
required this.name,
required this.leftText,
required this.middleText,
required this.rightText,
});
final String name;
final String leftText;
final String middleText;
final String rightText;
@override
Widget build(BuildContext context) {
return Card(
color: Theme.of(context).cardColor,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
color: Theme.of(context).highlightColor,
child: Column(
children: [
Text(
name,
style: TextStyle(
decoration: TextDecoration.underline,
fontSize: 16,
),
),
Row(
children: [
Spacer(
flex: 3,
),
Text(
leftText,
),
Spacer(
flex: 1,
),
Text(
middleText,
),
Spacer(
flex: 1,
),
Text(
rightText,
),
Spacer(
flex: 3,
),
],
),
],
),
),
),
);
}
}