Text constructor

const Text({
  1. @JsonKey(name: 'api_id', includeIfNull: false) String? key,
  2. required String text,
  3. @JsonKey(includeIfNull: false) String? status,
  4. @JsonKey(includeIfNull: false) String? notes,
  5. @JsonKey(includeIfNull: false, fromJson: variablesFromJson, toJson: variablesToJson) List<Variable>? variables,
  6. @JsonKey(includeIfNull: false) Plurals? plurals,
  7. @JsonKey(fromJson: variantsFromJson, includeIfNull: false) Map<String, Text>? variants,
  8. @JsonKey(includeIfNull: false) List<String>? tags,
  9. @JsonKey(includeIfNull: false) @JsonKey(name: 'is_comp') bool? isComp,
  10. @JsonKey(name: 'component_api_id') String? componentId,
})

Implementation

const factory Text({
  /// Viene valorizzato solo se è una chiave di primo livello
  ///
  /// Per le varianti è nullo
  @JsonKey(name: 'api_id', includeIfNull: false)
      String? key,
  required String text,
  @JsonKey(includeIfNull: false)
      String? status,
  @JsonKey(includeIfNull: false)
      String? notes,
  @JsonKey(
    includeIfNull: false,
    fromJson: variablesFromJson,
    toJson: variablesToJson,
  )
      List<Variable>? variables,
  @JsonKey(includeIfNull: false)
      Plurals? plurals,
  @JsonKey(fromJson: variantsFromJson, includeIfNull: false)
      Map<String, Text>? variants,
  @JsonKey(includeIfNull: false)
      List<String>? tags,
  @JsonKey(includeIfNull: false)
  @JsonKey(name: 'is_comp')
      bool? isComp,
  @JsonKey(name: 'component_api_id')
      String? componentId,
}) = _Text;