Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Flutter Shine is a library for pretty and realistic shadows, dynamic light positions, extremely customizable shadows, no library dependencies, text or box shadows based on content.

License

NotificationsYou must be signed in to change notification settings

JonathanMonga/flutter_shine.dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image 1

Flutter Shine

PubBuild StatusAwesome Flutter

Show some ❤️ and star the repo to support the project

GitHub starsGitHub forksGitHub watchersGitHub followers
Twitter Follow

Flutter widget inspired byShine

Installation

Add the Package

dependencies:flutter_shine:^0.0.5

❔ Usage

Import this class

import'package:flutter_shine/flutter_shine.dart';

Flutter Shine

See how easy it is to create a shadow on text and on a container.

Exemple

FlutterShine(    builder: (BuildContext context,ShineShadow shineShadow) {returnColumn(            crossAxisAlignment:CrossAxisAlignment.center,            mainAxisAlignment:MainAxisAlignment.spaceEvenly,            mainAxisSize:MainAxisSize.max,            children:<Widget>[Text("Shine",                    style:TextStyle(                        fontSize:100,                        color:Colors.white,                        shadows: shineShadow.shadows),                ),Divider(),Container(                    width:300,                    height:300,                    decoration:BoxDecoration(                        color:Colors.white, boxShadow: shineShadow.boxShadows),                )            ],        );    },),

Extremely customizable shadow with a dynamic light positions.

You can customize follows values :

  • number of Steps : The density of the shadow
  • opacity : The opacity of the shadow
  • opacity Power : The opacity power
  • offset : The offset of the shadow
  • offset Power : The offset power
  • blur : The blur of the shadow
  • blur Power : The blur power
  • shadow Color : The color of the shadow

Exemple

FlutterShine(    [config:Config(shadowColor:Colors.red[300]),]    [light:Light(intensity:1, position:Point(x, y)),]    builder: (BuildContext context,ShineShadow shineShadow) {returnColumn(            crossAxisAlignment:CrossAxisAlignment.center,            mainAxisAlignment:MainAxisAlignment.spaceEvenly,            mainAxisSize:MainAxisSize.max,            children:<Widget>[Text("Shine",                    style:TextStyle(                        fontSize:100,                        color:Colors.white,                        shadows: shineShadow.shadows),                ),Divider(),Container(                    width:300,                    height:300,                    decoration:BoxDecoration(                        color:Colors.white, boxShadow: shineShadow.boxShadows),                )            ],        );    },),

Examples

Web and command-line examples can be found in theexample folder.

Web Examples

In order to run the web examples, please follow these steps:

  1. Clone this repo and enter the directory
  2. Runpub get
  3. Runpub run build_runner serve example
  4. Navigate tohttp://localhost:8080/web/ in your browser

Command Line Examples

In order to run the command line example, please follow these steps:

  1. Clone this repo and enter the directory
  2. Runpub get
  3. Rundart example/lib/main.dart

Flutter Example

Install Flutter

In order to run the flutter example, you must have Flutter installed. For installation instructions, view the onlinedocumentation.

Run the app

  1. Open up an Android Emulator, the iOS Simulator, or connect an appropriate mobile device for debugging.
  2. Open up a terminal
  3. cd into theexample/lib/ directory
  4. Runflutter doctor to ensure you have all Flutter dependencies working.
  5. Runflutter packages get
  6. Runflutter run

Stargazers over time

Stargazers over time

License

MIT LicenseCopyright (c) 2020 Jonathan MongaPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.

About

Flutter Shine is a library for pretty and realistic shadows, dynamic light positions, extremely customizable shadows, no library dependencies, text or box shadows based on content.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp