Flutter Package Written Purely into Dart

iOS Side Menu

A Flutter plugin to use the pure dart code API.

Usage

Add ios_side_menu as a dependency in your project. You can directly use it inside your home page or wherever you wan to show the side menu like below -

GlobalKey<IosSideMenuWidgetState> sideMenuState = GlobalKey();

IosSideMenuWidget(
        key: sideMenuState,
        sideMenuWidth: 270,
        sideMenuWidget: Container(
          decoration: BoxDecoration(
          // To Add extra elevation effect in side menu container
            boxShadow: [
              BoxShadow(
                color: Colors.green.withOpacity(0.5),
                spreadRadius: 5,
                blurRadius: 7,
                offset: Offset(0, 3), // changes position of shadow
              ),
            ],
          ),
          margin: EdgeInsets.zero,
          child: Container(
            decoration: const BoxDecoration(color: Colors.white),
            height: double.maxFinite,
            width: double.maxFinite,
          ),
        ),
        mainMenuWidget: Scaffold(
          appBar: AppBar(
            title: Text('Side Menu'),
            leading: IconButton(
              onPressed: () {
                if (sideMenuState.currentState!.isSideMenuVisible) {
                  sideMenuState.currentState!.hideSideMenu();
                } else {
                  sideMenuState.currentState!.openSideMenu();
                }
              },
              icon: const Icon(Icons.menu),
            ),
          ),
          body: Container(
            decoration: const BoxDecoration(
              color: Colors.blue,
            ),
            height: double.maxFinite,
            width: double.maxFinite,
          ),
        ),
      )

Issues and feedback

All the feedbacks and PR's are welcome.

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add ios_side_menu

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  ios_side_menu: ^1.0.0

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:ios_side_menu/ios_side_menu.dart'; 

Download details:

Author: RohitKumarMishra

Source: https://github.com/RohitKumarMishra/ios_side_menu

#ios #flutter 

Flutter Package Written Purely into Dart
1.05 GEEK