-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
2,133 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,178 +1,16 @@ | ||
# liquid_swipe_example | ||
# example | ||
|
||
Demonstrates how to use the liquid_swipe plugin. | ||
|
||
## Usage | ||
* Add this to your pubspec.yaml | ||
``` | ||
dependencies: | ||
liquid_swipe: ^1.1.0 | ||
``` | ||
* Get package from Pub: | ||
|
||
``` | ||
flutter packages get | ||
``` | ||
* Import it in your file | ||
|
||
``` | ||
import 'package:liquid_swipe/liquid_swipe.dart'; | ||
``` | ||
|
||
## Example | ||
|
||
* First, create a list of Containers. | ||
``` | ||
final pages = [ | ||
Container( | ||
color: Colors.pink, | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
mainAxisSize: MainAxisSize.max, | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
children: <Widget>[ | ||
Image.asset( | ||
'assets/1.png', | ||
fit: BoxFit.cover, | ||
), | ||
Padding(padding: const EdgeInsets.all(20.0)), | ||
Column( | ||
children: <Widget>[ | ||
new Text( | ||
"Hi", | ||
style: TextStyle( | ||
fontSize: 30, | ||
fontFamily: "Billy", | ||
fontWeight: FontWeight.w600), | ||
), | ||
new Text( | ||
"It's Me", | ||
style: TextStyle( | ||
fontSize: 30, | ||
fontFamily: "Billy", | ||
fontWeight: FontWeight.w600), | ||
), | ||
new Text( | ||
"Sahdeep", | ||
style: TextStyle( | ||
fontSize: 30, | ||
fontFamily: "Billy", | ||
fontWeight: FontWeight.w600), | ||
), | ||
], | ||
) | ||
], | ||
), | ||
), | ||
Container( | ||
color: Colors.deepPurpleAccent, | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
mainAxisSize: MainAxisSize.max, | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
children: <Widget>[ | ||
Image.asset( | ||
'assets/1.png', | ||
fit: BoxFit.cover, | ||
), | ||
Padding(padding: const EdgeInsets.all(20.0)), | ||
Column( | ||
children: <Widget>[ | ||
new Text( | ||
"Take a", | ||
style: TextStyle( | ||
fontSize: 30, | ||
fontFamily: "Billy", | ||
fontWeight: FontWeight.w600), | ||
), | ||
new Text( | ||
"look at", | ||
style: TextStyle( | ||
fontSize: 30, | ||
fontFamily: "Billy", | ||
fontWeight: FontWeight.w600), | ||
), | ||
new Text( | ||
"Liquid Swipe", | ||
style: TextStyle( | ||
fontSize: 30, | ||
fontFamily: "Billy", | ||
fontWeight: FontWeight.w600), | ||
), | ||
], | ||
) | ||
], | ||
), | ||
), | ||
Container( | ||
color: Colors.greenAccent, | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
mainAxisSize: MainAxisSize.max, | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
children: <Widget>[ | ||
Image.asset( | ||
'assets/1.png', | ||
fit: BoxFit.cover, | ||
), | ||
Padding(padding: const EdgeInsets.all(20.0)), | ||
Column( | ||
children: <Widget>[ | ||
new Text( | ||
"Liked?", | ||
style: TextStyle( | ||
fontSize: 30, | ||
fontFamily: "Billy", | ||
fontWeight: FontWeight.w600), | ||
), | ||
new Text( | ||
"Fork!", | ||
style: TextStyle( | ||
fontSize: 30, | ||
fontFamily: "Billy", | ||
fontWeight: FontWeight.w600), | ||
), | ||
new Text( | ||
"Give Star!", | ||
style: TextStyle( | ||
fontSize: 30, | ||
fontFamily: "Billy", | ||
fontWeight: FontWeight.w600), | ||
), | ||
], | ||
) | ||
], | ||
), | ||
), | ||
]; | ||
``` | ||
|
||
* Second, just pass it to Liquid Swipe Widget. | ||
``` | ||
@override | ||
Widget build(BuildContext context) { | ||
return new MaterialApp( | ||
home: new Scaffold( | ||
body: LiquidSwipe( | ||
pages: pages, | ||
fullTransitionValue: 500, | ||
enableSlideIcon: true, | ||
))); | ||
} | ||
``` | ||
* Remember pages can only be containers. | ||
* More Examples might come soon. | ||
A new Flutter project. | ||
|
||
## Getting Started | ||
|
||
This project is a starting point for a Flutter application. | ||
|
||
A few resources to get you started if this is your first Flutter project: | ||
|
||
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) | ||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) | ||
|
||
For help getting started with Flutter, view our | ||
[online documentation](https://flutter.dev/docs), which offers tutorials, | ||
For help getting started with Flutter development, view the | ||
[online documentation](https://docs.flutter.dev/), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.