mirror of
https://github.com/java-james/flutter_dotenv.git
synced 2025-07-15 05:53:52 +08:00

Allowes to get the variable values casted to the specific type. If the variable does not exist the `fallback` is used. However when also no `fallback` is provided an `AssertionError` is thrown. Furthermore a `FormatException` is thrown when the variable exists but the value can not be casted to the specific type.
44 lines
988 B
Bash
44 lines
988 B
Bash
FOO=foo
|
|
BAR=bar
|
|
FOOBAR=\$FOO${FOO}$BAR
|
|
ESCAPED_DOLLAR_SIGN="\$1000"
|
|
ESCAPED_QUOTE='\''
|
|
|
|
BOOL_TRUE=true
|
|
BOOL_1=1
|
|
BOOL_FALSE=false
|
|
BOOL_0=0
|
|
|
|
INT_42=42
|
|
INT_42_NEGATIVE=-42
|
|
|
|
DOUBLE_13_37=13.37
|
|
DOUBLE_13_37_NEGATIVE=-13.37
|
|
DOUBLE_1e3=1.e3
|
|
DOUBLE_POINT_3=.3
|
|
|
|
BASIC=basic
|
|
|
|
BASIC=basic1
|
|
|
|
# previous line intentionally left blank
|
|
AFTER_LINE=after_line
|
|
EMPTY=
|
|
SINGLE_QUOTES='single_quotes'
|
|
SINGLE_QUOTES_SPACED=' single quotes '
|
|
DOUBLE_QUOTES="double_quotes"
|
|
DOUBLE_QUOTES_SPACED=" double quotes "
|
|
EXPAND_NEWLINES="expand\nnew\nlines"
|
|
DONT_EXPAND_UNQUOTED=dontexpand\nnewlines
|
|
DONT_EXPAND_SQUOTED='dontexpand\nnewlines'
|
|
# COMMENTS=work
|
|
EQUAL_SIGNS=equals==
|
|
RETAIN_INNER_QUOTES={"foo": "bar"}
|
|
RETAIN_LEADING_DQUOTE="retained
|
|
RETAIN_LEADING_SQUOTE='retained
|
|
RETAIN_TRAILING_DQUOTE=retained"
|
|
RETAIN_TRAILING_SQUOTE=retained'
|
|
RETAIN_INNER_QUOTES_AS_STRING='{"foo": "bar"}'
|
|
TRIM_SPACE_FROM_UNQUOTED= some spaced out string
|
|
USERNAME=therealnerdybeast@example.tld
|
|
SPACED_KEY = parsed |