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

outdated

A sliding up panel widget which can be used to show or hide content, beautiful and simple.

flutter_sliding_up_panel #

A sliding up panel widget which can be used to show or hide content, beautiful and simple.

demo #

Getting Started #

dependencies:
  flutter_sliding_up_panel: ^0.0.3
import 'package:flutter_sliding_up_panel/flutter_sliding_up_panel.dart';
Stack(
  children: <Widget>[
    Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
        actions: <Widget>[
          IconButton(
            icon: Icon(Icons.settings),
            onPressed: () {
              widget.onSetting?.call();
            },
          )
        ],
      ),
      body: Container(
        child:Center(
          child:Text('This is content'),
        ),
      ),
    ),
    SlidingUpPanelWidget(
      child: Column(
        children: <Widget>[
          Container(
            color: Colors.white,
            alignment: Alignment.center,
            height: 50.0,
            child: Row(
              children: <Widget>[
                Icon(Icons.menu,size: 30,),
                Padding(
                  padding: EdgeInsets.only(left: 8.0,),
                ),
                Text(
                  'click or drag',
                )
              ],
              mainAxisAlignment: MainAxisAlignment.center,
            ),
          ),
          Divider(
            height: 0.5,
            color: Colors.grey,
          ),
          Flexible(
            child: Container(
              child: ListView.separated(
                controller: scrollController,
                physics: ClampingScrollPhysics(),
                itemBuilder: (context, index) {
                  return ListTile(
                    title: Text('list item $index'),
                  );
                },
                separatorBuilder: (context, index) {
                  return Divider(
                    height: 0.5,
                  );
                },
                shrinkWrap: true,
                itemCount: 20,
              ),
              color: Colors.white,
            ),
          ),
        ],
        mainAxisSize: MainAxisSize.min,
      ),
      controlHeight: 50.0,
      anchor: 0.4,
      panelController: panelController,
    ),
  ],
);

SlidingUpPanelWidget param #

property description
child Widget (Not Null)(required)
controlHeight double (Not Null)(required)
animationController AnimationController
panelController SlidingUpPanelController (Not Null)(required)
onStatusChanged OnSlidingUpPanelStatusChanged
elevation double (default 8.0)
panelStatus SlidingUpPanelStatus (default SlidingUpPanelStatus.collapsed)
anchor double (default 0.5)

Example #

example

169
likes
40
points
6.73k
downloads

Publisher

verified publishertookit.cn

Weekly Downloads

A sliding up panel widget which can be used to show or hide content, beautiful and simple.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on flutter_sliding_up_panel