slider_side_menu 0.1.0 copy "slider_side_menu: ^0.1.0" to clipboard
slider_side_menu: ^0.1.0 copied to clipboard

Slider Side Menu that is hidden to the side of the screen, and only open when user taps on the controller button.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:flutter/services.dart';

import 'package:slider_side_menu/slider_side_menu.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await SystemChrome.setPreferredOrientations(
      [DeviceOrientation.portraitDown, DeviceOrientation.portraitUp]);
  await SystemChrome.setEnabledSystemUIOverlays(
      [SystemUiOverlay.top, SystemUiOverlay.bottom]);

  runApp(ExampleSliderSideMenu());
}

class ExampleSliderSideMenu extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _ExampleSliderSideMenuState();
  }
}

class _ExampleSliderSideMenuState extends State<ExampleSliderSideMenu> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Slider Side Menu Demo" ,
      home: Scaffold(
        appBar: AppBar(
          title: Text("Slider Side Menu Demo"),
        ),
        body: Stack(
          children: <Widget>[
            Center(
              child: Text("Demostration of Slider Side Menu Demo"),
            ),
            SliderSideMenu(childrenData: [
              MenuItem(
                  Icon(Icons.thumb_up, color: Colors.white,),
                  Text("Thumb up", style: TextStyle(color: Colors.white),),
                  onPressed: _thumbUp
              ),
              MenuItem(
                  Icon(Icons.thumb_down, color: Colors.white,),
                  Text("Thumb down", style: TextStyle(color: Colors.white),),
                  onPressed: _thumbDown
              )
            ], description: "Sample tooltip message",
              parentStartColor: Colors.teal,
            )
          ],
        ),
      ),
    );
  }

  void _thumbUp() {

  }

  void _thumbDown() {

  }
}
20
likes
120
pub points
68%
popularity

Publisher

unverified uploader

Slider Side Menu that is hidden to the side of the screen, and only open when user taps on the controller button.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on slider_side_menu