selectable
0.7.5, released 7 days ago by ronbooth.com
A widget that enables text selection across multiple text widgets.
What it does
Enables text selection spanning across multiple text and rich text widgets with platform-adaptive handles and popup menus. Provides a controller to listen to and programmatically modify selections.
AI-written summary of version 0.7.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need text selection to span across multiple separate Text or RichText widgets.
- You want platform-adaptive selection menus and handles before using Flutter's SelectableRegion.
Skip it when
- Flutter's native SelectableRegion already fits your requirements.
- Your application requires extensive legacy framework libraries and you cannot provide material_ui or cupertino_ui themes.
Strengths
- Cross-widget text selection spanning paragraphs.
- Customizable appearance, popup menu items, and selection painters.
- Includes a controller for programmatic selection and event listening.
Weaknesses
- Predates Flutter's native SelectableRegion class.
- Requires explicit material_ui or cupertino_ui packages and localizations configuration.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
Add selectable to pubspec.yaml and wrap target text widgets inside a Selectable widget.
Selectable(
child: Column(
children: [
Text('First text block'),
Text('Second text block'),
],
),
)Alternatives
Packages that do the same job and could replace selectable.
- gpt_markdown
Powerful Flutter Markdown and LaTeX renderer built for AI streaming outputs.
94Compare - shimmer
Paints a moving highlight over skeleton placeholders and call-to-action text.
83Compare - flutter_md
Fast Markdown parser and canvas renderer for Flutter with text selection and streaming.
82Compare - extended_text
An extension of Flutter's official Text widget for special inline content and custom overflow.
60Compare
Works with
Packages commonly used together with selectable: ones it builds on, ones built on it, and its own family.
- charactersselectable depends on itUnicode and grapheme cluster aware string manipulation operations for Dart.
- url_launcherselectable depends on itFlutter plugin for launching URLs across mobile, desktop, and web platforms.
- equatableselectable depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- material_uiselectable depends on itOfficial Flutter Material UI library implementing Google’s Material Design system.
- cupertino_uiselectable depends on itOfficial Flutter Cupertino design library implementing Apple HIG iOS and macOS user interfaces.
- float_columnselectable depends on itBuilds a vertical column where text wraps around floated widgets, similar to CSS float.
- widget_with_codeviewBuilt on selectableA widget that displays a widget alongside its source code side-by-side.