From ec7f90edb13b50a6ee86d92f218a79d98d555d0d Mon Sep 17 00:00:00 2001 From: Guillaume Roux Date: Thu, 14 Oct 2021 14:57:28 +0200 Subject: [PATCH] prepare v1.0.0 --- CHANGELOG.md | 4 +-- README.md | 69 ++++++++++++++++++++++++++++++++++---------- example/pubspec.lock | 2 +- pubspec.yaml | 2 +- 4 files changed, 58 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41cc7d8..d5a43ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -## 0.0.1 +## 1.0.0 -* TODO: Describe initial release. +* First release: Add support for `shadows`, `border` and `gradient` properties. diff --git a/README.md b/README.md index e9e5558..4b8d19d 100644 --- a/README.md +++ b/README.md @@ -5,36 +5,75 @@ Add decoration capabilities for the `Icon` widget with shadows, borders, gradients. This new `DecoratedIcon` widget overlap itself with the base `Icon` widget to provide a more complete decoration system through a `IconDecoration` property. -## Features +## Add to your project -* Add shadows to icons -* Add borders to icons -* Add gradients to icons +### Add dependency to your `pubspec.yaml` -![](https://raw.githubusercontent.com/TesteurManiak/icon_decoration/main/test/goldens/shadow_base_widget.png) +```yaml +icon_decoration: any +``` + +### Import the package + +```dart +import 'package:icon_decoration/icon_decoration.dart'; +``` ## How to use -Add the dependency to your `pubspec.yaml` : +### Add shadows to icons -```yaml -icon_decoration: any +![](https://raw.githubusercontent.com/TesteurManiak/icon_decoration/main/test/goldens/shadow_with_offset3_0.png) + +```dart +DecoratedIcon( + icon: Icon(Icons.home, color: Colors.red), + decoration: IconDecoration( + shadows: [Shadow(blurRadius: 3, offset: Offset(3, 0))], + ), +) ``` -Here is an example of a `DecoratedIcon` widget : +### Add borders to icons + +![](https://raw.githubusercontent.com/TesteurManiak/icon_decoration/main/test/goldens/border_with_colorized_icon.png) ```dart -import 'package:flutter/material.dart'; -import 'package:icon_decoration/icon_decoration.dart'; +DecoratedIcon( + icon: Icon(Icons.favorite, color: Colors.green), + decoration: IconDecoration(border: IconBorder()), +) +``` + +### Add gradients to icons + +![](https://raw.githubusercontent.com/TesteurManiak/icon_decoration/main/test/goldens/base_gradient.png) + +```dart +DecoratedIcon( + icon: Icon(Icons.all_inbox), + decoration: IconDecoration( + gradient: _rainbowGradient, + ), +) +``` + +### Mix them all together +![](https://raw.githubusercontent.com/TesteurManiak/icon_decoration/main/test/goldens/gradient_with_border_and_shadow.png) + +```dart DecoratedIcon( - icon: Icon(Icons.favorite), + icon: Icon(Icons.all_inbox), decoration: IconDecoration( - shadows: [ + gradient: _rainbowGradient, + border: IconBorder(), + shadows: [ Shadow( - blurRadius: 3.0, color: Colors.red, - ), + blurRadius: 3, + offset: Offset(0, 2), + ) ], ), ) diff --git a/example/pubspec.lock b/example/pubspec.lock index b9e30d9..f3db1de 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -80,7 +80,7 @@ packages: path: ".." relative: true source: path - version: "0.0.1" + version: "1.0.0" lints: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index e638d40..aa9e126 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: icon_decoration description: Add decoration capabilities for the Icon widget with shadows, borders, gradients. -version: 0.0.1 +version: 1.0.0 homepage: environment: