custom_sidemenu 0.0.3 copy "custom_sidemenu: ^0.0.3" to clipboard
custom_sidemenu: ^0.0.3 copied to clipboard

Flutter package to use custom appbar with animation and easy approach ,this widget can be root of your ui to pass home and other screen under custom menubar environment.

example/lib/main.dart

import 'package:custom_sidemenu/custom_sidemenu.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
       
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  
  List<CustomMenuItem> menuItemsList=[
     CustomMenuItem(
                        callback: () {
                        
                        },
                        title: 'Home',
                        leadingIcon: Icons.home,
                          iconSize: 22,
       titleSize: 16,


                      ),


    CustomMenuItem(
                        callback: () {
                        
                        },
                        title: 'History',
                           leadingIcon: Icons.history,
                                 iconSize: 22,
      titleSize: 16,
                       
                      ),
    CustomMenuItem(
                        callback: () {
                        
                        },
                        title: 'Setting',
                          leadingIcon: Icons.settings,
                              iconSize: 22,
      titleSize: 16,
                      ),
    CustomMenuItem(
                        callback: () {
                        
                        },
                        title: 'profile',
                           leadingIcon: Icons.account_circle_outlined,
                            iconSize: 22,
      titleSize: 16,
                      ),
    CustomMenuItem(
                        callback: () {
                        
                        },
                        title: 'Help',
                         leadingIcon: Icons.help,
                            iconSize: 22,
      titleSize: 16,
                       
                      ),
    CustomMenuItem(
                        callback: () {
                        
                        },
                        title: 'Log Out',
                       leadingIcon: Icons.logout,
                            iconSize: 22,
                        titleSize: 16,
                       
                      ),
  ];

  @override
  Widget build(BuildContext context) {
  
    return Scaffold(
      // appBar: AppBar(

      //   title: Text(widget.title),
      // ),
      body:CustomDrawer(homeWidget: Center(child:Text('Your Home Widget'),),
      menuItemsList: menuItemsList, appBarActions: [], appBarTitle: Text('Your Home Widget') , menuIcon: const Icon(Icons.menu),
      )
      
      );
 
  }
}
7
likes
90
pub points
52%
popularity

Publisher

unverified uploader

Flutter package to use custom appbar with animation and easy approach ,this widget can be root of your ui to pass home and other screen under custom menubar environment.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_screenutil

More

Packages that depend on custom_sidemenu