2020-07-27 20:43:58 +00:00
|
|
|
import 'dart:io';
|
|
|
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
TextStyle basicTextStyle(BuildContext context) =>
|
2022-09-21 20:27:35 +00:00
|
|
|
Platform.isIOS ? CupertinoTheme.of(context).textTheme.textStyle : Theme.of(context).textTheme.subtitle1!;
|
2020-07-27 20:43:58 +00:00
|
|
|
|
|
|
|
const double _headerFontSize = 13.0;
|
|
|
|
|
|
|
|
class ConfigHeader extends StatelessWidget {
|
2022-09-21 20:27:35 +00:00
|
|
|
const ConfigHeader({Key? key, required this.label, this.color}) : super(key: key);
|
2020-07-27 20:43:58 +00:00
|
|
|
|
|
|
|
final String label;
|
2022-09-21 20:27:35 +00:00
|
|
|
final Color? color;
|
2020-07-27 20:43:58 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
padding: const EdgeInsets.only(left: 10.0, top: 30.0, bottom: 5.0, right: 10.0),
|
|
|
|
child: Text(
|
|
|
|
label,
|
|
|
|
style: basicTextStyle(context).copyWith(
|
|
|
|
color: color ?? CupertinoColors.secondaryLabel.resolveFrom(context),
|
|
|
|
fontSize: _headerFontSize,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|