material_segmented_control 1.2.0 copy "material_segmented_control: ^1.2.0" to clipboard
material_segmented_control: ^1.2.0 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,
          initialSelection: 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),
            ),
          ],
        ),
      ),
    );
  }
}
92
likes
25
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

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on material_segmented_control