Dart[1] package to convert a string to a slug, useful for URLs, filenames, IDs and more.

Removes unfavorable characters

Approximates replacements for characters not in the Latin alphabet

Options for a custom delimiter and case sensitivity

import 'package:slugify/slugify.dart'; // Use with default options. String slug = Slugify('Hello, World! Foo Bar'); print(slug); // hello-world-foo-bar // Use with custom options. String slug2 = Slugify('Hello, World! Foo Bar', lowercase: false, delimiter: '🙂'); print(slug2) // Hello🙂World🙂Foo🙂Bar

Name Type Default Description delimiter String "-" Separator between words lowercase bool true Convert text to lowercase

: This package supports Dart 2