flutter_clock_example/lib/settings_page.dart

42 lines
1.0 KiB
Dart
Raw Permalink Normal View History

import 'package:flutter/material.dart';
import 'constants.dart';
class SettingsPage extends StatefulWidget {
const SettingsPage({super.key});
@override
_SettingsPageState createState() => _SettingsPageState();
}
class _SettingsPageState extends State<SettingsPage> {
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'General',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
SwitchListTile(
// Currently unavailable
title: const Text('Dark Mode'),
value: switchTheme,
shape: RoundedRectangleBorder(borderRadius: myBorderRadius),
onChanged: (value) {
setState(() {
switchTheme = value;
});
},
),
],
),
);
}
}