strings library
Contains some common string kinds such as URL (stringKindForUrl).
Purpose of this library
- Enable better tooling (administration UIs, etc.).
Example
In this example, we use stringKindForUrl.
import 'package:kind/kind.dart';
import 'package:kind/strings.dart';
class Organization extend Entity {
// ...
}
class OrganizationProps extends Props<Organization> {
late Prop<Organization, String> url = declare.required<String>(
id: 1,
name: 'url',
kind: urlStringKind,
);
// ...
}
Constants
- stringKindForEmailAddress → const StringKind
- StringKind for email addresses.
- stringKindForMarkdown → const StringKind
- StringKind for Markdown content.
- stringKindForPhoneNumber → const StringKind
- StringKind for phone numbers.
- stringKindForUrl → const StringKind
- StringKind for URLs.