Skip to main content
LocalRegex is available on pub.dev and can be easily added to any Dart or Flutter project.

Requirements

LocalRegex requires Dart SDK version 3.0.0 or higher.

Add LocalRegex to your project

You can add LocalRegex to your project using one of the following methods:
flutter pub add localregex
After adding the dependency, run the following command to download the package:
flutter pub get

Import the package

Once installed, import LocalRegex in your Dart files:
import 'package:localregex/localregex.dart';
LocalRegex uses static methods, so you don’t need to create an instance of the class. Simply import the package and start using the validation methods.

Verify installation

To verify that LocalRegex is installed correctly, create a simple test:
import 'package:localregex/localregex.dart';

void main() {
  final isValid = LocalRegex.isZimMobile('0777123456');
  print('Is valid Zim mobile: $isValid');
}
If this code runs without errors and prints true, you’re all set!

Next steps

Quickstart

Learn how to validate and format Zimbabwe-specific patterns

Build docs developers (and LLMs) love