mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-10-19 06:40:59 +00:00
f0d707b071
* Upgraded `targetSdkVersion` to 34
* added price to `IAPProduct`
* implemented `ProFeaturesScreen` (wip)
* finalized `ProFeaturesScreen` layout
* replaced `ProFeaturesDialog` with `ProFeaturesScreen`
* added translations
* fixed feature checkbox width calculation
* fixed tests
* separated android & ios features
* NPE
* changed "get pro" tile colors
* unified Lightmeter Pro related naming
* typo
* updated golden tests
* use iap 0.11.0
* revert unrelated changes
This reverts commit bae5ead8f0
.
* lint
* adjusted eng translation
* updated goldens
60 lines
1.7 KiB
Dart
60 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lightmeter/res/dimens.dart';
|
|
|
|
class SettingsSection extends StatelessWidget {
|
|
final String title;
|
|
final List<Widget> children;
|
|
final Color? backgroundColor;
|
|
final Color? foregroundColor;
|
|
|
|
const SettingsSection({
|
|
required this.title,
|
|
required this.children,
|
|
this.backgroundColor,
|
|
this.foregroundColor,
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.fromLTRB(
|
|
Dimens.paddingM,
|
|
0,
|
|
Dimens.paddingM,
|
|
Dimens.paddingM,
|
|
),
|
|
child: Card(
|
|
color: backgroundColor,
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: Dimens.paddingM),
|
|
child: Theme(
|
|
data: Theme.of(context).copyWith(
|
|
listTileTheme: Theme.of(context).listTileTheme.copyWith(
|
|
iconColor: foregroundColor,
|
|
textColor: foregroundColor,
|
|
),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: Dimens.paddingM),
|
|
child: Text(
|
|
title,
|
|
style: Theme.of(context)
|
|
.textTheme
|
|
.labelLarge
|
|
?.copyWith(color: foregroundColor ?? Theme.of(context).colorScheme.onSurface),
|
|
),
|
|
),
|
|
...children,
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|