v0.0.2
page_slider
수평으로 페이지를 슬라이드하는 간단한 Flutter 위젯입니다. Material Stepper 위젯과 유사한 마법사나 온보딩 흐름용이지만, 특정 UI가 필요하지 않습니다. 어떤 위젯도 슬라이드할 수 있는 페이지로 사용할 수 있습니다.
36좋아요 1530일 다운로드30Pub 점수
플랫폼 정보 없음
수평으로 페이지를 슬라이드하는 Flutter 위젯
{"sdk":"flutter"}{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A simple Flutter widget that slides through pages horizontally. Use-cases could be wizards or onboarding flows similar to the Material Stepper widget, but without a particular UI - any widget can be a page to slide through.
Here's a demo of the example app:
PageSlider demo app
First, create the PageSlider widget with a GlobalKey<PageSliderState> and the child widgets which you want to slide through. Then, control the active page using the global key to address the page slider state like so:
class Demo extends StatefulWidget {
Demo({Key key}) : super(key: key);
_DemoState createState() => _DemoState();
}
class _DemoState extends State<Demo> {
GlobalKey<PageSliderState> _sliderKey = GlobalKey();
@override
Widget build(BuildContext context) {
return Column(
children: [
PageSlider(
key: _sliderKey,
pages: [
Text('Page 0'),
Text('Page 1'),
Text('Page 2'),
]
),
RaisedButton(
onPressed: _sliderKey.currentState.next,
child: Text('Next')
),
RaisedButton(
onPressed: _sliderKey.currentState.previous,
child: Text('Previous')
),
]
);
}
}