render method

Widget render(
  1. BuildContext context,
  2. WhyInputState state
)

Implementation

Widget render(BuildContext context, WhyInputState state) {
  var tt = Theme.of(context).textTheme;

  return Column(
    //spacing: gap,
    crossAxisAlignment: CrossAxisAlignment.start,
    children: [
      Text(
        state.widget.question.whyConfig?.label ?? "Pourquoi ?",
        style: Theme.of(context).textTheme.bodyMedium?.copyWith(
              fontWeight: FontWeight.bold,
            ),
      ),
      Row(
        children: [
          Expanded(
            child: OwlnextInput(
              text: state.whyValue,
              suffixIcon: const SizedBox(),
              hintText: state.widget.question.whyConfig?.placeholder,
              onChanged: state.onChange,
              isMandatory: state.widget.question.whyConfig?.isMandatory ?? true,
              inputDecoration: InputDecoration(
                hintText: state.widget.question.other?.placeholder,
                hintStyle: tt.bodySmall?.copyWith(
                  color: Colors.grey,
                ),
                enabledBorder: const UnderlineInputBorder(
                  borderSide: BorderSide(color: Colors.grey, width: 1.0),
                ),
                focusedBorder: UnderlineInputBorder(
                  borderSide: BorderSide(color: Theme.of(context).colorScheme.primary, width: 2.0),
                ),
                border: const UnderlineInputBorder(),
              ),

              //enabled: state.widget.question.why?.enabled,
              //minimumLines: state.widget.question.whyConfig?.minimumInputLines ?? state.widget.minimumInputLines,
            ),
          ),
        ],
      ),
    ],
  );
}