Widget build()

in jsonexample/lib/widgets.dart [162:269]


  Widget build(BuildContext context) {
    final localTheme = Theme.of(context).textTheme;
    final boldStyle =
        localTheme.bodyText2!.copyWith(fontWeight: FontWeight.w600);

    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Table(
          columnWidths: const {
            0: IntrinsicColumnWidth(),
            1: FlexColumnWidth(1.0),
          },
          children: [
            TableRow(
              children: [
                Text('aString:', style: boldStyle),
                Text(
                    complexObject.aString != null
                        ? '"${complexObject.aString}"'
                        : 'NULL',
                    style: localTheme.bodyText2),
              ],
            ),
            TableRow(
              children: [
                Text('anInt:', style: boldStyle),
                Text(complexObject.anInt?.toString() ?? 'NULL',
                    style: localTheme.bodyText2),
              ],
            ),
            TableRow(
              children: [
                Text('aDouble:', style: boldStyle),
                Text(complexObject.aDouble?.toString() ?? 'NULL',
                    style: localTheme.bodyText2),
              ],
            ),
            TableRow(
              children: [
                Text('anObject:', style: boldStyle),
                Container(),
              ],
            ),
          ],
        ),
        Padding(
          padding: const EdgeInsets.fromLTRB(24.0, 4.0, 0.0, 4.0),
          child: SimpleObjectView(simpleObject: complexObject.anObject),
        ),
        Table(
          columnWidths: const {
            0: IntrinsicColumnWidth(),
            1: FlexColumnWidth(1.0),
          },
          children: [
            TableRow(
              children: [
                Text('aListOfStrings:', style: boldStyle),
                Text(
                  prettyPrintList(
                      complexObject.aListOfStrings as Iterable<dynamic>?),
                  style: localTheme.bodyText2,
                ),
              ],
            ),
            TableRow(
              children: [
                Text('aListOfInts:', style: boldStyle),
                Text(
                  prettyPrintList(
                      complexObject.aListOfInts as Iterable<dynamic>?),
                  style: localTheme.bodyText2,
                ),
              ],
            ),
            TableRow(
              children: [
                Padding(
                  padding: const EdgeInsets.only(right: 8.0),
                  child: Text('aListOfDoubles:', style: boldStyle),
                ),
                Text(
                  prettyPrintList(
                      complexObject.aListOfDoubles as Iterable<dynamic>?),
                  style: localTheme.bodyText2,
                ),
              ],
            ),
            TableRow(
              children: [
                Text('aListOfObjects:', style: boldStyle),
                Container()
              ],
            ),
          ],
        ),
        Padding(
          padding: const EdgeInsets.only(left: 24.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: _generateSimpleObjectWidgets(
                complexObject.aListOfObjects as Iterable<dynamic>?),
          ),
        ),
      ],
    );
  }