v2.0.0
slugify
Converte uma string em um slug. Útil para URLs, nomes de arquivos, IDs e mais.
50Curtidas 70,3 milDownloads em 30 dias135Pontos Pub
AndroidiOSWebmacOSWindowsLinux
Converte uma string em um slug, útil para URLs, nomes de arquivos, IDs e mais
^1.16.4^1.0.0Texto original em inglês. Visite o GitHub para a versão atual.
Converts any String to a slug. Useful for URLs, filenames, IDs, and more.
import 'package:slugify/slugify.dart';
// Use with default options.
var slug = slugify('Hello, World! Foo Bar');
print(slug); // hello-world-foo-bar
// Use with custom options.
var 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 |