borderFromJSON function

Border? borderFromJSON(
  1. ThemeData? theme,
  2. Map<String, dynamic>? json, [
  3. Color? defaultSideColor,
  4. Border? defaultBorder,
])

Implementation

Border? borderFromJSON(ThemeData? theme, Map<String, dynamic>? json,
    [Color? defaultSideColor, Border? defaultBorder]) {
  if (json == null) {
    return defaultBorder;
  }
  return Border(
      top: borderSideFromJSON(theme, json['t'], defaultSideColor) ??
          BorderSide.none,
      right: borderSideFromJSON(theme, json['r'], defaultSideColor) ??
          BorderSide.none,
      bottom: borderSideFromJSON(theme, json['b'], defaultSideColor) ??
          BorderSide.none,
      left: borderSideFromJSON(theme, json['l'], defaultSideColor) ??
          BorderSide.none);
}