mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
38 lines
989 B
Dart
38 lines
989 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class SectionCardWithHeading extends StatelessWidget {
|
|
final String heading;
|
|
final List<Widget> children;
|
|
const SectionCardWithHeading({
|
|
super.key,
|
|
required this.heading,
|
|
required this.children,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
|
child: Text(
|
|
heading,
|
|
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
child: Card(
|
|
clipBehavior: Clip.antiAliasWithSaveLayer,
|
|
child: Column(mainAxisSize: MainAxisSize.min, children: children),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|