FLUTTER ECOSYSTEM

lrferreiro/flutter_swipe_button

SwipeButton का उपयोग करके अनचाहे क्लिक या डायलॉग को रोकें।

flutter_swipe_button प्रोजेक्ट कवर
Stars
7
Forks
7
अंतिम पुश (UTC)
26 अप्रैल 2026
प्रोजेक्ट स्थिति
सक्रिय
Luis Reinier Ferreiro Vázquez GitHub avatar
GITHUB User

Luis Reinier Ferreiro Vázquez ↗

Cascavel, Brasil
भाषाएँC++DartCMakeHTMLCSwiftKotlinObjective-C

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 3 आइटम
  • flutter{"sdk":"flutter"}
  • flutter_testडेवलपमेंट{"sdk":"flutter"}
  • flutter_lintsडेवलपमेंट^4.0.0

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

flutter_swipe_button

pub package License: MIT

Avoid accidental clicks or dialogs to prevent them using SwipeButton.

Screenshot

Example 1 Example 2 Example 3
https://raw.githubusercontent.com/lrferreiro/flutter_swipe_button/HEAD/screenshots/flutter_01.png https://raw.githubusercontent.com/lrferreiro/flutter_swipe_button/HEAD/screenshots/flutter_02.png https://raw.githubusercontent.com/lrferreiro/flutter_swipe_button/HEAD/screenshots/flutter_03.png

Getting Started

Adding package
flutter_swipe_button: ^2.1.1+1
Importing package
import 'package:flutter_swipe_button/flutter_swipe_button.dart';

How to use

SwipeButton.expand(
  thumb: Icon(
    Icons.double_arrow_rounded,
    color: Colors.white,
  ),
  child: Text(
    "Swipe to ...",
    style: TextStyle(
      color: Colors.red,
    ),
  ),
  activeThumbColor: Colors.red,
  activeTrackColor: Colors.grey.shade300,
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

SwipeButton(
  trackPadding: EdgeInsets.all(6),
  elevationThumb: 2,
  child: Text(
    "Swipe to ...",
    style: TextStyle(
      color: Colors.white,
    ),
  ),
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

SwipeButton(
  thumbPadding: EdgeInsets.all(3),
  thumb: Icon(
    Icons.chevron_right,
    color: Colors.white,
  ),
  elevationThumb: 2,
  elevationTrack: 2,
  child: Text(
    "Swipe to ...".toUpperCase(),
    style: TextStyle(
      color: Colors.white,
      fontSize: 18,
      fontWeight: FontWeight.bold,
    ),
  ),
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

SwipeButton(
  borderRadius: BorderRadius.circular(8),
  activeTrackColor: Colors.amber,
  height: 60,
  child: Text(
    "Swipe to ...",
    style: TextStyle(
      color: Colors.red,
    ),
  ),
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

SwipeButton(
  activeTrackColor: Colors.blue,
  activeThumbColor: Colors.yellow,
  borderRadius: BorderRadius.zero,
  height: 30,
  child: Text(
    "Swipe to ...",
    style: TextStyle(
      color: Colors.white,
    ),
  ),
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

SwipeButton(
  width: 200,
  child: Text(
    "Swipe to ...",
    style: TextStyle(
      color: Colors.white,
    ),
  ),
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

License

MIT License