Skip to content
pubscout

interact

2.2.0, released 4 years ago by frenco.dev

Customizable interactive command-line components for Dart

$ flutter pub add interact
Source repository

What it does

Provides a collection of command-line components like text and password inputs, radio or select lists, checkboxes, spinners, and progress bars. Supports customizable themes and exception handling to restore terminal defaults.

AI-written summary of version 2.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Building command-line applications in Dart that require user interaction
  • Displaying spinners and progress bars in terminal scripts

Skip it when

  • Developing graphical user interfaces for Flutter apps
  • Writing code for platforms other than desktop/CLI environments

Strengths

  • Easy to use and customizable CLI components
  • Supports validation for inputs
  • Provides multi-spinner and multi-progress utilities

Weaknesses

  • Limited to command-line and terminal use cases
  • Using multiple spinners concurrently requires special care via MultiSpinner to avoid breaking rendering

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3

not documented

final languages = ['Rust', 'Dart', 'TypeScript'];
final selection = Select(
  prompt: 'Your favorite programming language',
  options: languages,
).interact();

print('${languages[selection]}');

Alternatives

Packages that do the same job and could replace interact.

  • cli_util

    Utilities to help build Dart command-line apps, find the SDK, and display progress.

  • cli_tools

    Utilities for building command‑line interfaces, including argument parsing, analytics, and progress reporting.

  • git

    Git command line wrapper for inspecting and manipulating local Git repositories.

  • cli_completion

    Completion functionality for Dart Command-Line Interfaces built using CommandRunner.

Works with

Packages commonly used together with interact: ones it builds on, ones built on it, and its own family.