A Flutter package for iOS and Android for picking location and images.
First, add swipe_button
as a dependency in your pubspec.yaml file.
No configuration required - the plugin should work out of the box.
No configuration required - the plugin should work out of the box.
import 'package:swipe_button/swipe_button.dart';
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Container(
alignment: Alignment.center,
child: Padding(
padding: const EdgeInsets.all(24.0),
child: SwipeButton(
thumb: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Align(
widthFactor: 0.90,
child: Icon(
Icons.chevron_right,
size: 60.0,
color: Colors.white,
)),
],
),
content: Center(
child: Text(
buttonTitle,
style: TextStyle(color: Colors.white),
),
),
onChanged: (result) {
if (result == SwipePosition.SwipeRight) {
Navigator.pushNamed(context, pageRoute);
} else {}
},
),
),
);
}
}
import 'package:swipe_button/swipe_button_demo.dart';
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: SwipeHomeWidget(
pageRought: "/second",
),
);
}
}