Skip to content

Commit

Permalink
prepare v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TesteurManiak committed Oct 14, 2021
1 parent 4c1c8fc commit ec7f90e
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 19 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## 0.0.1
## 1.0.0

* TODO: Describe initial release.
* First release: Add support for `shadows`, `border` and `gradient` properties.
69 changes: 54 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <Shadow>[
gradient: _rainbowGradient,
border: IconBorder(),
shadows: [
Shadow(
blurRadius: 3.0,
color: Colors.red,
),
blurRadius: 3,
offset: Offset(0, 2),
)
],
),
)
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.1"
version: "1.0.0"
lints:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit ec7f90e

Please sign in to comment.