CINXE.COM

flutter_swipe_detector - Dart API docs

<!DOCTYPE html> <html lang="en"><head><script type="text/javascript" src="https://www.googletagmanager.com/gtm.js?id=GTM-MX6DBN9" async="async"></script><script type="text/javascript" src="/static/hash-kjnuqhji/js/gtm.js"></script><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no"/><meta name="generator" content="made with love by dartdoc"/><meta name="description" content="flutter_swipe_detector API docs, for the Dart programming language."/><title>flutter_swipe_detector - Dart API docs</title><link rel="canonical" href="https://pub.dev/documentation/flutter_swipe_detector/latest/"/><link rel="preconnect" href="https://fonts.gstatic.com"/><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&amp;display=swap"/><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0"/><link rel="stylesheet" href="/static/hash-kjnuqhji/css/dartdoc.css"/><link rel="icon" href="/favicon.ico?hash=nk4nss8c7444fg0chird9erqef2vkhb8"/></head><body class="light-theme" data-base-href="" data-using-base-href="false"><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MX6DBN9" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><div id="overlay-under-drawer"></div><header id="title"><span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span><a class="hidden-xs" href="/"><img src="/static/hash-kjnuqhji/img/dart-logo.svg" alt="" width="30" height="30" role="presentation" aria-label="Go to the landing page of pub.dev" style="height: 30px; margin-right: 1em;"/></a><ol class="breadcrumbs gt-separated dark hidden-xs"><li><a href="/packages/flutter_swipe_detector">flutter_swipe_detector package</a></li><li class="self-crumb">documentation</li></ol><div class="self-name">flutter_swipe_detector package</div><form class="search navbar-right" role="search"><input id="search-box" class="form-control typeahead" type="text" placeholder="Loading search..." autocomplete="off"/></form><div id="theme-button" class="toggle" title="Toggle brightness"><label for="theme"><input id="theme" type="checkbox" value="light-theme"/><span id="dark-theme-button" class="material-symbols-outlined">dark_mode</span><span id="light-theme-button" class="material-symbols-outlined">light_mode</span></label></div></header><main><div id="dartdoc-main-content" class="main-content"> <div class="desc markdown markdown-body"> <h1 id="flutter-swipe-detector">Flutter Swipe Detector</h1> <h2 id="author-jop-middelkamphttpsgithubcomjopmiddelkamp">Author: <a href="https://github.com/jopmiddelkamp" rel="ugc nofollow">Jop Middelkamp</a></h2> <p>A package to detect your swipe directions and provides you with callbacks to handle them.</p> <h2 id="usage">Usage</h2> <pre class="language-dart"><code class="language-dart">SwipeDetector( onSwipe: (direction, offset) { _addSwipe(direction); }, onSwipeUp: (offset) { _addSwipe(SwipeDirection.up); }, onSwipeDown: (offset) { _addSwipe(SwipeDirection.down); }, onSwipeLeft: (offset) { _addSwipe(SwipeDirection.left); }, onSwipeRight: (offset) { _addSwipe(SwipeDirection.right); }, child: const Container( padding: EdgeInsets.all(16), child: Text( 'Swipe me!', style: TextStyle( fontWeight: FontWeight.bold, ), ), ), ), </code></pre> </div> <div class="summary"> <h2>Libraries</h2> <dl> <dt id="flutter_swipe_detector"> <span class="name"><a href="flutter_swipe_detector/">flutter_swipe_detector</a></span> </dt> <dd> </dd> </dl> </div> </div><div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left"><header id="header-search-sidebar" class="hidden-l"><form class="search-sidebar" role="search"><input id="search-sidebar" class="form-control typeahead" type="text" placeholder="Loading search..." autocomplete="off"/></form></header><ol id="sidebar-nav" class="breadcrumbs gt-separated dark hidden-l"><li><a href="/packages/flutter_swipe_detector">flutter_swipe_detector package</a></li><li class="self-crumb">documentation</li></ol> <!-- The search input and breadcrumbs below are only responsively visible at low resolutions. --> <h5 class="hidden-xs"><span class="package-name">flutter_swipe_detector</span> <span class="package-kind">package</span></h5> <ol> <li class="section-title">Libraries</li> <li><a href="flutter_swipe_detector/">flutter_swipe_detector</a></li> </ol> </div><div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right"> </div></main><footer><span class="no-break">flutter_swipe_detector 2.0.0</span></footer><script src="/static/hash-kjnuqhji/dartdoc/resources/highlight.pack.js"></script><script src="/static/hash-kjnuqhji/dartdoc/resources/docs.dart.js"></script></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10