Browse Source

feat(neon): better emphazize SettingsCategory.title

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
pull/744/head
Nikolas Rimikis 1 year ago
parent
commit
ad3e0ba6b6
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 40
      packages/neon/neon/lib/src/settings/widgets/settings_category.dart

40
packages/neon/neon/lib/src/settings/widgets/settings_category.dart

@ -1,4 +1,4 @@
import 'package:flutter/widgets.dart';
import 'package:flutter/material.dart';
import 'package:intersperse/intersperse.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/settings/widgets/settings_tile.dart';
@ -15,19 +15,27 @@ class SettingsCategory extends StatelessWidget {
final List<SettingsTile> tiles;
@override
Widget build(final BuildContext context) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (title != null) ...[
title!,
],
...tiles,
]
.intersperse(
const SizedBox(
height: 10,
),
)
.toList(),
);
Widget build(final BuildContext context) {
final textTheme = Theme.of(context).textTheme;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (title != null)
DefaultTextStyle(
style: textTheme.titleMedium!.copyWith(
fontWeight: FontWeight.bold,
),
child: title!,
),
...tiles,
]
.intersperse(
const SizedBox(
height: 10,
),
)
.toList(),
);
}
}

Loading…
Cancel
Save