fk_toggle 0.1.4 copy "fk_toggle: ^0.1.4" to clipboard
fk_toggle: ^0.1.4 copied to clipboard

This is simple flutter toggle button widget. Possible set multiple value to toggle ui, not only 2 values. Also you can customize size and colors as you like.

fk_toggle v0.1.4 #

This is simple flutter toggle button widget.

Supports show text labels and icons, Possible set multiple value to toggle ui, not only 2 values.

Also you can customize size and colors as you like.

Screenshot of SampleApp #

fk_toggle_image

Features #

  • Toggle Items
    • Provide toggle change event.
  • Show texts
  • Show icons
  • Customization of Size, And colors when toggle on/off.

How to install #

Add this to your package's pubspec.yaml file:

dependencies:
  fk_toggle: ^0.1.1

You can install packages from the command line with Flutter:

$ flutter pub get

Import in your project:

import 'package:fk_toggle/fk_toggle.dart';

Usage #

Scaffold(
  appBar: AppBar(title: const Text('Sample Toggle Switches')),
  body: Center(
    child: Column(
      mainAxisSize: MainAxisSize.min,
      mainAxisAlignment: MainAxisAlignment.center,
      children: Padding(
          padding: const EdgeInsets.all(10.0),
          child: FkToggle(
            width: 50,
            height: 30,
            labels: const ['1', '2']
          ),
        )
      )
    ),
  ),
);

Parameter descriptions #

Property name description default value required
width length of a toogle ⚠️ not full length of widget 🈚 ✔️
height height of widget 🈚 ✔️
labels toggle button texts. Allow empty text 🈚 ✔️
cornerRadius size of corner radius 10
backgroundColor unselected toggle color Colors.black26
selectedColor selected toggle color Colors.blue
disabledElementColor unselected label color Colors.black54
enabledElementColor selected label color Colors.white
fontSize font size of labels 16.0
icons Allow null value in lists,You can set an icon for any Toggle 🈚
onSelected provide toggle change event, Provide index and instance 🈚

Future schedule #

  • Implement animation feature
  • Improve class paramters to about like auto calulate width and height.
  • you can post some issues.

Contacts #

Feel free to send message.
Welcome to work consultation or everything.
Twitter:@fukutan_org
github:fukutan-org

5
likes
130
pub points
79%
popularity

Publisher

verified publisherfukutan.dev

This is simple flutter toggle button widget. Possible set multiple value to toggle ui, not only 2 values. Also you can customize size and colors as you like.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on fk_toggle