apptomate_custom_toggle_button

CustomToggleButton is a simple and customizable toggle button for Flutter applications.

Platform


📝 Description

CustomToggleButton is a simple and customizable toggle button for Flutter applications. It allows switching between two states with custom labels and colors.


🚀 Features

✔️ Toggle between ON/OFF states

✔️ Customizable active and inactive colors

✔️ Custom text labels for active and inactive states

✔️ Smooth animation on state change


📲 Installation

Add the dependency to your pubspec.yaml:

dependencies:
  apptomate_custom_toggle_button: ^0.0.1

Basic Example

 CustomToggleButton(
            value: isToggled,
            onChanged: (newValue) {
              setState(() {
                isToggled = newValue;
              });
            },
            activeText: "ON",
            inactiveText: "OFF",
            activeColor: Colors.green,
            inactiveColor: Colors.red,
          )