LegalDocument enum

The public legal pages.

Each one ships with the web build as web/<fileName> (English) and web/<language>/<fileName> for each of translations. A build links to the site of its own environment (host), so the pages it opens are the ones its environment's web deploy published, from the same commit. test/legal/legal_texts_consistency_test.dart checks that the files exist, stay in step with the in-app terms, and that hostFor matches the deploy targets.

Inheritance
Available extensions

Values

terms → const LegalDocument

Terms & Conditions: the web mirror of the in-app terms.

const LegalDocument('terms.html')
privacy → const LegalDocument

Privacy Policy. Only published on the web; the app links to it.

const LegalDocument('privacy.html')

Properties

fileName → String
File name of the English page under web/.
final
hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pathIn(String languageCode) → String
The page's path under web/, and on the public site, in languageCode: fr/terms.html for French, terms.html for English and for every language without a translation.
toString() → String
A string representation of this object.
inherited
urlFor(BuildContext context) → Uri
Public URL of the page in the app's current language: the one the user picked in Settings, or the device's.
urlIn(String languageCode, {String appEnv = EnvConfig.appEnv}) → Uri
Public URL of the page in languageCode (see pathIn), on the site of appEnv, this build's environment unless given (see hostFor).

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

host → String
Host of the public site that serves this build's pages (see hostFor).
no setter

Static Methods

hostFor(String appEnv) → String
Host of the public site for a build of appEnv (APP_ENV): the dutato-staging Cloudflare Pages project for staging (CI deploys it on every merge to main), and the prod dutato project otherwise (./dto release and ./dto deploy web).

Constants

translations → const Set<String>
Languages with their own copy of every page, under web/<language>/. Any other language gets the English page at the site root.
values → const List<LegalDocument>
A constant List of the values in this enum, in order of their declaration.