PackageTrack
Sign in Get early access

toggle_switch

Toggle Switch - A simple toggle switch widget. It can be fully customized with desired icons, width, colors, text, corner radius etc. It also maintains selection state.

2.3.0 1000K downloads/mo #90 most downloaded on pub.dev PramodJoshi/toggle_switch

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Release timing varies

gaps range from 9 days to 12 months

Most releases are documented

notes for 20 of 25 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

25 releases · first in 2019

0 releases in the last 12 months

see the full history below

Release timeline

25 releases · Nov 2019 to Mar 2024
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 25
  1. 2.3.0 25 Mar 2024
    Release notes
    • Added customWidgets option:
      • overrides default widgets, foreground colors
      • parameter:
        • customWidgets (optional, type List<Widget>)
    • Added CustomBorderPaint class to optimize gradient border
    • Restructured project with src folder
    • Code cleanups
    Open source →
    Release notes
    • Added customWidgets option:
      • overrides default widgets, foreground colors
      • parameter:
        • customWidgets (optional, type List<Widget>)
    • Added CustomBorderPaint class to optimize gradient border
    • Restructured project with src folder
    • Code cleanups
    Open source →
  2. 2.2.3 22 Mar 2024
    Release notes
    • Fixed center text issue
    Open source →
    Release notes
    • Fixed center text issue
    Open source →
  3. 2.2.2 21 Mar 2024
    Release notes
    • Fixed overflow issue
    • Code cleanups
    Open source →
    Release notes
    • Fixed overflow issue
    • Code cleanups
    Open source →
  4. 2.2.1 15 Mar 2024
    Release notes
    • Updated version in README
    • Updated screenshot
    Open source →
    Release notes
    • Updated version in README
    • Updated screenshot
    Open source →
  5. 2.2.0 15 Mar 2024
    Release notes
    • Minor cleanups and fixes
    • Example updates
    • Added topics, screenshots and funding to pubspec
    • Separated RowToColumn widget class
    • Updated SDK to 4.0.0, modifier fixes (PR 83)
    • Added toggle disable functionality (PR 81):
      • parameter:
        • states (optional, type List)
    Open source →
    Release notes
    • Minor cleanups and fixes
    • Example updates
    • Added topics, screenshots and funding to pubspec
    • Separated RowToColumn widget class
    • Updated SDK to 4.0.0, modifier fixes (PR 83)
    • Added toggle disable functionality (PR 81):
      • parameter:
        • states (optional, type List<bool>)
    Open source →
  6. 2.1.0 23 Apr 2023
    Release notes
    • Added cancel toggle function (PR 77):
      • function:
        • cancelToggle: (index) {} (return type - Future<bool>)
    • Added these options PR 74):
      • center text:
        • centerText (optional, type bool - default false)
      • multi-line text:
        • multiLineText (optional, type bool - default false)
      • inherit activeFgColor and inactiveFgColor in customTextStyles
    • Null safety improvements (PR 68)
    Open source →
    Release notes
    • Added cancel toggle function (PR 77):
      • function:
        • cancelToggle: (index) {} (return type - Future<bool>)
    • Added these options (PR 74):
      • center text:
        • centerText (optional, type bool - default false)
      • multi-line text:
        • multiLineText (optional, type bool - default false)
      • inherit activeFgColor and inactiveFgColor in customTextStyles
    • Null safety improvements (PR 68)
    Open source →
  7. 2.0.1 15 Apr 2022
    Release notes
    • Added vertical toggle switch option (PR 51):
      • parameter:
        • isVertical (type bool - default false)
    • Added active borders option (Partial implementation from PR 53):
      • parameter:
        • activeBorders (optional, type List)
      • list with only one Border value will apply that Border to all the active switches
      • different Border values can be provided for different switches
    • Added divider margin option:
      • parameter:
        • dividerMargin (optional, type double - default 8.0)
    • Made totalSwitches parameter optional.
    • Added new changes to customTextStyles:
      • list with only one TextStyle value will apply that TextStyle to all the active switches
    • Added new changes to customWidths:
      • customWidths can now reflect widths greater than device width
      • must use horizontal scroll view to prevent overflow
    Open source →
    Release notes
    • Added vertical toggle switch option (PR 51):
      • parameter:
        • isVertical (type bool - default false)
    • Added active borders option (Partial implementation from PR 53):
      • parameter:
        • activeBorders (optional, type List<Border>)
      • list with only one Border value will apply that Border to all the active switches
      • different Border values can be provided for different switches
    • Added divider margin option:
      • parameter:
        • dividerMargin (optional, type double - default 8.0)
    • Made totalSwitches parameter optional.
    • Added new changes to customTextStyles:
      • list with only one TextStyle value will apply that TextStyle to all the active switches
    • Added new changes to customWidths:
      • customWidths can now reflect widths greater than device width
      • must use horizontal scroll view to prevent overflow
    Open source →
  8. 2.0.0 15 Apr 2022

    Nothing published for this version

  9. 1.4.0 23 Jan 2022
    Release notes
    • Minor bug fix (PR 44).
      • return null when active switch is de-activated by re-tapping
    • Added changes to fix radiusStyle bug when text direction is set to TextDirection.rtl
      • parameter:
        • textDirectionRTL (optional, type bool - default false)
    • Added custom widths support
      • parameter:
        • customWidths (optional, type List)
    Open source →
    Release notes
    • Minor bug fix (PR 44).
      • return null when active switch is de-activated by re-tapping
    • Added changes to fix radiusStyle bug when text direction is set to TextDirection.rtl
      • parameter:
        • textDirectionRTL (optional, type bool - default false)
    • Added custom widths support
      • parameter:
        • customWidths (optional, type List<double>)
    Open source →
  10. 1.3.0 02 Nov 2021
    Release notes
    • Added null support for initialLabelIndex (PR 39).
    • Added double tap support to de-select/de-activate active switch (PR 41):
      • parameter:
        • doubleTapDisable (optional, type bool - default false)
    • Added animation duration support:
      • parameter:
        • animationDuration (optional, type int - default 800)
    • Added package test
    Open source →
    Release notes
    • Added null support for initialLabelIndex (PR 39).
    • Added double tap support to de-select/de-activate active switch (PR 41):
      • parameter:
        • doubleTapDisable (optional, type bool - default false)
    • Added animation duration support:
      • parameter:
        • animationDuration (optional, type int - default 800)
    • Added package test
    Open source →
  11. 1.2.0 21 Jun 2021
    Release notes
    • Added custom icons support:
      • parameter:
        • customIcons (optional, type List
      • customIcons will overwrite 'icons:'
    Open source →
    Release notes
    • Added custom icons support:
      • parameter:
        • customIcons (optional, type List<Icon>)
      • customIcons will overwrite 'icons:'
    Open source →
  12. 1.1.0 12 Jun 2021
    Release notes
    • Added custom text styles support:
      • parameter:
        • customTextStyles (optional, type List<TextStyle>)
      • text style can now be configured for individual switches
    • Added text or icon support:
      • icons parameter now accepts null value (check examples)
    Open source →
  13. 1.0.0 09 Jun 2021

    Nothing published for this version

  14. 1.0.0+1 09 Jun 2021
    Release notes
    • Added total switches support:
      • parameter:
        • totalSwitches (required, type int)
    • Labels parameter is now optional.
    • Added border color and border width support:
      • parameters:
        • borderColor (optional, type List<Color> for gradient colors support)
        • borderWidth (optional, type double)
    • Added divider color support:
      • dividerColor (optional, type Color)
    • Added gradient colors support for active backgrounds:
      • activeBgColor and activeBgColors now take an array of Color instead of just Color (check examples)
      • parameters:
        • activeBgColor (optional, type List<Color>)
        • activeBgColors (optional, type List<List<Color>>)
    • Added animation support:
      • parameters:
        • animate (optional, type bool):
          • with just animate set to true, default curve = Curves.easeIn
        • curve (optional, type Curve):
          • animate must be set to true when using custom curve
    • Added new active switch style based on corner radius:
      • parameter:
        • radiusStyle (optional, type bool)
    Open source →
  15. 0.1.9 22 Mar 2021
    Release notes
    • Upgraded pre 1.12 flutter embedding in Android for example project (22d04ea).
    • Enabled AndroidX support for example project (3b62b21).
    • Migrated to strict null safety (bb24959).
    Open source →
  16. 0.1.8 07 Aug 2020
    Release notes
    • Added left and right padding.
    • Added fixes to prevent overflow:
      • max widget width is calculated based on the number of labels/switches, minWidth and max screen width.
      • resize widgets to fit if user-provided size params exceed available width.
    Open source →
  17. 0.1.7 06 Aug 2020
    Release notes
    • Added fix to programmatically change switch index (a04d62e).
    • Added changeOnTap option to enable/disable switch (a04d62e).
    Open source →
  18. 0.1.6 05 Aug 2020
    Release notes
    • Made color parameters optional.
    • Use default theme color if color parameter is null/not provided.
    • Added additional gitignores for package.
    Open source →
  19. 0.1.5 20 Jul 2020
    Release notes
    • Added minHeight, fontSize, iconSize support.
    • Added text overflow support.
    • Renamed arguments to make them more specific.
    • Added usage examples in Readme.
    Open source →
  20. 0.1.4 19 Nov 2019
    Release notes
    • Added icons support.
    • Added different active background colors support.
    Open source →
  21. 0.1.3 19 Nov 2019

    Nothing published for this version

  22. 0.1.2 19 Nov 2019

    Nothing published for this version

  23. 0.1.1 18 Nov 2019
    Release notes
    • Readme updates.
    Open source →
  24. 0.1.0 18 Nov 2019
    Release notes
    • First version release.
    Open source →
  25. 0.0.1 18 Nov 2019

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive