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

outdated

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

example/main.dart

import 'package:flutter/material.dart';
import 'package:material_segmented_control/material_segmented_control.dart';
import 'package:material_segmented_control/segmented_children.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Center(
        child: MaterialSegmentedControl(
          borderRadius: 32.0,
          children: <SegmentedItem>[
            SegmentedItem(
              colorSelected: Colors.lightBlueAccent,
              colorIdle: Colors.white,
              child: Icon(Icons.camera_rear, color: Colors.black),
            ),
            SegmentedItem(
              colorSelected: Colors.lightBlueAccent,
              colorIdle: Colors.white,
              child: Icon(Icons.wb_sunny, color: Colors.black),
            ),
            SegmentedItem(
              colorSelected: Colors.lightBlueAccent,
              colorIdle: Colors.white,
              child: Icon(Icons.description, color: Colors.black),
            ),
            SegmentedItem(
              colorSelected: Colors.lightBlueAccent,
              colorIdle: Colors.white,
              child: Icon(Icons.camera_front, color: Colors.black),
            ),
          ],
        ),
      ),
    );
  }
}
98
likes
0
pub points
96%
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