apptomate_custom_switch

CustomSwitch is a customizable switch widget for Flutter applications that allows toggling between two states with an optional label.

Platform

🚀 Features

✔️ Toggle between ON/OFF states

✔️ Customizable active and inactive colors

✔️ Includes a label with adjustable spacing and styling

✔️ Uses Flutter's native Switch widget for smooth toggling


📲 Installation

Add the dependency to your pubspec.yaml:

dependencies:
  apptomate_custom_switch: ^0.0.1

Basic Example

CustomSwitch(
            value: isSwitched,
            onChanged: (newValue) {
              setState(() {
                isSwitched = newValue;
              });
            },
            activeColor: Colors.green,
            labelStyle: TextStyle(color: Colors.black,fontWeight: FontWeight.w400,fontSize: 18),
            inactiveThumbColor: Colors.white,
            inactiveTrackColor: Colors.black,
            label: "Enable Notifications",
          )