diacritic
0.1.6, released 2 years ago by agilord.com
Removes common accents and diacritical signs from strings.
What it does
Provides a simple function to strip common accents and diacritical marks from a given string, replacing them with equivalent non-accented characters. Useful for normalization, search indexing, or handling text input without special characters.
AI-written summary of version 0.1.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to normalize user input by removing diacritics.
- You are building a search or filtering feature that should ignore accents.
Skip it when
- You need full internationalization or locale-aware collation rules beyond simple character replacement.
Strengths
- Extremely simple and lightweight with no external dependencies.
- Works across all Dart platforms including web, mobile, and desktop.
Weaknesses
- Provides a very narrow, single-purpose functionality.
- Does not handle advanced locale-specific string normalization rules.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:diacritic/diacritic.dart';
main() {
print(removeDiacritics('árvíztűrő tükörfúrógép'));
}Alternatives
Packages that do the same job and could replace diacritic.
- validators2
String validation and sanitization for Dart.
83Compare - remove_diacritic
Package to replace diacritics and accents with equivalent characters.
40Compare - flutter_charset_detector
Detect and decode the character encoding of text bytes automatically.
69Compare - remove_emoji
Dart package to remove or replace emojis in text
50Compare
Works with
Packages commonly used together with diacritic: ones it builds on, ones built on it, and its own family.
- country_code_pickerBuilt on diacriticA Flutter widget for showing a country code selector with search and favorites support.
- stream_chatBuilt on diacriticLow‑level Dart client for Stream Chat API
- stream_chat_flutterBuilt on diacriticFull-featured Flutter UI SDK for Stream Chat, providing ready‑made chat widgets and theming.
- bdd_widget_testBuilt on diacriticGenerate Flutter widget tests from Gherkin feature files
- phone_form_fieldBuilt on diacriticFlutter phone input FormField with internationalization, validation, and country selector.
- downloadsfolderBuilt on diacriticRetrieve download folder paths and copy files into downloads on mobile and desktop.
- phone_inputBuilt on diacriticThis package is designed to simplify the process of capturing phone numbers from users.
- search_app_bar_pageBuilt on diacriticA search page widget built for minimal work and good performance.