KeyToPath.fromJson constructor

KeyToPath.fromJson(
  1. Map<String, dynamic> json
)

Creates a KeyToPath from JSON data.

Implementation

factory KeyToPath.fromJson(Map<String, dynamic> json) {
  final tempKeyJson = json['key'];
  final tempModeJson = json['mode'];
  final tempPathJson = json['path'];

  final String tempKey = tempKeyJson;
  final int? tempMode = tempModeJson;
  final String tempPath = tempPathJson;

  return KeyToPath(
    key: tempKey,
    mode: tempMode,
    path: tempPath,
  );
}