Skip to content

Commit ed4ea06

Browse files
committed
doc(README): several improvements
1 parent 4dec394 commit ed4ea06

File tree

6 files changed

+64
-51
lines changed

6 files changed

+64
-51
lines changed

README.md

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# flutter_brand_palettes
2+
13
<img
24
src="https://user-images.githubusercontent.com/24878574/119202536-61caa380-ba67-11eb-8f29-1bfa92f28143.png"
35
alt="EO-Color logo" width="176" height="82"/>
@@ -13,25 +15,9 @@ Rultor.com](https://www.rultor.com/b/dartoos-dev/flutter_brand_palettes)](https:
1315

1416
[![build](https://github.com/dartoos-dev/flutter_brand_palettes/actions/workflows/build.yml/badge.svg)](https://github.com/dartoos-dev/flutter_brand_palettes/actions/)
1517
[![codecov](https://codecov.io/gh/dartoos-dev/flutter_brand_palettes/branch/master/graph/badge.svg?token=Hvpu48mfx1)](https://codecov.io/gh/dartoos-dev/flutter_brand_palettes)
16-
![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/rafamizes/flutter_brand_palettes)
17-
[![Hits-of-Code](https://hitsofcode.com/github/dartoos-dev/flutter_brand_palettes?branch=master)](https://hitsofcode.com/github/dartoos-dev/flutter_brand_palettes/view?branch=master)
18+
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/rafamizes/flutter_brand_palettes)](https://www.codefactor.io/repository/github/rafamizes/flutter_brand_palettes)
1819
[![style: lint](https://img.shields.io/badge/style-lint-4BC0F5.svg)](https://pub.dev/packages/lint)
19-
20-
## Overview
21-
22-
**Flutter Brand Palettes** is a collection of declarative and object-oriented
23-
classes for the color palettes of popular brands and companies.
24-
25-
For example, to get the Instagram colors as a `List<Color>`object,
26-
simply declare `InstagramGrad().colors` — the 'Grad' suffix is short for
27-
_Gradient_.
28-
29-
To get a single color, declare `Instagram.royalBlue().color` for Instagram
30-
royal blue; `Instagram.yellow().color` for Instagram yellow, and so on.
31-
32-
In addition, each class is well-documented and fully unit-tested — this package
33-
has achieved 100% code coverage and goes through a CI pipeline with rigorous
34-
quality gates.
20+
[![Hits-of-Code](https://hitsofcode.com/github/dartoos-dev/flutter_brand_palettes?branch=master)](https://hitsofcode.com/github/dartoos-dev/flutter_brand_palettes/view?branch=master)
3521

3622
## Contents
3723

@@ -41,57 +27,82 @@ quality gates.
4127
- [Color Gradient in action](#color-gradient-in-action)
4228
- [Color Gradients](#color-palettes-in-action)
4329
- [Demo application](#demo-application)
44-
- [I need the 'X' color palettes](#i-need-the-x-brand-color-palette)
30+
- [I need the 'X' color palettes](#i-need-the-x-color-palette)
4531
- [List of Color Palettes](#list-of-color-palettes-a-z)
4632
- [References](#hex-color-values-references)
4733

34+
## Overview
35+
36+
**Flutter Brand Palettes** is a collection of declarative, object-oriented
37+
classes for the color palettes of popular brands and companies.
38+
39+
For example, to retrieve Instagram's colors at once, as a `List<Color>` object,
40+
simply declare `InstagramGrad().colors` — the 'Grad' suffix is short for
41+
_Gradient_.
42+
43+
For a single color, simply select it from the brand-related color palette class.
44+
For example, the command `Instagram.royalBlue()` retrieves the royal blue color
45+
from the Instagram color palette; `Instagram.yellow()` retrieves the yellow
46+
color; and so on.
47+
48+
In addition, all classes are well-documented and fully unit-tested, passing
49+
through a CI pipeline with rigorous quality ports.
50+
4851
## Getting Started
4952

5053
Instead of a constant integer value, a color is represented by a named
5154
constructor of its corresponding brand class. In this way, the source code
52-
becomes more object-oriented, readable and maintainable. For instance, the
53-
command `Instagram.red().color` retrieves the Instagram red color _#FD1D1D_;
54-
`Google.red().color`, the Google red _#DB4437_; `Facebook.blue().color`,
55-
the Facebook blue _#4267B2_, and so on.
55+
becomes more object-oriented, readable and maintainable.
56+
57+
For example, the command `Facebook.blue().color` returns Facebook's blue color
58+
_#4267B2_. Likewise, the command `Instagram.red().color` returns Instagram's red
59+
color _#FD1D1D_; `Google.red().color`, Google's red color _#DB4437_.
5660

5761
## Color Palettes in Action
5862

63+
The code bellow builds a container widget whose background color is Facebook
64+
blue.
65+
5966
```dart
6067
import 'package:brand_colors/flutter_brand_colors.dart';
6168
import 'package:flutter/material.dart';
6269
6370
class FacebookIsh extends StatelessWidget {
6471
72+
const _blue = Facebook.blue();
73+
6574
@override
66-
Widget build(BuildContext context) {
67-
return Container(
68-
color: Facebook.blue().color,
69-
);
70-
}
75+
Widget build(BuildContext context) => Container(color: _blue.color);
7176
}
7277
```
7378

7479
## Color Gradient in Action
7580

81+
The code below builds a rectangle filled with the Google logo gradient.
82+
7683
```dart
7784
7885
/// Rectangle filled with Google logo color gradient.
7986
class Googleish extends StatelessWidget {
8087
88+
static final _googleGrad = const GoogleGrad().colors;
89+
8190
@override
8291
Widget build(BuildContext context) {
8392
return Container(
84-
height: kToolbarHeight / 2,
8593
decoration: BoxDecoration(
86-
gradient: LinearGradient(
87-
colors: GoogleGrad().colors,
88-
),
94+
gradient: LinearGradient(colors: _googleGrad),
8995
),
9096
);
9197
}
98+
}
9299
93100
```
94101

102+
The result of the previous code in full screen
103+
104+
![google_grad_full_screen](https://user-images.githubusercontent.com/24878574/126880793-2e9170a1-3eaa-4770-9e89-410c7e123503.png)
105+
95106
## Demo application
96107

97108
The demo application provides a fully working example, focused on demonstrating
@@ -111,15 +122,17 @@ This should launch the demo application on Chrome in debug mode.
111122

112123
![Demo-App](https://user-images.githubusercontent.com/24878574/122657224-de6ca280-d137-11eb-9eb1-fc5169872d64.png)
113124

114-
## I need the 'X' brand color palette
125+
## I need the 'X' color palette
115126

116-
Do you need any brand that has not yet been implemented?
127+
Do you need a color palette that has not been implemented yet?
117128

118-
It doesn't matter the size and relevance of the company, not even if it's a
119-
tech company.
129+
It doesn't matter the size and relevance of the company, not even if it's a tech
130+
company.
120131

121-
Just open an [issue](https://github.com/dartoos-dev/flutter_brand_palettes/issues)
122-
and enter the brand or company name — the colors will be implemented as soon as possible.
132+
Just open an
133+
[issue](https://github.com/dartoos-dev/flutter_brand_palettes/issues) and enter
134+
the brand or company name; the color palette will be implemented as soon as
135+
possible.
123136

124137
## List of Color Palettes (A-Z)
125138

example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import 'package:eo_color/eo_color.dart';
12
import 'package:flutter/material.dart';
23
import 'package:flutter_brand_palettes/flutter_brand_palettes.dart';
3-
import 'package:eo_color/eo_color.dart';
44

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

example/pubspec.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.6.1"
10+
version: "2.7.0"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
@@ -49,7 +49,7 @@ packages:
4949
name: eo_color
5050
url: "https://pub.dartlang.org"
5151
source: hosted
52-
version: "1.1.3"
52+
version: "1.1.5"
5353
fake_async:
5454
dependency: transitive
5555
description:
@@ -68,7 +68,7 @@ packages:
6868
path: ".."
6969
relative: true
7070
source: path
71-
version: "0.3.6"
71+
version: "0.3.8"
7272
flutter_test:
7373
dependency: "direct dev"
7474
description: flutter
@@ -94,7 +94,7 @@ packages:
9494
name: meta
9595
url: "https://pub.dartlang.org"
9696
source: hosted
97-
version: "1.3.0"
97+
version: "1.4.0"
9898
path:
9999
dependency: transitive
100100
description:
@@ -148,7 +148,7 @@ packages:
148148
name: test_api
149149
url: "https://pub.dartlang.org"
150150
source: hosted
151-
version: "0.3.0"
151+
version: "0.4.0"
152152
typed_data:
153153
dependency: transitive
154154
description:

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
sdk: ">=2.12.0 <3.0.0"
1010

1111
dependencies:
12-
eo_color: ^1.1.3
12+
eo_color: ^1.1.5
1313
flutter:
1414
sdk: flutter
1515

pubspec.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.6.1"
10+
version: "2.7.0"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
@@ -49,7 +49,7 @@ packages:
4949
name: eo_color
5050
url: "https://pub.dartlang.org"
5151
source: hosted
52-
version: "1.1.3"
52+
version: "1.1.5"
5353
fake_async:
5454
dependency: transitive
5555
description:
@@ -87,7 +87,7 @@ packages:
8787
name: meta
8888
url: "https://pub.dartlang.org"
8989
source: hosted
90-
version: "1.3.0"
90+
version: "1.4.0"
9191
path:
9292
dependency: transitive
9393
description:
@@ -141,7 +141,7 @@ packages:
141141
name: test_api
142142
url: "https://pub.dartlang.org"
143143
source: hosted
144-
version: "0.3.0"
144+
version: "0.4.0"
145145
typed_data:
146146
dependency: transitive
147147
description:

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: flutter_brand_palettes
2-
description: A collection of elegant and declarative classes for the color palettes of popular brands and companies.
2+
description: A collection of elegant, declarative classes for the color palettes of popular brands and companies.
33
version: 0.3.8
44
homepage: https://dartoos.dev
55
repository: https://github.com/dartoos-dev/flutter_brand_palettes
@@ -9,7 +9,7 @@ environment:
99
flutter: ">=1.17.0"
1010

1111
dependencies:
12-
eo_color: ^1.1.3
12+
eo_color: ^1.1.5
1313
flutter:
1414
sdk: flutter
1515

0 commit comments

Comments
 (0)