build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Build a widget.

Implementation

@override
Widget build(final BuildContext context) => Cancel(
      child: SimpleScaffold(
        actions: [
          ...widget.actions,
          ElevatedButton(
            onPressed: onSubmit,
            child: widget.icon,
          ),
        ],
        title: widget.title,
        body: Form(
          key: _formKey,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              TextFormField(
                autofocus: true,
                controller: _controller,
                decoration: InputDecoration(
                  label: Text(
                    widget.labelText,
                  ),
                ),
                onFieldSubmitted: (final value) => onSubmit(),
                validator: widget.validator,
              ),
            ],
          ),
        ),
      ),
    );