/* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright (C) 2024 Marco Groß */ import 'package:calorimeter/utils/settings.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.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: () { Navigator.of(context).pop(); }, ), title: Text(AppLocalizations.of(context)!.menu), ), ), ListTile( title: Text(AppLocalizations.of(context)!.settings), trailing: const Icon(Icons.settings), onTap: () { Navigator.of(context).pop(); Navigator.of(context).push(MaterialPageRoute( builder: (context) => const SettingsWidget())); }, ), ], ), ); } }