2022-06-16 20:30:02 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2022-07-02 22:03:10 +00:00
|
|
|
Widget settings(context) {
|
2022-07-30 15:28:29 +00:00
|
|
|
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)],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
2022-06-16 20:30:02 +00:00
|
|
|
}
|