SwayConfig class

Sway project configuration.

Constructors

SwayConfig({String baseLocale = 'en', String localeDir = 'lib/i18n', String outputFile = 'lib/i18n/sway.g.dart', String fallbackStrategy = 'baseLocale'})
Creates a SwayConfig.
const
SwayConfig.load([String path = 'lib/i18n/sway.config.json'])
Loads config from path, or returns defaults if missing.
factory

Properties

baseLocale String
Schema-of-truth locale code.
final
fallbackStrategy String
baseLocale or key.
final
hashCode int
The hash code for this object.
no setterinherited
localeDir String
Directory containing .sway.json files.
final
outputFile String
Generated Dart output path.
final
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
toString() String
A string representation of this object.
inherited

Operators

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

Constants

defaults → const SwayConfig
Default config used when no file is present.