progress in v5 settings

This commit is contained in:
Kima
2024-01-30 22:09:10 +01:00
parent 5b9187d545
commit 6f17f69281
3 changed files with 272 additions and 21 deletions

View File

@@ -65,7 +65,11 @@ class SplittedPanel extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// title
if (title != null) SplittedPanelTitle(title: title!),
if (title != null)
SplittedPanelTitle(
title: title!,
leftPadding: (padding?.horizontal ?? 48.0) / 2,
),
// body
if (children != null)
@@ -94,14 +98,16 @@ class SplittedPanel extends StatelessWidget {
}
class SplittedPanelTitle extends StatelessWidget {
const SplittedPanelTitle({super.key, required this.title});
const SplittedPanelTitle(
{super.key, required this.title, this.leftPadding = 24.0});
final Widget title;
final double leftPadding;
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(left: 14.0 + 24.0, bottom: 8.0),
padding: EdgeInsets.only(left: 14.0 + leftPadding, bottom: 8.0),
child: DefaultTextStyle(
style: Theme.of(context).textTheme.titleMedium!.copyWith(
fontWeight: FontWeight.w600,