import 'package:flutter/material.dart';
import 'package:hl_lieferservice/feature/settings/presentation/settings_page.dart';

class CustomAppBar extends StatelessWidget {
  const CustomAppBar({super.key});

  void _openSettings(BuildContext context) {
    Navigator.of(
      context,
    ).push(MaterialPageRoute(builder: (context) => SettingsPage()));
  }

  @override
  Widget build(BuildContext context) {
    return AppBar(
      title: Center(child: Text("Holzleitner Lieferservice")),
      actions: [
        IconButton(
          onPressed: () => _openSettings(context),
          icon: Icon(Icons.settings),
        ),
      ],
    );
  }
}
