flutter_side_menu 0.0.4 flutter_side_menu: ^0.0.4 copied to clipboard
Flutter's full customizable side menu has been used as a directory for Related Pages, Navigation Items, and more.
Usage #
To use this plugin, add flutter_side_menu
as a dependency in your pubspec.yaml file.
Example #
import 'package:flutter/material.dart';
import 'package:flutter_side_menu/flutter_side_menu.dart';
void main() => runApp(
MaterialApp(
home: Material(
child: Scaffold(
body: Row(
children: [
SideMenu(
builder: (isOpen) => SideMenuBodyData(
header: const Text('Header'),
items: [
SideMenuItemData(
isSelected: true,
onTap: () {},
title: 'Item 1',
icon: Icons.home,
),
],
footer: const Text('Footer'),
),
),
Expanded(
child: Container(
color: Colors.white,
child: const Center(
child: Text(
'body',
),
),
),
),
SideMenu(
position: SideMenuPosition.right,
builder: (isOpen) => const SideMenuBodyData(
customChild: Text('Custom view'),
),
),
],
),
),
),
),
);