Commit 66dbdc27 authored by Wilko Manger's avatar Wilko Manger

Use a ListTile for the Brightness header

Also add generic Header widget with correct
font size, weight and color.
parent 14ce57b8
......@@ -46,26 +46,15 @@ class AppearancePageState extends State<AppearancePage> {
),
body: ListView(
children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 16, top: 16, bottom: 8),
child: Row(
children: <Widget>[
Icon(
brightness == Brightness.light
? Icons.brightness_high
: Icons.brightness_3,
color: redOnBackground(context),
),
SizedBox(width: 8),
Text(
'Brightness',
style: TextStyle(
color: redOnBackground(context),
fontWeight: FontWeight.bold,
),
),
],
)),
ListTile(
leading: Icon(
brightness == Brightness.light
? Icons.brightness_high
: Icons.brightness_3,
color: redOnBackground(context),
),
title: Header('Brightness'),
),
RadioListTile(
groupValue: brightness,
value: Brightness.light,
......
// Copyright (C) 2019 Wilko Manger
//
// This file is part of Pattle.
//
// Pattle is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Pattle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with Pattle. If not, see <https://www.gnu.org/licenses/>.
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:pattle/src/ui/resources/theme.dart';
class Header extends StatelessWidget {
final String text;
const Header(this.text, {Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Text(
text,
style: TextStyle(
color: redOnBackground(context),
fontSize: Theme.of(context).textTheme.body1.fontSize,
fontWeight: FontWeight.bold,
),
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment