Skip to content

Commit 67bb848

Browse files
committed
Add liquid-swipe example
1 parent e9d9ba1 commit 67bb848

File tree

2 files changed

+55
-4
lines changed

2 files changed

+55
-4
lines changed

lib/pages/liquid_swipe_example.dart

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
}

pubspec.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,23 @@ dependencies:
2424
flutter:
2525
sdk: flutter
2626

27-
flutter_verification_code: ^1.0.4
28-
29-
3027
# The following adds the Cupertino Icons font to your application.
3128
# Use with the CupertinoIcons class for iOS style icons.
3229
cupertino_icons: ^1.0.2
3330
shimmer: ^2.0.0
34-
flashy_tab_bar: ^0.0.3
31+
# flashy_tab_bar: ^0.0.3
3532
flutter_staggered_grid_view: ^0.4.0
3633
iconsax: ^0.0.8
3734
dio: ^4.0.0
3835
url_launcher: ^6.0.12
3936
concentric_transition: ^1.0.1
4037
odometer: ^2.1.0
4138
vertical_card_pager: ^1.5.0
39+
loading_indicator: ^3.0.2
40+
animate_do: ^2.0.0
41+
flutter_youtube_view: ^2.0.2
42+
flutter_verification_code: ^1.1.0
43+
liquid_swipe: ^2.1.0
4244

4345
dev_dependencies:
4446
flutter_test:

0 commit comments

Comments
 (0)