rename IconShadeWidget -> IconShade

This commit is contained in:
Chen Asraf
2021-07-31 01:11:19 +03:00
parent 95ffff4bc4
commit d8ec4b88e4
5 changed files with 44 additions and 23 deletions

View File

@@ -1,5 +1,9 @@
# CHANGELOG
## [2.0.3]
- Rename component - remove redundant "Widget"
## [2.0.2]
- Rename component to match package name

View File

@@ -12,21 +12,38 @@ null safety.
### 1. Add dependencies to pubspec.yaml
```yaml
flutter_icon_shade: ^1.0.1
flutter_icon_shade: ^2.0.2
```
### 2. Add icons
```dart
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
IconShadowWidget(Icon(Icons.lightbulb_outline,
color: Colors.lightBlueAccent, size: 36)),
IconShadowWidget(Icon(Icons.lightbulb_outline,
color: Colors.lightBlueAccent, size: 36),shadowColor: Colors.lightBlueAccent.shade100,),
IconShadowWidget(Icon(Icons.lightbulb_outline,
color: Colors.lightBlueAccent, size: 36),showShadow: false,)
],
)
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
IconShade(
Icon(
Icons.lightbulb_outline,
color: Colors.lightBlueAccent,
size: 36,
),
),
IconShade(
Icon(
Icons.lightbulb_outline,
color: Colors.lightBlueAccent,
size: 36,
),
shadowColor: Colors.lightBlueAccent.shade100,
),
IconShade(
Icon(
Icons.lightbulb_outline,
color: Colors.lightBlueAccent,
size: 36,
),
showShadow: false,
),
],
)
```

View File

@@ -40,14 +40,14 @@ class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
IconShadeWidget(Icon(Icons.lightbulb_outline,
IconShade(Icon(Icons.lightbulb_outline,
color: Colors.lightBlueAccent, size: 36)),
IconShadeWidget(
IconShade(
Icon(Icons.lightbulb_outline,
color: Colors.lightBlueAccent, size: 36),
shadowColor: Colors.lightBlueAccent.shade100,
),
IconShadeWidget(
IconShade(
Icon(Icons.lightbulb_outline,
color: Colors.lightBlueAccent, size: 36),
showShadow: false,
@@ -57,13 +57,13 @@ class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
IconShadeWidget(
IconShade(
Icon(Icons.home, color: Colors.green.shade900, size: 36),
shadowColor: Colors.yellowAccent,
),
IconShadeWidget(
IconShade(
Icon(Icons.home, color: Colors.green.shade900, size: 36)),
IconShadeWidget(
IconShade(
Icon(Icons.home, color: Colors.green.shade900, size: 36),
showShadow: false,
)
@@ -72,15 +72,15 @@ class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
IconShadeWidget(
IconShade(
Icon(Icons.access_alarm, color: Colors.black54, size: 36),
shadowColor: Colors.yellowAccent.shade400,
),
IconShadeWidget(
IconShade(
Icon(Icons.access_alarm, color: Colors.black54, size: 36),
shadowColor: Colors.red.shade400,
),
IconShadeWidget(
IconShade(
Icon(Icons.access_alarm, color: Colors.black54, size: 36),
shadowColor: Colors.cyanAccent.shade400,
)

View File

@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'dart:ui' as ui;
class IconShadeWidget extends StatelessWidget {
class IconShade extends StatelessWidget {
final Icon icon;
final bool showShadow;
final Color? shadowColor;
IconShadeWidget(this.icon, {this.showShadow = true, this.shadowColor});
IconShade(this.icon, {this.showShadow = true, this.shadowColor});
@override
Widget build(BuildContext context) {

View File

@@ -1,6 +1,6 @@
name: flutter_icon_shade
description: flutter icon shadow.
version: 2.0.2
version: 2.0.3
homepage: https://github.com/chenasraf/flutter_flutter_icon_shade
environment: