trphoenix
2018-11-12 29fbfc5dd1d55d189f23eb6d32f000252f92985f
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
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
 
// GENERATED CODE - DO NOT MODIFY BY HAND
 
// **************************************************************************
// _CheckedGenerator
// **************************************************************************
 
// ignore_for_file: annotate_overrides
 
import 'package:json_annotation/json_annotation.dart';
 
import 'default_value_interface.dart' as dvi hide Greek;
import 'default_value_interface.dart' show Greek;
 
part 'default_value.checked.g.dart';
 
const _intValue = 42;
 
dvi.DefaultValue fromJson(Map<String, dynamic> json) =>
    _$DefaultValueFromJson(json);
 
@JsonSerializable(
  anyMap: true,
  checked: true,
)
class DefaultValue implements dvi.DefaultValue {
  @JsonKey(defaultValue: true)
  bool fieldBool;
 
  @JsonKey(defaultValue: 'string', includeIfNull: false)
  String fieldString;
 
  @JsonKey(defaultValue: _intValue)
  int fieldInt;
 
  @JsonKey(defaultValue: 3.14)
  double fieldDouble;
 
  @JsonKey(defaultValue: [])
  List fieldListEmpty;
 
  @JsonKey(defaultValue: {})
  Map fieldMapEmpty;
 
  @JsonKey(defaultValue: [1, 2, 3])
  List<int> fieldListSimple;
 
  @JsonKey(defaultValue: {'answer': 42})
  Map<String, int> fieldMapSimple;
 
  @JsonKey(defaultValue: {
    'root': ['child']
  })
  Map<String, List<String>> fieldMapListString;
 
  @JsonKey(defaultValue: Greek.beta)
  Greek fieldEnum;
 
  DefaultValue();
 
  factory DefaultValue.fromJson(Map<String, dynamic> json) =>
      _$DefaultValueFromJson(json);
 
  Map<String, dynamic> toJson() => _$DefaultValueToJson(this);
}