ente/auth/lib/ui/settings/settings_section_title.dart

37 lines
823 B
Dart
Raw Normal View History

2023-04-10 04:17:45 +00:00
2022-11-01 06:13:06 +00:00
import 'package:flutter/material.dart';
class SettingsSectionTitle extends StatelessWidget {
final String title;
2023-04-10 04:17:45 +00:00
final Color? color;
2022-11-01 06:13:06 +00:00
const SettingsSectionTitle(
this.title, {
2023-04-10 04:17:45 +00:00
Key? key,
2022-11-01 06:13:06 +00:00
this.color,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column(
children: [
const Padding(padding: EdgeInsets.all(4)),
Align(
alignment: Alignment.centerLeft,
child: Text(
title,
style: color != null
? Theme.of(context)
.textTheme
2023-08-22 04:47:15 +00:00
.titleLarge!
2022-11-01 06:13:06 +00:00
.merge(TextStyle(color: color))
2023-08-22 04:47:15 +00:00
: Theme.of(context).textTheme.titleLarge,
2022-11-01 06:13:06 +00:00
),
),
const Padding(padding: EdgeInsets.all(4)),
],
);
}
}