drag_ball 0.3.0
drag_ball: ^0.3.0 copied to clipboard
A Flutter package, inspiration Indonesia e-commerce widget or similiar AssistiveTouch on Iphone.
#
A flutter package, inspiration Indonesian e-commerce widget or similiar AssistiveTouch on Iphone.
⚠️ Note #
- Give the ball the same width as the ball size, for animation calculations.
- Put [DragBall] on top the Scaffold
Example #
Dragball(
ball: FlutterLogo(
size: 70,
),
initialPosition: const DragballPosition(
top: 200,
isRight: false,
),
withIcon: false,
animationSizeDuration: const Duration(milliseconds: 300),
ballSize: 70,
onTap: () {
debugPrint('Dragball Tapped ${DateTime.now().microsecond}');
},
onPositionChanged: (DragballPosition position) {
debugPrint(position.toString());
},
child: Scaffold(
appBar: AppBar(
title: Text('Dragball Example'),
),
body: ListView.builder(
padding: const EdgeInsets.all(20),
itemBuilder: (BuildContext context, int index) {
return Container(
height: 200,
width: double.infinity,
margin: const EdgeInsets.only(bottom: 16),
decoration: BoxDecoration(
color: Colors.grey[200],
borderRadius: const BorderRadius.all(Radius.circular(10)),
),
);
},
itemCount: 5,
),
),
);
Output #
🚧 Maintener #
Farhan Fadila
📫 How to reach me: farhan.fadila1717@gmail.com