getContentWidget static method

Widget getContentWidget(
  1. String key,
  2. dynamic value,
  3. TomlViewerConfig config
)

Returns the appropriate widget for displaying the content based on its type.

Implementation

static Widget getContentWidget(
    String key, dynamic value, TomlViewerConfig config) {
  if (value is List) {
    return TomlArrayViewer(
      value,
      key,
      notRoot: true,
      config: config,
    );
  } else {
    return TomlObjectViewer(
      value,
      notRoot: true,
      config: config,
    );
  }
}