- All widgets refactored into a clean modular folder structure mirroring the
sf_pindesign pattern - Each widget family now has independent
models/,utils/, andwidgets/sub-folders - All part files use
part ofdirectives — zero cross-widget coupling
SFButtonTheme— per-state decoration model withcopyWith,copyColorWith,apply- States:
defaultTheme,pressedTheme,hoveredTheme,loadingTheme,disabledTheme - Every state can have a completely different
backgroundColor,gradient,borderColor,borderRadius,height,textStyle,boxShadow
- States:
- Smooth
AnimatedContainer— all decoration properties tween automatically between state changes - Press-scale animation — button scales down on tap for tactile feel (
pressScale, default0.97) AnimatedSwitcher— smooth fade between label and spinner on loading state change- Haptic feedback —
SFButtonHaptic:none,light,medium,heavy,selection - Hover state —
hoveredThemefor desktop/web (MouseRegiondriven) prefixIcon/suffixIcon— optional icons flanking the label textchildoverride — pass any widget as button contentloadingChildoverride — pass any widget shown during loadingonLongPress— long press callbackenabledflag with automatic0.5opacity on disabled state- Full backward compatibility — all existing
SFButtonparams unchanged
SFIconButtonTheme— per-state decoration model withcopyWith,copyColorWith,apply- States:
defaultTheme,pressedTheme,hoveredTheme,loadingTheme,disabledTheme
- States:
SFIconPosition—start,end,top,bottom(column layout for top/bottom)- Smooth
AnimatedContainerand press-scale animation (same asSFButton) AnimatedSwitcherfade between content and spinner- Haptic feedback — same
SFButtonHapticenum shared withSFButton child/loadingChildoverride widgetsonLongPresscallbackenabledflag with opacity- Full backward compatibility — all existing
SFIconButtonparams unchanged
SFFieldTheme— per-state decoration model withcopyWith,copyBorderWith,apply- States:
defaultTheme,focusedTheme,filledTheme,errorTheme,disabledTheme - Each state controls:
borderColor,borderWidth,borderRadius,fillColor,labelStyle,hintStyle,textStyle,prefixIconColor,suffixIconColor,errorStyle,contentPadding,boxShadow
- States:
- Smooth
AnimatedContainer— border color, fill color, shadow tween on state change errorText— static error text shown below field without running validatorforceErrorState— force error theme regardless of validator resulterrorBuilder— fully custom error widget- Haptic feedback —
SFFieldHaptic:none,light,medium,heavy,selection(fires on focus) SFTextField.builderconstructor — pass a fully customInputDecorationbuilder receiving(context, isFocused, hasError, isFilled)animationDuration+animationCurve— control state transition speed- Full backward compatibility — all existing
SFTextFieldparams unchanged
- Same
SFFieldThemeper-state system asSFTextField - States:
defaultTheme,focusedTheme,filledTheme,errorTheme,disabledTheme - Smooth
AnimatedContainerdecoration transitions errorText,forceErrorState,errorBuilder- Haptic feedback on focus
SFPasswordField.builderconstructor — builder receives(context, isFocused, hasError, isFilled, isObscured, toggleObscure)giving full control including the visibility toggle- Full backward compatibility — all existing
SFPasswordFieldparams unchanged
SFPinCode— fully customizable Pin / OTP input field powered by Pinput- Per-state themes — independent
SFPinThemefor default, focused, submitted, following, disabled, and error states - Mixed shapes — each state can use a completely different
BoxDecorationshape (circle, rounded, square, underline, gradient, or any custom decoration) - Smooth animation — decoration properties (color, border, border-radius, size) tween automatically between state changes
- Entry animations —
SFPinAnimationType:none,scale,fade,slide,rotation - Validation —
validator,errorText,forceErrorState,errorBuilder,sfPinAutovalidateMode - Haptic feedback —
SFHapticFeedbackType:lightImpact,mediumImpact,heavyImpact,selectionClick,vibrate - Obscure text — custom
obscuringCharacteror anyobscuringWidget - Custom cursor — standard blinking cursor or pass any
Widgetascursor - SMS Autofill — iOS OneTimeCode out of the box; Android via
smsRetriever - Custom separator — insert any widget between boxes via
separatorBuilder - Builder constructor —
SFPinCode.builderfor 100% custom box widget per state - Controller helpers —
setText,append,delete,clear
- Per-state themes — independent
SFPinTheme— per-state decoration model withcopyWith,copyDecorationWith,copyBorderWith
SFSpinnerStyle.ios— increasedCupertinoActivityIndicatorradius fromspinnerSize / 2tospinnerSize / 1.5for better visibility
SFDropdownandSFDropdownSearchnow useSFDropdownIteminstead of Flutter'sDropdownMenuItem— no external packages required.
SFButton— gradient background support viagradientparameterSFButton— spinner style chooser viaSFSpinnerStyle(android/ios)SFIconButton— gradient background supportSFIconButton— layout mode viaSFIconButtonMode(compact/expanded)SFIconButton— loading state withisLoading+SFSpinnerStyleSFTheme.gradient— global gradient applied to all buttons- Removed
dropdown_button2dependency — zero external dependencies
- Fixed loading spinner invisible on dark buttons (replaced
ElevatedButtonwithMaterial+Ink+InkWell) - Fixed button background going grey during loading state
- Fixed
SFDropdownSearchFilterCallbackreturn type (ListnotIterable) - Fixed
SFDropdownSearchsearch text appearing in main field instead of inside the dropdown panel
- Initial release
SFTextField— configurable text form fieldSFPasswordField— password field with built-in show/hide toggleSFDropdown— styled dropdownSFDropdownSearch— dropdown with built-in search panelSFButton— full-width button with loading stateSFIconButton— compact icon + label buttonSFTheme— global theme configuration