import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; class CommonAppBar extends StatelessWidget implements PreferredSizeWidget { final Widget title; final List? actions; final TabBar? bottom; const CommonAppBar({super.key, required this.title, this.actions, required Color backgroundColor, required int elevation, this.bottom}); @override Widget build(BuildContext context) { return AppBar( centerTitle: true, leading: Builder(builder: (context) { return IconButton( onPressed: () => Scaffold.of(context).openDrawer(), icon: SvgPicture.asset( 'assets/svg/menu.svg', ), color: Colors.white); }), backgroundColor: Colors.transparent, bottom: bottom, title: title, toolbarHeight: kToolbarHeight+20, actions: actions); } @override Size get preferredSize => const Size.fromHeight(kToolbarHeight); }