fbmobile/lib/core/models/rest/config.dart

31 lines
776 B
Dart
Raw Permalink Normal View History

2021-02-02 14:33:23 +00:00
import 'package:json_annotation/json_annotation.dart';
part 'config.g.dart';
@JsonSerializable()
class Config {
@JsonKey(name: "upload_max_size", required: true)
final num uploadMaxSize;
@JsonKey(name: "max_files_per_request", required: true)
final num maxFilesPerRequest;
@JsonKey(name: "max_input_vars", required: true)
final num maxInputVars;
@JsonKey(name: "request_max_size", required: true)
final num requestMaxSize;
Config(
{required this.uploadMaxSize,
required this.maxFilesPerRequest,
required this.maxInputVars,
required this.requestMaxSize});
2021-02-02 14:33:23 +00:00
// JSON Init
factory Config.fromJson(Map<String, dynamic> json) => _$ConfigFromJson(json);
// JSON Export
Map<String, dynamic> toJson() => _$ConfigToJson(this);
}