Simple flutter toggle button widge

Related tags

Widgets fk_toggle
Overview

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

You might also like...

Flutter progress button

Flutter progress button

flutter_progress_button flutter_progress_button is a free and open source (MIT license) Material Flutter Button that supports variety of buttons style

Dec 6, 2022

Flutter Custom, Text, 3D, Social media button's package

Flutter Custom, Text, 3D, Social media button's package

Flutter Button flutter_button, which is a flutter package, contains animated, cool and awesome buttons. That you may like, thanks to this package you

Dec 29, 2022

This flutter package provides an easy implementation of a Slider Button to cancel current transaction or screen

This flutter package provides an easy implementation of a Slider Button to cancel current transaction or screen

This flutter package provides an easy implementation of a Slider Button to cancel current transaction or screen

Nov 8, 2022

A button with ripple effect while being hold

A button with ripple effect while being hold

ripple_button a button with ripple effect while being hold build requirements to run this project you need a working enviroment of flutter v2 or highe

Nov 8, 2021

May be used to intercept the Android back-button, as an alternative to `WillPopScope`.

back_button_interceptor In simple cases, when you need to intercept the Android back-button, you usually add WillPopScope to your widget tree. However

Dec 12, 2022

A custom dropdown button lets the user select from a number of items

A custom dropdown button lets the user select from a number of items

CircularDropDownMenu Description A custom dropdown button lets the user select from a number of items. The button shows the currently selected item as

Dec 5, 2020

A library to easily create radio button and checkbox groups.

A library to easily create radio button and checkbox groups.

Check/Radio Group A library to easily create radio button and checkbox groups. Define font size, selection color, position of radios / check and text

Jan 6, 2021

AdvFAB - An Advanced floating action button that expands itself to reveal its hidden widget

AdvFAB (More Than Just A Floating Action Button) AdvFAB is An Advanced floating action button that expands itself to reveal its hidden widget. It can

Nov 4, 2022

Simple form maker for Flutter Framework

Simple form maker for Flutter Framework

Flutter FormBuilder - flutter_form_builder This package helps in creation of data collection forms in Flutter by removing the boilerplate needed to bu

Jan 3, 2023
Owner
fukutan
I'm mobile app developer. Skills: android, kotlin, flutter, iOS, firebase, node.js, etc. ใŠไป•ไบ‹ใฎ็›ธ่ซ‡ใฏใŠๆฐ—่ปฝใซ๏ผ
fukutan
Flutter Duration Button - Create auto-click button likes Netflix's Skip Intro button in Flutter

Flutter Duration Button - Create auto-click button likes Netflix's Skip Intro button in Flutter

Kim Seung Hwan 7 Dec 7, 2022
Flutter reaction button plugin it is fully customizable widget such as Facebook reaction button

Flutter Reaction Button Flutter button reaction it is fully customizable widget such as Facebook reaction button. Preview Demo Usage Include 'flutter_

Abdelouahed Medjoudja 174 Dec 19, 2022
A dart package to display a horizontal bar of customisable toggle tabs. Supports iOS and Android.

toggle_bar A dart package to display a horizontal bar of customisable toggle tabs. Supports iOS and Android. Installation Depend on it. dependencies:

Prem Adithya 9 Jul 13, 2022
A highly customizable toggle switch with a loading state.

A highly customizable toggle switch with a loading state.

null 6 Dec 30, 2022
A button that looks like a Cupertino text button

Cupertino Text Button A button that looks like a Cupertino text button! Text Button A simple text button can be created like this: CupertinoTextButton

Nick Sirovsky 0 Nov 24, 2022
RoundedLoadingButton is a Flutter package with a simple implementation of an animated loading button, complete with success and error animations.

rounded_loading_button RoundedLoadingButton is a Flutter package with a simple implementation of an animated loading button, complete with success and

Chris Edgington 223 Jan 4, 2023
A popup simple topModalSheet menu button widget with handsome design and easy to use

top_modal_sheet A popup simple topModalSheet menu button widget with handsome design and easy to use. Installations Add top_modal_sheet: ^1.0.0 in you

Baldemar Alejandres 5 Jul 29, 2022
AsyncButtonBuilder offers a simple way to extend any type of button with an asynchronous aspect

async_button_builder AsyncButtonBuilder offers a simple way to extend any type of button with an asynchronous aspect. It allows adding loading, disabl

Nollie 22 Jul 10, 2022
A Widget that mimics the Facebook Reaction Button in Flutter.

ReactiveButton A Widget that mimics the Facebook Reaction Button in Flutter. Step by step explanation A full explanation on how to build such Widget m

Didier Boelens 47 Jul 12, 2022
Flutter base, with a navigation button

mysample A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

null 0 Dec 30, 2021