page_slider
एक सरल Flutter विजेट जो क्षैतिज रूप से पृष्ठों के माध्यम से स्लाइड करता है। विजेट या ओनबोर्डिंग प्रवाह के लिए, जैसे कि Material Stepper विजेट, लेकिन किसी विशेष UI के बिना - कोई भी विजेट पृष्ठ के रूप में स्लाइड किया जा सकता है।
एक हॉरिजॉन्टल रूप से पेज को स्लाइड करने वाला फ्लटर विजेट
{"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')
),
]
);
}
}