34 lines
768 B
Dart
34 lines
768 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class SingleSection extends StatelessWidget {
|
|
final String? title;
|
|
final List<Widget> children;
|
|
|
|
const SingleSection({
|
|
Key? key,
|
|
this.title,
|
|
required this.children,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
if (title != null)
|
|
Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
child: Text(
|
|
title!,
|
|
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
|
),
|
|
),
|
|
Column(
|
|
children: children,
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|