work a bit on the settings menu but not too much bc im tired
This commit is contained in:
parent
822325c0c7
commit
75ee41bd92
|
@ -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");
|
||||
|
||||
|
|
|
@ -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)],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue