hexcolor 2.0.4 copy "hexcolor: ^2.0.4" to clipboard
hexcolor: ^2.0.4 copied to clipboard

outdated

A flutter plugin for bringing hex colors to dart hexcolorPlugin.

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  String textColor = ColorToHex(Colors.teal).toString();
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: HexColor("#ffff4444"),
          title: const Text('Plugin example app'),
        ),
        body: Container(
          decoration: new BoxDecoration(
            color: Colors.blueGrey[100],
          ),
          child: Center(
            child: Container(
              height: 200,
              child: Column(
                children: [
                  Text(
                    "I'm using hexcolor",
                    style: TextStyle(color: HexColor("#f2f2f2")),
                  ),
                  Text(
                    "Hex From Material  $textColor",
                    style: TextStyle(color: ColorToHex(Colors.teal)),
                  ),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}
315
likes
0
pub points
99%
popularity

Publisher

unverified uploader

A flutter plugin for bringing hex colors to dart hexcolorPlugin.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_web_plugins

More

Packages that depend on hexcolor