material_segmented_control 0.1.3 copy "material_segmented_control: ^0.1.3" to clipboard
material_segmented_control: ^0.1.3 copied to clipboard

outdated

A segmented control widget like the one for iOS, but in Material design

Material Segmented Control #

A material segmented control like the one for iOS, in Material style

Why? #

We all know well the Cupertino segmented widget in Flutter. But there is no similar in Material, so I decided to publish it.

You can check it out on pub: (see package on dartlang)

How to use #

Import the package #

In your pubspec.yaml, add

dependencies: 
    material_segmented_control: ^0.1.1

Import code #

Wherever you want to use this widget, import

import 'package:material_segmented_control/material_segmented_control.dart';

Basic usage #

MaterialSegmentedControl(
        borderRadius: 32.0,
        reselectable: false,
        colorSelected: Colors.blueAccent,
        colorUnselected: Colors.white,
        leftWidget: Icon(Icons.camera_rear, color: Colors.black),
        rightWidget: Icon(Icons.camera_front, color: Colors.black),
        onSelected: (direction) {
          switch(direction)
          {
            // ...
          }
        })
90
likes
0
pub points
95%
popularity

Publisher

unverified uploader

A segmented control widget like the one for iOS, but in Material design

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on material_segmented_control