mirror of
https://github.com/chenasraf/flutter_icon_shadow.git
synced 2026-05-18 01:48:58 +00:00
rename IconShadeWidget -> IconShade
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# CHANGELOG
|
||||
|
||||
## [2.0.3]
|
||||
|
||||
- Rename component - remove redundant "Widget"
|
||||
|
||||
## [2.0.2]
|
||||
|
||||
- Rename component to match package name
|
||||
|
||||
39
README.md
39
README.md
@@ -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,
|
||||
),
|
||||
],
|
||||
)
|
||||
```
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user