work a bit on the settings menu but not too much bc im tired

This commit is contained in:
zoe 2022-07-30 17:28:29 +02:00
parent 822325c0c7
commit 75ee41bd92
2 changed files with 35 additions and 4 deletions

View File

@ -9,7 +9,7 @@ import 'themes/themes.dart' as themes;
import 'global.dart' as global;
import 'business_logic/auth/oauth.dart' as oauth;
String _initRoute = "/login";
String _initRoute = "/";
ThemeData theme = themes.getTheme(themes.available[0]);
Locale activeLocale = const Locale("en");

View File

@ -1,7 +1,38 @@
import 'package:flutter/material.dart';
Widget settings(context) {
return const Center(
child: Text("Settings"),
);
const List<Widget> categories = [
SettingsPanel(title: "cool and good settings"),
SettingsPanel(title: "evil and bad settings"),
];
return ListView.separated(
itemBuilder: (context, index) {
return categories[index];
},
separatorBuilder: (context, index) {
return const Divider(
color: Colors.transparent,
);
},
itemCount: categories.length);
}
class SettingsPanel extends StatelessWidget {
const SettingsPanel({
Key? key,
required this.title,
}) : super(key: key);
final String title;
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(color: Theme.of(context).colorScheme.surface),
padding: const EdgeInsets.all(4),
child: Column(
children: [Text(title)],
),
);
}
}