33 lines
875 B
Dart
33 lines
875 B
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:lamiter/Component/CupertinoForm/cupertino_form_row.dart';
|
|
import 'package:lamiter/Extension/build_context.dart';
|
|
|
|
class MyCupertinoFormSection extends StatelessWidget {
|
|
final String title;
|
|
final List<MyCupertinoFormRow> items;
|
|
final String? note;
|
|
|
|
const MyCupertinoFormSection({
|
|
super.key,
|
|
required this.title,
|
|
required this.items,
|
|
this.note,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return CupertinoFormSection(
|
|
backgroundColor: context.surface,
|
|
header: Text(title),
|
|
footer: note != null
|
|
? Padding(
|
|
padding: EdgeInsets.only(top: 12.sp),
|
|
child: Text(note!, textAlign: TextAlign.justify),
|
|
)
|
|
: null,
|
|
children: items,
|
|
);
|
|
}
|
|
}
|