|
| 1 | +import 'package:flutter/material.dart'; |
| 2 | +import 'package:liquid_swipe/liquid_swipe.dart'; |
| 3 | + |
| 4 | +class LiquidSwipeExample extends StatefulWidget { |
| 5 | + const LiquidSwipeExample({ Key? key }) : super(key: key); |
| 6 | + |
| 7 | + @override |
| 8 | + _LiquidSwipeExampleState createState() => _LiquidSwipeExampleState(); |
| 9 | +} |
| 10 | + |
| 11 | +class _LiquidSwipeExampleState extends State<LiquidSwipeExample> { |
| 12 | + |
| 13 | + // Photos from google |
| 14 | + final pages = [ |
| 15 | + Container( |
| 16 | + height: double.infinity, |
| 17 | + child: Image.network('https://my4kwallpapers.com/wp-content/uploads/2021/10/Squid-Game-Wallaper-1080x1920-1.jpg', fit: BoxFit.cover,),), |
| 18 | + Container( |
| 19 | + height: double.infinity, |
| 20 | + child: Image.network('https://w0.peakpx.com/wallpaper/432/1/HD-wallpaper-el-juego-del-calamar-netflix-squid-game.jpg', fit: BoxFit.cover,),), |
| 21 | + Container( |
| 22 | + height: double.infinity, |
| 23 | + child: Image.network('https://w0.peakpx.com/wallpaper/114/378/HD-wallpaper-squid-game-netflix-electric-blue-magenta-squid-game.jpg', fit: BoxFit.cover,),), |
| 24 | + Container( |
| 25 | + height: double.infinity, |
| 26 | + child: Image.network('https://fsb.zobj.net/crop.php?r=71AngyTpyXhfPVli-wIddS2vviYpIGCVmHX8EkQbAKyEkqH55ohVtsP3jTs0sWamyX5auRdmNOTnvZb0lBvJG9bwdJ8Zi5wZdGo2JLutBDwV3Amcl9RWiMsHFZD1pgdCA8XsPIR-9FWNAXfy7zjd8IvNcU6j1tYROKs5F1iAP8AldI6AmLrv432iiVCGM6kNl3toGH6NzNTQUxKw', fit: BoxFit.cover,),), |
| 27 | + ]; |
| 28 | + |
| 29 | + @override |
| 30 | + Widget build(BuildContext context) { |
| 31 | + return Scaffold( |
| 32 | + body: Builder( |
| 33 | + builder: (context) { |
| 34 | + return LiquidSwipe( |
| 35 | + pages: pages, |
| 36 | + fullTransitionValue: 880, |
| 37 | + waveType: WaveType.circularReveal, |
| 38 | + slideIconWidget: Icon(Icons.arrow_back_ios, color: Colors.white,), |
| 39 | + positionSlideIcon: 0.8, |
| 40 | + onPageChangeCallback: (page) { |
| 41 | + print(page); |
| 42 | + }, |
| 43 | + liquidController: LiquidController(), |
| 44 | + ); |
| 45 | + }, |
| 46 | + ), |
| 47 | + ); |
| 48 | + } |
| 49 | +} |
0 commit comments