-
Notifications
You must be signed in to change notification settings - Fork 1
/
env.g.dart
432 lines (383 loc) · 10.9 KB
/
env.g.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
// coverage:ignore-file
// ignore_for_file: camel_case_types, non_constant_identifier_names, prefer_single_quotes, avoid_escaping_inner_quotes
// ======================================
// GENERATED CODE - DO NOT MODIFY BY HAND
// ======================================
class Env {
Env(this.env);
final String env;
/// [$] from .env
static final Env $ = Env('');
/// [dev] from .env.dev
static final EnvDev dev = EnvDev();
/// [prod] from .env.prod
static final EnvProd prod = EnvProd();
/// [staging] from .env.staging
static final EnvStaging staging = EnvStaging();
/// [$active] currently active ".env" file.
static Env $active = prod;
String _INT = '90898';
String _SIGNED_INT = '-8898';
String _DOUBLE = '3.1415926';
double _SIGNED_DOUBLE = -0.123;
bool _BOOL = false;
String _STRING = "AAA";
String _NO_QUOTE_STRING =
"ABC9shj\"\\'\\''';';;;'\\n\\r\\thttps://google.com";
String _SINGLE_QUOTE_STRING = "'AB\\r\\n\\ta\\'\\\"C'";
String _DOUBLE_QUOTE_STRING = "ABC";
String _JSON = "{\"a\":1,\"b\":[1,true,\"hello\"]}";
String _EMPTY = '';
String _EMPTY_COMMENT = '';
double? _QWERTY;
double? _ASDF;
double? _POIU;
double? _LKJH;
double? _MNB;
double? _ZXCV;
/// From .env
/// >> INT = 90898
/// type int
/// ========================================
/// From .env.dev
/// >> INT = asd
String get INT => _INT;
/// From .env
/// >> SIGNED_INT = -8898
/// ========================================
/// From .env.dev
/// >> SIGNED_INT = -asd
String get SIGNED_INT => _SIGNED_INT;
/// From .env
/// >> DOUBLE = 3.1415926
/// type double
/// ========================================
/// From .env.dev
/// >> DOUBLE = 3.asd
String get DOUBLE => _DOUBLE;
/// From .env
/// >> SIGNED_DOUBLE = -.123
double get SIGNED_DOUBLE => _SIGNED_DOUBLE;
/// From .env
/// >> BOOL = false
/// type bool
/// ========================================
/// From .env.dev
/// >> BOOL = true
/// covered
/// ========================================
/// From .env.prod
/// >> BOOL = true
/// covered
/// ========================================
/// From .env.staging
/// >> BOOL = true
/// covered
bool get BOOL => _BOOL;
/// From .env
/// >> STRING = AAA
/// type string
String get STRING => _STRING;
/// From .env
/// >> NO_QUOTE_STRING = ABC9shj"\'\''';';;;'\n\r\thttps://google.com
String get NO_QUOTE_STRING => _NO_QUOTE_STRING;
/// From .env
/// >> SINGLE_QUOTE_STRING = 'AB\r\n\ta\'\"C'
String get SINGLE_QUOTE_STRING => _SINGLE_QUOTE_STRING;
/// From .env
/// >> DOUBLE_QUOTE_STRING = "ABC"
String get DOUBLE_QUOTE_STRING => _DOUBLE_QUOTE_STRING;
/// From .env
/// >> JSON = {"a":1,"b":[1,true,"hello"]}
String get JSON => _JSON;
/// From .env
/// >> EMPTY =
String get EMPTY => _EMPTY;
/// From .env
/// >> EMPTY_COMMENT =
/// EMPTY
String get EMPTY_COMMENT => _EMPTY_COMMENT;
/// From .env.dev
/// >> QWERTY = -0.343
/// specical
/// ========================================
/// From .env.prod
/// >> QWERTY = -0.343
/// specical
/// ========================================
/// From .env.staging
/// >> QWERTY = -0.343
/// specical
double? get QWERTY => _QWERTY;
/// From .env.dev
/// >> ASDF = -0.343
/// ========================================
/// From .env.prod
/// >> ASDF = -0.343
/// ========================================
/// From .env.staging
/// >> ASDF = -0.343
double? get ASDF => _ASDF;
/// From .env.prod
/// >> POIU = -0.343
double? get POIU => _POIU;
/// From .env.prod
/// >> LKJH = -0.343
double? get LKJH => _LKJH;
/// From .env.prod
/// >> MNB = -0.343
double? get MNB => _MNB;
/// From .env.staging
/// >> ZXCV = -0.343
double? get ZXCV => _ZXCV;
List<MapEntry<String, dynamic>> get entries => [
MapEntry('INT', INT),
MapEntry('SIGNED_INT', SIGNED_INT),
MapEntry('DOUBLE', DOUBLE),
MapEntry('SIGNED_DOUBLE', SIGNED_DOUBLE),
MapEntry('BOOL', BOOL),
MapEntry('STRING', STRING),
MapEntry('NO_QUOTE_STRING', NO_QUOTE_STRING),
MapEntry('SINGLE_QUOTE_STRING', SINGLE_QUOTE_STRING),
MapEntry('DOUBLE_QUOTE_STRING', DOUBLE_QUOTE_STRING),
MapEntry('JSON', JSON),
MapEntry('EMPTY', EMPTY),
MapEntry('EMPTY_COMMENT', EMPTY_COMMENT),
MapEntry('QWERTY', QWERTY),
MapEntry('ASDF', ASDF),
MapEntry('POIU', POIU),
MapEntry('LKJH', LKJH),
MapEntry('MNB', MNB),
MapEntry('ZXCV', ZXCV),
];
void overrideValue({
String? INT,
String? SIGNED_INT,
String? DOUBLE,
double? SIGNED_DOUBLE,
bool? BOOL,
String? STRING,
String? NO_QUOTE_STRING,
String? SINGLE_QUOTE_STRING,
String? DOUBLE_QUOTE_STRING,
String? JSON,
String? EMPTY,
String? EMPTY_COMMENT,
double? QWERTY,
double? ASDF,
double? POIU,
double? LKJH,
double? MNB,
double? ZXCV,
}) {
_INT = INT ?? _INT;
_SIGNED_INT = SIGNED_INT ?? _SIGNED_INT;
_DOUBLE = DOUBLE ?? _DOUBLE;
_SIGNED_DOUBLE = SIGNED_DOUBLE ?? _SIGNED_DOUBLE;
_BOOL = BOOL ?? _BOOL;
_STRING = STRING ?? _STRING;
_NO_QUOTE_STRING = NO_QUOTE_STRING ?? _NO_QUOTE_STRING;
_SINGLE_QUOTE_STRING = SINGLE_QUOTE_STRING ?? _SINGLE_QUOTE_STRING;
_DOUBLE_QUOTE_STRING = DOUBLE_QUOTE_STRING ?? _DOUBLE_QUOTE_STRING;
_JSON = JSON ?? _JSON;
_EMPTY = EMPTY ?? _EMPTY;
_EMPTY_COMMENT = EMPTY_COMMENT ?? _EMPTY_COMMENT;
_QWERTY = QWERTY ?? _QWERTY;
_ASDF = ASDF ?? _ASDF;
_POIU = POIU ?? _POIU;
_LKJH = LKJH ?? _LKJH;
_MNB = MNB ?? _MNB;
_ZXCV = ZXCV ?? _ZXCV;
}
void overrideValueFromJson(Map json) {
final INT = json['INT'];
final SIGNED_INT = json['SIGNED_INT'];
final DOUBLE = json['DOUBLE'];
final SIGNED_DOUBLE = json['SIGNED_DOUBLE'];
final BOOL = json['BOOL'].toString();
final STRING = json['STRING'];
final NO_QUOTE_STRING = json['NO_QUOTE_STRING'];
final SINGLE_QUOTE_STRING = json['SINGLE_QUOTE_STRING'];
final DOUBLE_QUOTE_STRING = json['DOUBLE_QUOTE_STRING'];
final JSON = json['JSON'];
final EMPTY = json['EMPTY'];
final EMPTY_COMMENT = json['EMPTY_COMMENT'];
final QWERTY = json['QWERTY'];
final ASDF = json['ASDF'];
final POIU = json['POIU'];
final LKJH = json['LKJH'];
final MNB = json['MNB'];
final ZXCV = json['ZXCV'];
overrideValue(
INT: INT,
SIGNED_INT: SIGNED_INT,
DOUBLE: DOUBLE,
SIGNED_DOUBLE:
SIGNED_DOUBLE == null ? null : double.parse(SIGNED_DOUBLE.toString()),
BOOL: BOOL == 'true' || BOOL == 'false' ? BOOL == 'true' : null,
STRING: STRING,
NO_QUOTE_STRING: NO_QUOTE_STRING,
SINGLE_QUOTE_STRING: SINGLE_QUOTE_STRING,
DOUBLE_QUOTE_STRING: DOUBLE_QUOTE_STRING,
JSON: JSON,
EMPTY: EMPTY,
EMPTY_COMMENT: EMPTY_COMMENT,
QWERTY: QWERTY == null ? null : double.parse(QWERTY.toString()),
ASDF: ASDF == null ? null : double.parse(ASDF.toString()),
POIU: POIU == null ? null : double.parse(POIU.toString()),
LKJH: LKJH == null ? null : double.parse(LKJH.toString()),
MNB: MNB == null ? null : double.parse(MNB.toString()),
ZXCV: ZXCV == null ? null : double.parse(ZXCV.toString()),
);
}
Map<String, dynamic> toJson() {
return {
'INT': INT,
'SIGNED_INT': SIGNED_INT,
'DOUBLE': DOUBLE,
'SIGNED_DOUBLE': SIGNED_DOUBLE,
'BOOL': BOOL,
'STRING': STRING,
'NO_QUOTE_STRING': NO_QUOTE_STRING,
'SINGLE_QUOTE_STRING': SINGLE_QUOTE_STRING,
'DOUBLE_QUOTE_STRING': DOUBLE_QUOTE_STRING,
'JSON': JSON,
'EMPTY': EMPTY,
'EMPTY_COMMENT': EMPTY_COMMENT,
'QWERTY': QWERTY,
'ASDF': ASDF,
'POIU': POIU,
'LKJH': LKJH,
'MNB': MNB,
'ZXCV': ZXCV,
};
}
@override
String toString({
int padRight = 19,
String separator = ' : ',
}) {
final sb = StringBuffer();
sb.write('INT'.padRight(padRight));
sb.write(separator);
sb.writeln(INT);
sb.write('SIGNED_INT'.padRight(padRight));
sb.write(separator);
sb.writeln(SIGNED_INT);
sb.write('DOUBLE'.padRight(padRight));
sb.write(separator);
sb.writeln(DOUBLE);
sb.write('SIGNED_DOUBLE'.padRight(padRight));
sb.write(separator);
sb.writeln(SIGNED_DOUBLE);
sb.write('BOOL'.padRight(padRight));
sb.write(separator);
sb.writeln(BOOL);
sb.write('STRING'.padRight(padRight));
sb.write(separator);
sb.writeln(STRING);
sb.write('NO_QUOTE_STRING'.padRight(padRight));
sb.write(separator);
sb.writeln(NO_QUOTE_STRING);
sb.write('SINGLE_QUOTE_STRING'.padRight(padRight));
sb.write(separator);
sb.writeln(SINGLE_QUOTE_STRING);
sb.write('DOUBLE_QUOTE_STRING'.padRight(padRight));
sb.write(separator);
sb.writeln(DOUBLE_QUOTE_STRING);
sb.write('JSON'.padRight(padRight));
sb.write(separator);
sb.writeln(JSON);
sb.write('EMPTY'.padRight(padRight));
sb.write(separator);
sb.writeln(EMPTY);
sb.write('EMPTY_COMMENT'.padRight(padRight));
sb.write(separator);
sb.writeln(EMPTY_COMMENT);
sb.write('QWERTY'.padRight(padRight));
sb.write(separator);
sb.writeln(QWERTY);
sb.write('ASDF'.padRight(padRight));
sb.write(separator);
sb.writeln(ASDF);
sb.write('POIU'.padRight(padRight));
sb.write(separator);
sb.writeln(POIU);
sb.write('LKJH'.padRight(padRight));
sb.write(separator);
sb.writeln(LKJH);
sb.write('MNB'.padRight(padRight));
sb.write(separator);
sb.writeln(MNB);
sb.write('ZXCV'.padRight(padRight));
sb.write(separator);
sb.writeln(ZXCV);
return sb.toString();
}
}
class EnvDev extends Env {
EnvDev() : super('dev') {
// From .env.dev
// >> BOOL = true
// covered
_BOOL = true;
// From .env.dev
// >> INT = asd
_INT = "asd";
// From .env.dev
// >> SIGNED_INT = -asd
_SIGNED_INT = "-asd";
// From .env.dev
// >> DOUBLE = 3.asd
_DOUBLE = "3.asd";
// From .env.dev
// >> QWERTY = -0.343
// specical
_QWERTY = -0.343;
// From .env.dev
// >> ASDF = -0.343
_ASDF = -0.343;
}
}
class EnvProd extends Env {
EnvProd() : super('prod') {
// From .env.prod
// >> BOOL = true
// covered
_BOOL = true;
// From .env.prod
// >> QWERTY = -0.343
// specical
_QWERTY = -0.343;
// From .env.prod
// >> ASDF = -0.343
_ASDF = -0.343;
// From .env.prod
// >> POIU = -0.343
_POIU = -0.343;
// From .env.prod
// >> LKJH = -0.343
_LKJH = -0.343;
// From .env.prod
// >> MNB = -0.343
_MNB = -0.343;
}
}
class EnvStaging extends Env {
EnvStaging() : super('staging') {
// From .env.staging
// >> BOOL = true
// covered
_BOOL = true;
// From .env.staging
// >> QWERTY = -0.343
// specical
_QWERTY = -0.343;
// From .env.staging
// >> ASDF = -0.343
_ASDF = -0.343;
// From .env.staging
// >> ZXCV = -0.343
_ZXCV = -0.343;
}
}