2024-12-07 12:29:34 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
2024-09-06 23:38:03 +00:00
|
|
|
import 'package:calorimeter/utils/settings.dart';
|
2024-06-09 12:42:17 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class AppDrawer extends StatelessWidget {
|
|
|
|
const AppDrawer({
|
|
|
|
super.key,
|
|
|
|
});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Drawer(
|
|
|
|
child: ListView(
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
children: [
|
|
|
|
DrawerHeader(
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
color: Colors.redAccent,
|
|
|
|
),
|
|
|
|
child: ListTile(
|
|
|
|
leading: IconButton(
|
|
|
|
icon: const Icon(Icons.close),
|
|
|
|
onPressed: () {
|
2024-09-06 23:38:03 +00:00
|
|
|
Navigator.of(context).pop();
|
2024-06-09 12:42:17 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
title: const Text('Menü')),
|
|
|
|
),
|
|
|
|
ListTile(
|
|
|
|
title: const Text('Einstellungen'),
|
|
|
|
trailing: const Icon(Icons.settings),
|
2024-06-10 01:06:56 +00:00
|
|
|
onTap: () {
|
2024-09-06 23:38:03 +00:00
|
|
|
Navigator.of(context).pop();
|
|
|
|
Navigator.of(context).push(MaterialPageRoute(
|
|
|
|
builder: (context) => const SettingsWidget()));
|
2024-06-10 01:06:56 +00:00
|
|
|
},
|
2024-06-09 12:42:17 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|