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

outdated

A Flutter package to manage custom colors used in the project

example/lib/main.dart

import 'package:example/generated/gen_colors.g.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Easy Colors Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Easy Colors Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
              style: TextStyle(color: EasyColors.black),
            ),
            Container(
              height: 30.0,
              color: EasyColors.indianRed,
            ),
            Container(
              height: 30.0,
              color: EasyColors.salmon,
            ),
            Container(
              height: 30.0,
              color: EasyColors.black,
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () => setState(() {
          _counter++;
        }),
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ),
    );
  }
}
3
likes
0
pub points
58%
popularity

Publisher

unverified uploader

A Flutter package to manage custom colors used in the project

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

args, code_builder, dart_style, flutter, path

More

Packages that depend on easy_colors