flutter_regex
0.0.3, released 3 years ago by shirsh.dev
Collection of 1000+ regular expression patterns and extensions for string validation in Flutter.
What it does
Provides a comprehensive suite of regular expression patterns and string extension methods to validate data types such as emails, URLs, credit cards, country IDs, currencies, colors, and more. It simplifies common validation tasks directly on strings.
AI-written summary of version 0.0.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need built-in regular expressions for standard inputs like email, phone numbers, or passwords.
- You require regex patterns for specialized formats like cryptocurrency addresses, stock exchange codes, or country-specific IDs.
Skip it when
- You prefer writing custom validation logic or standard Dart RegExp objects for minimal app size.
- You need complex non-regex parsing solutions.
Strengths
- Extensive library covering 1000+ regex patterns including country IDs and currencies.
- Convenient extension methods directly on String objects for quick validation.
Weaknesses
- Large number of regexes might be overkill if only a few patterns are needed.
- Lack of detailed documentation on every single pattern outside of basic examples.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:flutter_regex/flutter_regex.dart';
String email = 'abc@gmail.com';
bool isEmailMatch = email.isEmail();Alternatives
Packages that do the same job and could replace flutter_regex.
- zxing2
Pure Dart library for encoding and decoding QR codes.
75Compare - jiffy
Parse, manipulate, query, and format dates and times in Dart and Flutter.
70Compare - date_time
Provides Date, Time, and range classes with comparison and manipulation utilities.
49Compare - emoji_flag_converter
Convert alpha-2 country codes to emoji flags in Dart.
47Compare