buildForm method Null safety

  1. @override
Widget buildForm(
  1. BuildContext context,
  2. Map<String, dynamic>? values,
  3. {bool minify = false}
)
override

Implementation

@override
Widget buildForm(
  BuildContext context,
  Map<String, dynamic>? values, {
  bool minify = false,
}) {
  return Column(
    mainAxisSize: MainAxisSize.min,
    children: <Widget>[
      if (minify != true)
        buildHelpSection(
          context,
          TestStepTranslations.atf_help_assert_value,
          minify: minify,
        ),
      buildValuesSection(
        context,
        [
          buildEditText(
            context: context,
            id: 'testableId',
            label: TestStepTranslations.atf_form_widget_id,
            validators: [
              RequiredValidator(),
            ],
            values: values!,
          ),
          SizedBox(height: 16.0),
          buildEditText(
            context: context,
            id: 'value',
            label: TestStepTranslations.atf_form_value,
            values: values,
          ),
          SizedBox(height: 16.0),
          buildDropdown(
            context: context,
            defaultValue: 'true',
            id: 'equals',
            items: [
              'true',
              'false',
            ],
            label: TestStepTranslations.atf_form_equals,
            values: values,
          ),
          SizedBox(height: 16.0),
          buildDropdown(
            context: context,
            defaultValue: 'true',
            id: 'caseSensitive',
            items: [
              'true',
              'false',
            ],
            label: TestStepTranslations.atf_form_case_sensitive,
            values: values,
          ),
          if (minify != true) ...[
            SizedBox(height: 16.0),
            buildTimeoutSection(
              context: context,
              values: values,
            ),
          ],
        ],
        minify: minify,
      ),
    ],
  );
}