DashboardGadgetSettings.fromJson constructor

DashboardGadgetSettings.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory DashboardGadgetSettings.fromJson(Map<String, Object?> json) {
  return DashboardGadgetSettings(
    color: json[r'color'] as String?,
    ignoreUriAndModuleKeyValidation:
        json[r'ignoreUriAndModuleKeyValidation'] as bool? ?? false,
    moduleKey: json[r'moduleKey'] as String?,
    position: json[r'position'] != null
        ? DashboardGadgetPosition.fromJson(
            json[r'position']! as Map<String, Object?>)
        : null,
    title: json[r'title'] as String?,
    uri: json[r'uri'] as String?,
  );
}