JSeenTree constructor

JSeenTree({
  1. Key? key,
  2. required dynamic json,
  3. bool shouldParse = true,
  4. bool expandAll = true,
  5. double indent = 10,
  6. JSeenTheme theme = const JSeenTheme(),
  7. Widget errorWidget = kErrorWidget,
})

Implementation

JSeenTree({
  Key? key,
  required this.json,
  this.shouldParse = true,
  this.expandAll = true,
  this.indent = 10,
  this.theme = const JSeenTheme(),
  this.errorWidget = kErrorWidget,
})  : assert(
          json is String && shouldParse || json is! String && !shouldParse,
          "[shouldParse] must be true is [json] is a String\n"
          "[shouldParse] must be false if [json] is not a String"),
      super(
          key: key ??
              ValueKey(
                shouldParse.hashCode ^
                    expandAll.hashCode ^
                    json.hashCode ^
                    indent.hashCode ^
                    errorWidget.hashCode,
              ));