cpd_2022_zi/lib/widgets/elevated_card.dart

40 lines
890 B
Dart
Raw Normal View History

2023-02-17 11:35:05 +01:00
import 'package:flutter/material.dart';
class ElevatedCard extends StatelessWidget {
2023-02-20 23:59:40 +01:00
final Widget child;
final String title;
const ElevatedCard({
Key? key,
required this.child,
required this.title,
}) : super(key: key);
2023-02-17 11:35:05 +01:00
@override
Widget build(BuildContext context) {
2023-02-20 23:59:40 +01:00
return Card(
elevation: 4.0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16.0),
),
child: Padding(
2023-02-21 22:33:03 +01:00
padding: const EdgeInsets.all(14.0),
2023-02-20 23:59:40 +01:00
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
2023-02-21 22:33:03 +01:00
style: const TextStyle(
fontSize: 16.0,
2023-02-20 23:59:40 +01:00
fontWeight: FontWeight.bold,
),
),
2023-02-21 22:33:03 +01:00
const SizedBox(height: 8.0),
2023-02-20 23:59:40 +01:00
child,
],
2023-02-17 11:35:05 +01:00
),
),
);
}
}