CroppingAppearanceConfiguration.fromJson constructor

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

Implementation

factory CroppingAppearanceConfiguration.fromJson(Map<String, dynamic> json) =>
    CroppingAppearanceConfiguration(
      statusBarMode: json.containsKey("statusBarMode")
          ? StatusBarMode.values.byName(json["statusBarMode"] as String)
          : StatusBarMode.LIGHT,
      navigationBarMode: json.containsKey("navigationBarMode")
          ? NavigationBarMode.values
              .byName(json["navigationBarMode"] as String)
          : NavigationBarMode.LIGHT,
      topBarBackgroundColor: json.containsKey("topBarBackgroundColor")
          ? ScanbotColor(json["topBarBackgroundColor"] as String)
          : ScanbotColor("?sbColorPrimary"),
      bottomBarBackgroundColor: json.containsKey("bottomBarBackgroundColor")
          ? ScanbotColor(json["bottomBarBackgroundColor"] as String)
          : ScanbotColor("?sbColorPrimary"),
      orientationLockMode: json.containsKey("orientationLockMode")
          ? OrientationLockMode.values
              .byName(json["orientationLockMode"] as String)
          : OrientationLockMode.NONE,
    );