GSForm.singleSection constructor

GSForm.singleSection(
  1. BuildContext context, {
  2. Key? key,
  3. GSFormStyle? style,
  4. required List<Widget> fields,
})

Implementation

GSForm.singleSection(BuildContext context, {Key? key, this.style, required this.fields}) : super(key: key) {
  style ??= GSFormUtils.checkIfDarkModeEnabled(context)
      ? style ?? GSFormStyle.singleSectionFormDefaultDarkStyle
      : GSFormStyle.singleSectionFormDefaultStyle;
  sections = [
    GSSection(
      style: style,
      sectionTitle: null,
      fields: fields,
    )
  ];
  GSForm.multiSection(
    context,
    style: style,
    sections: sections,
  );
}