swipe_path_typer 1.0.1 copy "swipe_path_typer: ^1.0.1" to clipboard
swipe_path_typer: ^1.0.1 copied to clipboard

A swipe-based typing widget for Flutter that mimics gesture typing on mobile keyboards. Ideal for games, word puzzles, or creative input mechanics.

swipe_path_typer #

A swipe-based typing widget for Flutter, mimicking the gesture typing experience of modern mobile keyboards like Gboard or SwiftKey.

Ideal for games, puzzles, and creative UIs that need swipe input on a grid of characters.


โœจ Features #

  • ๐Ÿ“ฑ Swipe over tiles to form words
  • ๐Ÿ”€ Sharp turn detection for smart letter selection
  • ๐Ÿ‘† Tap support (with optional auto-complete on tap)
  • ๐ŸŽจ Fully customizable tile UI
  • ๐Ÿงฑ Adjustable layout, spacing, and interaction
  • ๐Ÿ–Œ๏ธ Painted swipe trail (customizable color and thickness)
  • ๐Ÿ–ฑ๏ธ Desktop/web mouse support

๐Ÿš€ Usage #

Basic #

SwipePathTyper(
  tiles: ['h', 'e', 'l', 'l', 'o'],
  onWordCompleted: (word) {
    print('User typed: $word');
  },
)

Custom Tile Example #

tileBuilder: (context, letter, isSelected) {
  return Container(
    padding: const EdgeInsets.all(12),
    decoration: BoxDecoration(
      color: isSelected ? Colors.blue : Colors.grey[200],
      borderRadius: BorderRadius.circular(10),
    ),
    child: Text(
      letter.toUpperCase(),
      style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
    ),
  );
},

โš™๏ธ Parameters #

Parameter Type Description
tiles List<String> The list of characters to render as tiles
onWordCompleted ValueChanged<String> Called when a word is completed via swipe or tap
tileBuilder TileBuilder? Optional builder to customize tile UI
columnCount int Number of tiles per row (default: 5)
simpleTapMode bool Taps immediately complete a word (default: true)
horizontalTileSpacing double Horizontal space between tiles
verticalTileSpacing double Vertical space between tile rows
padding EdgeInsets Padding around the entire widget
onPanUpdate Function(DragUpdateDetails)? Called during a swipe
onPanEnd Function(DragEndDetails)? Called when a swipe ends
onTapDown Function(int)? Called when a tile is tapped down
onTapUp Function(int)? Called when a tile is tapped up
widgetHitTestBehavior HitTestBehavior Behavior for the gesture container
tileHitTestBehavior HitTestBehavior Behavior for mouse hover on tiles
tileCursor SystemMouseCursor Cursor to use on hover (e.g., click)
swipeTrailColor Color Color of the swipe trail
swipeTrailStrokeWidth double Thickness of the swipe trail line

๐Ÿงช Example #

A working example is available in /example/main.dart.


๐Ÿ“ฆ Installation #

Add to your pubspec.yaml:

dependencies:
  swipe_path_typer: ^1.0.1

๐Ÿ“„ License #

MIT ยฉ 2025 [Your Name or Studio]

0
likes
0
points
213
downloads

Publisher

unverified uploader

Weekly Downloads

A swipe-based typing widget for Flutter that mimics gesture typing on mobile keyboards. Ideal for games, word puzzles, or creative input mechanics.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on swipe_path_typer