color_to_material 0.0.1 copy "color_to_material: ^0.0.1" to clipboard
color_to_material: ^0.0.1 copied to clipboard

Get a MaterialColor from a single line of code

example/example.dart

import 'package:color_to_material/color_to_material.dart';
import 'package:flutter/material.dart';

class Example extends StatelessWidget {
  const Example({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // Get the MaterialColor
    final MaterialColor material =
        ColorToMaterial.fromHEX('0055ff').getMaterialColor();

    return MaterialApp(
      theme: ThemeData(
        // Set it as your primatySwatch
        primarySwatch: material,
      ),
      home: Scaffold(),
    );
  }
}
2
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Get a MaterialColor from a single line of code

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on color_to_material