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.

Overview

Image 1

Flutter Shine

Pub Build Status Awesome Flutter

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

GitHub stars GitHub forks GitHub watchers GitHub followers
Twitter Follow

Flutter widget inspired by Shine

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) {
        return Column(
            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) {
        return Column(
            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 the example folder.

Web Examples

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

  1. Clone this repo and enter the directory
  2. Run pub get
  3. Run pub run build_runner serve example
  4. Navigate to http://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. Run pub get
  3. Run dart 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 online documentation.

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 the example/lib/ directory
  4. Run flutter doctor to ensure you have all Flutter dependencies working.
  5. Run flutter packages get
  6. Run flutter run

Stargazers over time

Stargazers over time

License

MIT License

Copyright (c) 2020 Jonathan Monga

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, 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 THE
SOFTWARE.
You might also like...

A smartphone application called Easy Job goal is to make easier for businesses to find people who meet their standards as well as for job seekers to search for and choose from available positions .

Easy_Jobs 19SW54(MAD-Project) A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to ge

Nov 6, 2022

Widget to let the user search through a keyword string typed on a customizable keyboard in a single or multiple choices list presented as a dropdown in a dialog box or a menu.

Widget to let the user search through a keyword string typed on a customizable keyboard in a single or multiple choices list presented as a dropdown in a dialog box or a menu.

searchable_dropdown Widget to let the user search through a keyword string typed on a customizable keyboard in a single or multiple choices list prese

Sep 11, 2022

Flutter-based mobile app displaying a list of daily curated content from top engineering blogs and articles. Backed by a GraphQL-based API written in Kotlin..

Flutter-based mobile app displaying a list of daily curated content from top engineering blogs and articles. Backed by a GraphQL-based API written in Kotlin..

Flutter-based mobile app displaying a list of daily curated content from top engineering blogs and articles. Backed by a GraphQL-based API written in Kotlin..

Dec 14, 2022

Flutter Cupertino text box which can be used to select a date with CupertinoDatePicker

Flutter Cupertino text box which can be used to select a date with CupertinoDatePicker

Flutter Cupertino Date Text Box A text box with an attached CupertinoDatePicker which opens when the text box is tapped. With this library the followi

Feb 13, 2022

Dynamic var - Dart dilinde dynamic ve var veri tiplerini anlamanızı kolaylaştıracak örnektir.

dynamic ve var arasındaki fark dynamic Tanımlanan değişkenin tipi daha sonra kod içerisinde değişebilir. Örneğin int olarak tanımlanan bir a değişkeni

Jan 1, 2022

A pure dart SSH implementation based on dartssh, with bug fixes, up-to-date dependencies and sound null safety.

DartSSH 2 dartssh2 is a pure dart SSH implementation based on dartssh, with bug fixes, up-to-date dependencies and sound null safety. dartssh2 providi

Dec 29, 2022

Masked text field - A flutter package for masked text field for formet your text and good UI

Masked text field - A flutter package for masked text field for formet your text and good UI

Masked Text Field Masked Text Field Features A package for masked text field for

Sep 4, 2022

Text analyzer that extracts tokens from text for use in full-text search queries and indexes.

Text analyzer that extracts tokens from text for use in full-text search queries and indexes.

Tokenize text, compute document readbility and compare terms in Natural Language Processing. THIS PACKAGE IS PRE-RELEASE, and SUBJECT TO DAILY BREAKIN

Dec 12, 2022

A powerful extended official text for Flutter, which supports Speical Text(Image,@somebody), Custom Background, Custom overFlow, Text Selection.

A powerful extended official text for Flutter, which supports Speical Text(Image,@somebody), Custom Background, Custom overFlow, Text Selection.

Extended official text to build special text like inline image or @somebody quickly,it also support custom background,custom over flow and custom selection toolbar and handles.

Jan 4, 2023

Textfield-based rich input box

Textfield-based rich input box

flutter_rich_input is no longer used and uses a better way to enable a new rich_input plugin, click here to see it! flutter_rich_input 不再维护,使用了更好的方式,新

Jan 19, 2021

Simple, pretty and powerful logger for flutter

Simple, pretty and powerful logger for flutter

Language: English | 中文简体 flutter_logger Simple, pretty and powerful logger for flutter,It has the log level, file name and line number, and can custom

Sep 23, 2022

A pretty plotting package for Flutter apps

A pretty plotting package for Flutter apps

flutter_plot R. C. Howell - 2018 A pretty plotting package for Flutter apps. Sizing and autopadding isn't great right now, but tinkering with padding

Sep 27, 2022

A flutter package that developers have pretty logs instead just printing everything like a newbie

A flutter package that developers have pretty logs instead just printing everything like a newbie. Features Makes it easy to log to console without us

Nov 28, 2021

Simple but pretty cool birthday countdown app built using flutter

Simple but pretty cool birthday countdown app built using flutter

Simple but pretty cool birthday countdown app "For You" 😽 Don't forget to star ⭐ the repo if you like what you I have created 😉 . 📸 GIF of a sample

Aug 13, 2022

This perfect starter kit is an app based on React Native and UI Kitten library with Light and Dark themes support.

This perfect starter kit is an app based on React Native and UI Kitten library with Light and Dark themes support.

Kitten Tricks This perfect starter kit is an app based on React Native and UI Kitten library with Light and Dark themes support. It’s completely free

Dec 30, 2022

A text field that displays text on different languages based on your selection.

translatable_text_field A text field that displays text on different languages based on your selection. Its basic idea is that you place this fields i

Mar 13, 2022

Dynamic Text Highlighting (DTH) package for Dart & Flutter.

Dynamic Text Highlighting (DTH) package for Dart & Flutter.

Dynamic Text Highlighting (DTH) This package is used to highlight, in a completely dynamic way, keywords, or phrases, wherever they are present in a s

Oct 3, 2022

Dynamic Text Highlighting (DTH) package for Dart & Flutter.

Dynamic Text Highlighting (DTH) package for Dart & Flutter.

Dynamic Text Highlighting (DTH) This package is used to highlight, in a completely dynamic way, keywords, or phrases, wherever they are present in a s

Oct 3, 2022

Add decoration capabilities for the Icon widget with shadows, borders, gradients.

icon_decoration Add decoration capabilities for the Icon widget with shadows, borders, gradients. This new DecoratedIcon widget overlap itself with th

Oct 7, 2022
Comments
  • why boxShadows is null?

    why boxShadows is null?

    ` IndexedStack(

            index: _tabIndex,
            children: <Widget>[
          FlutterShine(
          config: Config(shadowColor: Color(0xFF3498D8),blur: 35,blurPow:1),
        light: Light(intensity: 1,position:Point(0,0)),
        builder: (BuildContext context, ShineShadow shineShadow) {
          print("shineShadow=$shineShadow");
          return
            Container(
                width: double.infinity,
                height: 300,
                decoration: BoxDecoration(
                    color: Colors.white, boxShadow: shineShadow.boxShadows),);})
            ],
          )
    

    `

    The getter 'boxShadows' was called on null. Receiver: null Tried calling: boxShadows

    opened by fireknight 2
Owner
Jonathan Monga
Android & Flutter developer | Speaker | Writer.
Jonathan Monga
A flutter based liquid swipe

This repository contains the Liquid Swipe Flutter source code. Liquid swipe is the revealing clipper to bring off amazing liquid like swipe to stacked

Sahdeep Singh 987 Dec 28, 2022
photofilters library for flutter

Photo Filters package for flutter A flutter package for iOS and Android for applying filter to an image. A set of preset filters are also available. Y

Sharafudheen KK 336 Dec 23, 2022
Widget for displaying waves with custom color, duration, floating and blur effects.

Wave Widget for displaying waves with custom color, duration, floating and blur effects. Getting Started WaveWidget( config: CustomConfig(

Protoss 890 Dec 31, 2022
A sample for having PageView transformation effects in Flutter.

What is it? The end result looks a little something like this: Sample project for creating nice looking PageView parallax effects in Flutter. Read the

Iiro Krankka 811 Dec 22, 2022
A package provides an easy way to add shimmer effect in Flutter project

Shimmer A package provides an easy way to add shimmer effect in Flutter project How to use import 'package:shimmer/shimmer.dart'; SizedBox( width:

HungHD 1.6k Jan 8, 2023
A library for pretty shadows.

shine.js A library for pretty shadows. See the working demo at http://bigspaceship.github.io/shine.js/. Get Started Install using bower: bower install

Big Spaceship 2.2k Dec 23, 2022
Flutter pretty qr - Pretty QR code with round edges.

pretty_qr_code Pretty QR code for Flutter. You can round the edges with parameter or use the standard view. Features Created with QR dart Screenshots

null 42 Oct 30, 2022
A package that provides a highly customizable sheet widget that snaps to different vertical & horizontal positions

Snapping Sheet A package that provides a highly customizable sheet widget that snaps to different vertical & horizontal positions Can adapt to scrolla

Adam Jonsson 364 Dec 6, 2022
Animated dialog box - A pure dart package for showing animated alert box.

animated_dialog_box A pure dart package for showing animated alert box. Getting Started https://github.com/Shubham-Narkhede/animated_dialog_box/blob/m

Shubham-Narkhede 10 Jul 24, 2022
Making drawings and animations in Flutter extremely simple

?? GraphX™ | rendering | prototype | design | Making drawings and animations in Flutter extremely simple. wiki-tips. To get some extended, boring expl

Roi Peker 382 Dec 21, 2022