build method

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

Apply styles and build Text as Widget

Example usage:

NikuTextField("Label")
  .border(
    OutlineInputBorder(
      borderSide: BorderSide(
        width: 2
      )
    )
  )
  .focusedBorder(OutlineInputBorder(
    borderSide: BorderSide(
      color: Colors.blue,
      width: 2)
    )
  )

Implementation

@override
build(context) => internalBuild(
      TextFormField(
        key: key,
        controller: _controller,
        style: TextStyle(
          color: _base_color,
          backgroundColor: _base_backgroundColor,
          fontSize: _base_fontSize,
          fontWeight: _base_fontWeight,
          fontStyle: _base_fontStyle,
          letterSpacing: _base_letterSpacing,
          wordSpacing: _base_wordSpacing,
          height: _base_height,
          foreground: _base_foreground,
          background: _base_background,
          shadows: _base_shadows,
          fontFeatures: _base_fontFeatures,
          decoration: _base_textDecoration,
          decorationColor: _base_textDecorationColor,
          decorationThickness: _base_textDecorationThickness,
          fontFamily: _base_fontFamily,
          fontFamilyFallback: _base_fontFamilyFallback,
          textBaseline: _base_textBaseline,
        ),
        decoration: InputDecoration(
          icon: _input_icon,
          labelText: _input_labelText,
          helperText: _input_helperText,
          helperMaxLines: _input_helperMaxLines,
          hintText: _input_hintText,
          hintMaxLines: _input_hintMaxLines,
          errorText: _input_errorText,
          errorMaxLines: _input_errorMaxLines,
          floatingLabelBehavior: _input_floatingLabelBehavior,
          isCollapsed: _input_isCollapsed,
          isDense: _input_isDense,
          contentPadding: _input_contentPadding,
          prefixIcon: _input_prefixIcon,
          prefixIconConstraints: _input_prefixIconConstraints,
          prefix: _input_prefix,
          prefixText: _input_prefixText,
          suffixIcon: _input_suffixIcon,
          suffix: _input_suffix,
          suffixText: _input_suffixText,
          suffixIconConstraints: _input_suffixIconConstraints,
          counter: _input_counter,
          counterText: _input_counterText,
          filled: _input_filled,
          fillColor: _input_fillColor,
          focusColor: _input_focusColor,
          hoverColor: _input_hoverColor,
          errorBorder: _input_errorBorder,
          focusedBorder: _input_focusedBorder,
          focusedErrorBorder: _input_focusedErrorBorder,
          disabledBorder: _input_disabledBorder,
          enabledBorder: _input_enabledBorder,
          border: _input_border,
          enabled: _input_decorationEnabled,
          semanticCounterText: _input_semanticCounterText,
          alignLabelWithHint: _input_alignLabelWithHint,
          hintStyle: TextStyle(
            color: _hint_color,
            backgroundColor: _hint_backgroundColor,
            fontSize: _hint_fontSize,
            fontWeight: _hint_fontWeight,
            fontStyle: _hint_fontStyle,
            letterSpacing: _hint_letterSpacing,
            wordSpacing: _hint_wordSpacing,
            height: _hint_height,
            foreground: _hint_foreground,
            background: _hint_background,
            shadows: _hint_shadows,
            fontFeatures: _hint_fontFeatures,
            decoration: _hint_textDecoration,
            decorationColor: _hint_textDecorationColor,
            decorationThickness: _hint_textDecorationThickness,
            fontFamily: _hint_fontFamily,
            fontFamilyFallback: _hint_fontFamilyFallback,
            textBaseline: _hint_textBaseline,
          ),
          errorStyle: TextStyle(
            color: _error_color,
            backgroundColor: _error_backgroundColor,
            fontSize: _error_fontSize,
            fontWeight: _error_fontWeight,
            fontStyle: _error_fontStyle,
            letterSpacing: _error_letterSpacing,
            wordSpacing: _error_wordSpacing,
            height: _error_height,
            foreground: _error_foreground,
            background: _error_background,
            shadows: _error_shadows,
            fontFeatures: _error_fontFeatures,
            decoration: _error_textDecoration,
            decorationColor: _error_textDecorationColor,
            decorationThickness: _error_textDecorationThickness,
            fontFamily: _error_fontFamily,
            fontFamilyFallback: _error_fontFamilyFallback,
            textBaseline: _error_textBaseline,
          ),
          prefixStyle: TextStyle(
            color: _prefix_color,
            backgroundColor: _prefix_backgroundColor,
            fontSize: _prefix_fontSize,
            fontWeight: _prefix_fontWeight,
            fontStyle: _prefix_fontStyle,
            letterSpacing: _prefix_letterSpacing,
            wordSpacing: _prefix_wordSpacing,
            height: _prefix_height,
            foreground: _prefix_foreground,
            background: _prefix_background,
            shadows: _prefix_shadows,
            fontFeatures: _prefix_fontFeatures,
            decoration: _prefix_textDecoration,
            decorationColor: _prefix_textDecorationColor,
            decorationThickness: _prefix_textDecorationThickness,
            fontFamily: _prefix_fontFamily,
            fontFamilyFallback: _prefix_fontFamilyFallback,
            textBaseline: _prefix_textBaseline,
          ),
          suffixStyle: TextStyle(
            color: _suffix_color,
            backgroundColor: _suffix_backgroundColor,
            fontSize: _suffix_fontSize,
            fontWeight: _suffix_fontWeight,
            fontStyle: _suffix_fontStyle,
            letterSpacing: _suffix_letterSpacing,
            wordSpacing: _suffix_wordSpacing,
            height: _suffix_height,
            foreground: _suffix_foreground,
            background: _suffix_background,
            shadows: _suffix_shadows,
            fontFeatures: _suffix_fontFeatures,
            decoration: _suffix_textDecoration,
            decorationColor: _suffix_textDecorationColor,
            decorationThickness: _suffix_textDecorationThickness,
            fontFamily: _suffix_fontFamily,
            fontFamilyFallback: _suffix_fontFamilyFallback,
            textBaseline: _suffix_textBaseline,
          ),
          counterStyle: TextStyle(
            color: _counter_color,
            backgroundColor: _counter_backgroundColor,
            fontSize: _counter_fontSize,
            fontWeight: _counter_fontWeight,
            fontStyle: _counter_fontStyle,
            letterSpacing: _counter_letterSpacing,
            wordSpacing: _counter_wordSpacing,
            height: _counter_height,
            foreground: _counter_foreground,
            background: _counter_background,
            shadows: _counter_shadows,
            fontFeatures: _counter_fontFeatures,
            decoration: _counter_textDecoration,
            decorationColor: _counter_textDecorationColor,
            decorationThickness: _counter_textDecorationThickness,
            fontFamily: _counter_fontFamily,
            fontFamilyFallback: _counter_fontFamilyFallback,
            textBaseline: _counter_textBaseline,
          ),
          labelStyle: TextStyle(
            color: _label_color,
            backgroundColor: _label_backgroundColor,
            fontSize: _label_fontSize,
            fontWeight: _label_fontWeight,
            fontStyle: _label_fontStyle,
            letterSpacing: _label_letterSpacing,
            wordSpacing: _label_wordSpacing,
            height: _label_height,
            foreground: _label_foreground,
            background: _label_background,
            shadows: _label_shadows,
            fontFeatures: _label_fontFeatures,
            decoration: _label_textDecoration,
            decorationColor: _label_textDecorationColor,
            decorationThickness: _label_textDecorationThickness,
            fontFamily: _label_fontFamily,
            fontFamilyFallback: _label_fontFamilyFallback,
            textBaseline: _label_textBaseline,
          ),
          helperStyle: TextStyle(
            color: _helper_color,
            backgroundColor: _helper_backgroundColor,
            fontSize: _helper_fontSize,
            fontWeight: _helper_fontWeight,
            fontStyle: _helper_fontStyle,
            letterSpacing: _helper_letterSpacing,
            wordSpacing: _helper_wordSpacing,
            height: _helper_height,
            foreground: _helper_foreground,
            background: _helper_background,
            shadows: _helper_shadows,
            fontFeatures: _helper_fontFeatures,
            decoration: _helper_textDecoration,
            decorationColor: _helper_textDecorationColor,
            decorationThickness: _helper_textDecorationThickness,
            fontFamily: _helper_fontFamily,
            fontFamilyFallback: _helper_fontFamilyFallback,
            textBaseline: _helper_textBaseline,
          ),
        ),
        initialValue: _controller != null ? null : _initialValue,
        focusNode: _focusNode,
        keyboardType: _keyboardType,
        textCapitalization: _textCapitalization,
        textInputAction: _textInputAction,
        textDirection: _textDirection,
        textAlign: _textAlign,
        textAlignVertical: _textAlignVertical,
        autofocus: _autofocus,
        readOnly: _readOnly,
        toolbarOptions: _toolbarOptions,
        showCursor: _showCursor,
        obscuringCharacter: _obscuringCharacter,
        obscureText: _obscureText,
        autocorrect: _autocorrect,
        smartDashesType: _smartDashesType,
        smartQuotesType: _smartQuotesType,
        enableSuggestions: _enableSuggestions,
        maxLines: _maxLines,
        minLines: _minLines,
        expands: _expands,
        maxLength: _maxLength,
        onChanged: _onChanged,
        onTap: _onTap,
        onEditingComplete: _onEditingComplete,
        onFieldSubmitted: _onFieldSubmitted,
        onSaved: _onSaved,
        validator: _validator,
        inputFormatters: _inputFormatters,
        enabled: _enabled,
        cursorWidth: _cursorWidth,
        cursorHeight: _cursorHeight,
        cursorRadius: _cursorRadius,
        cursorColor: _cursorColor,
        keyboardAppearance: _keyboardAppearance,
        scrollPadding: _scrollPadding,
        enableInteractiveSelection: _enableInteractiveSelection,
        buildCounter: _buildCounter,
        scrollPhysics: _scrollPhysics,
        autofillHints: _autofillHints,
        autovalidateMode: _autovalidateMode,
      ),
    );