shadow 0.1.5
shadow #
the easiest way to add Shadow to any widget.
proprities #
Offset(dx,dy) : #
change the position of the shadow according to the widget position.
Opacity(double) : #
change the visibility of the shade from 1 to 0, 1 as fully visible and 0 not visible at all.
Scale(double) : #
this propritie is meant to change the size of the shadow (Shadow size onyl not the widget itself).
Examples #
Containers: #
Shadow(
child:
Container(
color:Colors.redAccent ,
height: 50,
width: 50,
),
),
Stacks: #
Shadow(
offset: Offset(-10, -10),
child:
Stack(
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 20),
color:Colors.redAccent ,
height: 150,
width: 150,
),
Container(
margin: EdgeInsets.only(left: 25),
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.all(Radius.circular(50)),
),
height: 50,
width: 100,
),
],
),
),
images(assets): #
Shadow(
offset: Offset(-10, -0),
child:
Container(
margin: EdgeInsets.only(left: 100),
height: 320,
width: 350,
child: Center(
child: Stack(
children: <Widget>[
Container(
margin: EdgeInsets.only(bottom: 0,left: 12,top: 15),
height: 80,
width: 80,
child: Image.asset('assets/images/head.png')),
Container(
margin: EdgeInsets.only(top: 60),
height: 150,
width: 150,
child: Image.asset('assets/images/body.png')),
Container(
margin: EdgeInsets.only(top: 150),
height: 70,
width: 350,
child: Row(
children: <Widget>[
Image.asset('assets/images/wheel.png'),
SizedBox(width: 17,),
Image.asset('assets/images/wheel.png'),
],
)),
],
),
),
),
),
Getting Started #
This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
[0.0.1] - 2019 - 9 - 8
First launch.
[0.0.2] - 2019 - 9 - 8
Fill Readme and set everything about the package.
[0.0.3] - 2019 - 9 - 9
Fix intial setup.
[0.1.5] - 2019 - 9 - 12
Add images to README and add some examples to better explain the functionalities.
exemple #
import 'package:flutter/material.dart';
import 'package:shadow/shadow.dart';
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: Text('Shadow'),
),
body:
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(' Icon',style: TextStyle(fontSize: 40),),
SizedBox(width: 150,),
Text(' Container',style: TextStyle(fontSize: 40),),
],
),
SizedBox(height: 100,),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Shadow(
child: Icon(Icons.star,size: 155,color: Colors.amber,),
),
SizedBox(width: 180,),
Shadow(
offset: Offset(10, 10),
child: Container(
height: 150,
width: 150,
decoration: BoxDecoration(
color: Colors.blue[700],
border: Border.all(width: 2,color: Colors.orange),
borderRadius: BorderRadius.all(Radius.circular(20))
),
),
)
],
),
],
),
);
}
}
A new Flutter project.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies:
shadow: ^0.1.5
2. Install it
You can install packages from the command line:
with Flutter:
$ flutter pub get
Alternatively, your editor might support flutter pub get
.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
import 'package:shadow/shadow.dart';
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
79
|
Health:
Code health derived from static analysis.
[more]
|
100
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
100
|
Overall:
Weighted score of the above.
[more]
|
90
|
We analyzed this package on Dec 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.1
- pana: 0.13.1+4
- Flutter: 1.12.13+hotfix.2
Health suggestions
Format lib/shadow.dart
.
Run flutter format
to format lib/shadow.dart
.
Dependencies
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.1.0 <3.0.0 | ||
flutter | 0.0.0 | ||
Transitive dependencies | |||
collection | 1.14.11 | 1.14.12 | |
meta | 1.1.8 | ||
sky_engine | 0.0.99 | ||
typed_data | 1.1.6 | ||
vector_math | 2.0.8 | ||
Dev dependencies | |||
flutter_test |