flutter_colorful 1.0.1 copy "flutter_colorful: ^1.0.1" to clipboard
flutter_colorful: ^1.0.1 copied to clipboard

discontinued

HexColor extend Color class to take hex coded value.

example/lib/main.dart

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

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

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

class _MyAppState extends State<MyApp> {
  var color = HexColor('FFFFFF');
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Center(
            child: Text(
              'HexColor',
              style: TextStyle(color: color),
            ),
          ),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              RaisedButton(
                color: HexColor('000000'),
                onPressed: () {
                  color = HexColor('000000');
                  setState(() {});
                },
              ),
              RaisedButton(
                color: HexColor('FFFFFF'),
                onPressed: () {
                  color = HexColor('FFFFFF');
                  setState(() {});
                },
              ),
              RaisedButton(
                color: HexColor('ffae42'),
                onPressed: () {
                  color = HexColor('ffae42');
                  setState(() {});
                },
              ),
              RaisedButton(
                color: HexColor('00FF00'),
                onPressed: () {
                  color = HexColor('00FF00');
                  setState(() {});
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
20
pub points
0%
popularity

Publisher

verified publishermsayed.net

HexColor extend Color class to take hex coded value.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_colorful