Skip to content

Commit

Permalink
Update readme to v2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yadaniyil committed Jun 2, 2022
1 parent 17234da commit 7bdc875
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
In your pubspec.yaml
```yaml
dependencies:
badges: ^2.0.2
badges: ^2.0.3
```
```dart
import 'package:badges/badges.dart';
Expand All @@ -32,9 +32,9 @@ import 'package:badges/badges.dart';
<br>

## Animations:
| <img src="https://raw.githubusercontent.com/yadaniil/flutter_badges/master/images/first_badge_example.gif" height="200px"> | <img src="https://raw.githubusercontent.com/yadaniil/flutter_badges/master/images/second_badge_example.gif" height="200px"> | <img src="https://raw.githubusercontent.com/yadaniil/flutter_badges/master/images/third_badge_example.gif" height="200px"> |
| ------------- | ------------- | ------------ |
| `BadgeAnimationType.slide` | `BadgeAnimationType.scale` | `BadgeAnimationType.fade` |
| <img src="https://raw.githubusercontent.com/yadaniil/flutter_badges/master/images/first_badge_example.gif" height="200px"> | <img src="https://raw.githubusercontent.com/yadaniil/flutter_badges/master/images/second_badge_example.gif" height="200px"> | <img src="https://raw.githubusercontent.com/yadaniil/flutter_badges/master/images/third_badge_example.gif" height="200px"> |
| -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `BadgeAnimationType.slide` | `BadgeAnimationType.scale` | `BadgeAnimationType.fade` |
<br>

# Chips:
Expand All @@ -59,24 +59,24 @@ Sometimes you may want to use chip but it's too big, even if set padding to zero
## Custom Usage
There are several options that allow for more control:

| Properties | Description |
|--------------|-----------------|
| `Widget badgeContent` | The content of badge. Usually `Text` or `Icon`. |
| `Color badgeColor` | Background color of the badge. |
| `Widget child` | The main widget. By default it's below the red badge. Usually `Icon`, `IconButton`, `Text` or button. |
| `double elevation` | Shadow of the badge. |
| `Gradient gradient` | Gradient color for the badge content. |
| `bool toAnimate` | Whether animate badge when badge content changed or not. |
| `BadgePosition position` | Can be one of `BadgePosition.topStart()`, `BadgePosition.topEnd()`, `BadgePosition.bottomStart()`, `BadgePosition.bottomEnd()`. Sometimes you want to create unique badge position or create new one manually. For this use `BadgePosition.topEnd(top: -12, end: -20)` or `BadgePosition(start, top, end, bottom)`. |
| `BadgeShape shape` | `BadgeShape.circle` or `BadgeShape.square`. You can use `borderRadius` to change border radius of badge of you use square `BadgeShape.square`. |
| `BorderRadiusGeometry borderRadius` | Border radius of badge. Applies only if `BadgeShape.square` is used. |
| `EdgeInsetsGeometry padding` | The padding of badge content. |
| `Duration animationDuration` | The duration of badge animation when badge content is changed. |
| `BadgeAnimationType animationType` | Can be one of `BadgeAnimationType.slide`, `BadgeAnimationType.scale` or `BadgeAnimationType.fade`. |
| `bool showBadge` | Hide or show badge with animation using bool flag. |
| `AlignmentGeometry alignment` | Alignment of the whole widget |
| `bool ignorePointer` | Enable or disable (default) ignore pointer option |
| `BorderSide borderSide` | Adds a border to the badge |
| Properties | Description |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Widget badgeContent` | The content of badge. Usually `Text` or `Icon`. |
| `Color badgeColor` | Background color of the badge. |
| `Widget child` | The main widget. By default it's below the red badge. Usually `Icon`, `IconButton`, `Text` or button. |
| `double elevation` | Shadow of the badge. |
| `Gradient gradient` | Gradient color for the badge content. |
| `bool toAnimate` | Whether animate badge when badge content changed or not. |
| `BadgePosition position` | Can be one of `BadgePosition.topStart()`, `BadgePosition.topEnd()`, `BadgePosition.bottomStart()`, `BadgePosition.bottomEnd()`. Sometimes you want to create unique badge position or create new one manually. For this use `BadgePosition.topEnd(top: -12, end: -20)` or `BadgePosition(start, top, end, bottom)`. |
| `BadgeShape shape` | `BadgeShape.circle` or `BadgeShape.square`. You can use `borderRadius` to change border radius of badge of you use square `BadgeShape.square`. |
| `BorderRadiusGeometry borderRadius` | Border radius of badge. Applies only if `BadgeShape.square` is used. |
| `EdgeInsetsGeometry padding` | The padding of badge content. |
| `Duration animationDuration` | The duration of badge animation when badge content is changed. |
| `BadgeAnimationType animationType` | Can be one of `BadgeAnimationType.slide`, `BadgeAnimationType.scale` or `BadgeAnimationType.fade`. |
| `bool showBadge` | Hide or show badge with animation using bool flag. |
| `AlignmentGeometry alignment` | Alignment of the whole widget |
| `bool ignorePointer` | Enable or disable (default) ignore pointer option |
| `BorderSide borderSide` | Adds a border to the badge |

<br>
<br>
Expand Down

0 comments on commit 7bdc875

Please sign in to comment.