Use this package as a library
four_swipe_direction
4方向(上・下・右・左)のスワイプが可能なパッケージ
You can swipe 4 directions!!
Getting started (パッケージの導入方法)
①
Add the dependency to your pubspec.yaml file.
pubspec.yamlに以下のものを追加してください。
dependencies:
flutter:
sdk: flutter
four_swipe_direction:
②
Tap Pub get
in your pubspec.yaml file.
pubspec.yamlの上にある Pub get
を押してください。
Usage (使い方)
FourSwipeDirection(
swipeUp: () {
//上にスワイプしたときに呼び出されます。
//Called when swiping up
},
swipeDown: (){
//下にスワイプしたときに呼び出されます。
//Called when swiping down
},
swipeLeft: () {
//左にスワイプしたときに呼び出されます。
//Called when swiping left
},
swipeRight: () {
//右にスワイプしたときに呼び出されます。
//Called when swiping right
},
child: Container(
color: Colors.indigo,
width: 100,
height: 100,
),
),
Additional information (補足情報)
・必ずしも4方向に呼び出さなくても構いません。
=>なぜなら4つの方向は、nullableになっているからです。
・You don't need to use 4 swipe direction.
=>because 4 swipe direction is nullable