Coder Social home page Coder Social logo

ojasjain24 / neon_widgets_flutter Goto Github PK

View Code? Open in Web Editor NEW
27.0 1.0 3.0 88.75 MB

🌟This is a flutter package which provides most commonly used widgets with their normal and neon version. There are multiple different types of widgets under this package, which can be used to create more neon theme widget

Home Page: https://pub.dev/packages/neon_widgets

License: MIT License

Dart 100.00%
flutter dart package glow neon widgets widget-library cross-platform ui-components flutter-package

neon_widgets_flutter's Introduction

Neon Widgets💡

Most commonly used flutter widgets in neon version.

License Pub GitHub stars

Neon Widgets 2.0 => Breaking Changes

Animation disposal issues resolved. and every class' name have been changed, to comply with the standard dart syntax.

All the class names have been changed, to comply with the standard dart syntax. Previously every class had the name convention such that non-neon class' name started with the letter 'o', and neon classes started with 'oNeon'. But in the update, the neon class names now starts with 'Neon', and the letter 'o' has been removed from the starting of non-neon classes.

For example :

1 : 'oNeonContainer' is now changed to 'NeonContainer'.

2 : 'oNeonCustomVerticesProgressBar' is now changed to 'NeonCustomVerticesProgressBar'.

3 : 'oSearchBar' is now changed to 'SearchBar'.

Getting started

Readme Changelog Installing Versions Scores Admin Activity log Use this package as a library Depend on it Run this command:

Run this command:

With Dart:

 $ dart pub add neon_widgets

With Flutter:

 $ flutter pub add neon_widgets

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  neon_widgets: ^2.0.0

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it Now in your Dart code, you can use:

import 'package:neon_widgets/neon_widgets.dart';

Features

ExampleApp

Neon Widgets :

Flickering Neon Widgets (with random flicker rate) :

Loaders :

Widgets

neonText :

// neon text

 NeonText(
   text: "Neon text",
   spreadColor: Colors.pink,
   blurRadius: 20,
   textSize: 74,
   textColor: Colors.white,
 ),

// flickering neon text

 FlickerNeonText(
   text: "Flicker neon text",
   flickerTimeInMilliSeconds: 600,
   spreadColor: Colors.blue,
   blurRadius: 20,
   textSize: 74,
 ),

neonSearchBar :

NeonSearchBar()

Chat widgets :

// Left message card in neon theme
NeonLeftMsgCard(
  lightBlurRadius: 20,
  lightSpreadRadius: 5,
  msg:
      "Hi all, this is brand new library that provides most used widgets in neon and normal effect",
  time: "10:45",
),

const SizedBox(
  height: 20,
),

// Right message card in neon theme
NeonRightMsgCard(
    lightBlurRadius: 20,
    lightSpreadRadius: 10,
    backgroundColor: Colors.deepPurple,
    msg:
    "Hi all, this is brand new library that provides most used widgets in neon and normal effect",
    time: "10:45",
 ),

const SizedBox(
  height: 20,
),

// Left massage card

LeftMsgCard(
    msg:
    "Hi all, this is brand new library that provides most used widgets in neon and normal effect",
    time: "10:45",
),

const SizedBox(
  height: 20,
),

// Right massage card

RightMsgCard(
    msg:
    "Hi all, this is brand new library that provides most used widgets in neon and normal effect",
    time: "10:45",
),

const SizedBox(
  height: 20,
),

Add items widget :

Wrap(
direction: Axis.horizontal,
children: <Widget>[
  ...(searchedResults.map((e) =>
      NeonAddItemButton(
          data: e,
          borderColor: Colors.deepOrange.shade50,
          spreadColor: Colors.deepOrange,
          lightSpreadRadius: 3,
          lightBlurRadius: 18))),
],
),

NeonPoint widget :

NeonPoint(
  pointSize: 00,
  pointColor: Colors.red.shade100,
  spreadColor: Colors.red,
),

NeonLine widget :

NeonLine(
  spreadColor: Colors.brown,
  lightSpreadRadius: 30,
  lightBlurRadius: 90,
  lineWidth: 400,
  lineHeight: 0.02,
  lineColor: Colors.brown.shade100,
),

Flickering Neon widgets :

// Flickering neon line
FlickerNeonLine(
  spreadColor: Colors.brown,
  lightSpreadRadius: 30,
  lightBlurRadius: 60,
  lineWidth: 300,
  lineHeight: 2,
  lineColor: Colors.brown.shade100,

  // flicker rate which is selects a random value by default
  randomFlicker: false,
  flickerTimeInMilliSeconds: 1000,
),
// Flickering neon point
FlickerNeonPoint(
  pointSize: 010,
  pointColor: Colors.blue.shade100,
  spreadColor: Colors.blue,
),
// Flickering neon container
FlickerNeonContainer(
    spreadColor: Colors.green.shade700,
    child: WIDGET
),

Loaders :

 //loader type 1 : loader made of polynomial of n number of side
 NeonShapeVerticesProgressBar(number: 4)

 //loader type 2 : triangle shape with all colors customizable
 NeonTriangleVerticesProgressBar()

 //loader type 3 : square shape with all colors customizable
 NeonSquareVerticesProgressBar()

 //loader type 4 : image
 ImageProgressBar(image : "assets/images/abc.png")

Non Neon widgets :

SearchBar(),
const SizedBox(
  height: 20,
),
Wrap(
  direction: Axis.horizontal,
  children: <Widget>[
    ...(searchedResults
        .map((e) => AddItemButton(data: e))),
  ],
),
const SizedBox(
  height: 20,
),
Container(
  padding: const EdgeInsets.all(20),
  child: CircumscribingIconButton(
      icon: Icons.keyboard_arrow_left_sharp,
      onTap: () {},
      backgroundColor: Colors.purple),
),

Usage

Example code provided

NeonContainer(
  spreadColor: Colors.green.shade700,
  child: CircumscribingIconButton(
        icon: Icons.arrow_right_alt_sharp,
        onTap: () {},
        backgroundColor: Colors.green.shade700),
    borderRadius: BorderRadius.circular(100),
    lightBlurRadius: 100,
    lightSpreadRadius: 50,
  borderColor: Colors.green.shade100
)

Additional information

Wanna improve this package? Contribute to project on

github : https://github.com/ojasjain24/neon_widgets_flutter

create issue : https://github.com/ojasjain24/neon_widgets_flutter/issues

Contributing rules :

1 : create an issue describing the feature.

2 : comment on this issue that you are interested in resolving this issue.

3 : Create a Pull request in dev branch.

neon_widgets_flutter's People

Contributors

ojasjain24 avatar saileshbro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

neon_widgets_flutter's Issues

AnimationControllers not disposed.

The following assertion was thrown while notifying status listeners for AnimationController:
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4397 pos 12: '_lifecycleState != _ElementLifecycle.defunct': is not true.

Started getting this exception in my logs after this plugin was implemented. What I understood from the error and searching the solutions online, is that the animation controllers used for the flickering widgets are not disposed off and hence this exception is thrown.
It doesn't crash the app or anything but a fix would be better.

Sharp Border without background and

I am trying to implement something like this using this lib, but I can't quite work it out.

image

`class PalyerBanner extends StatelessWidget {
final String imageUrl

This is what I have so far. I can't get rid of the background color and there is no sharp borders.

const Banner(
  this.imageUrl, {
  Key? key,
}) : super(key: key);

@override
Widget build(BuildContext context) {
  return Row(
    mainAxisAlignment: MainAxisAlignment.spaceBetween,
    children: [
      _buildBorder(const Image(
          width: 150,
          height: 150,
          image: AssetImage(
            imageUrl,
          ))),
      Column(
        children: [
          const Text("VS",
              style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold)),
        ],
      ),
      Image(width: 150, height: 150, image: AssetImage(imageUrl)),
    ],
  );
}

_buildBorder(Widget widget) {
  return NeonContainer(
      margin: EdgeInsets.all(10),
      padding: EdgeInsets.all(0),
      width: 160,
      height: 160,
      spreadColor: Colors.blue.shade700,
      borderRadius: BorderRadius.circular(10),
      lightBlurRadius: 2,
      lightSpreadRadius: 2,
      containerColor: Colors.transparent,
      borderColor: Colors.blue.shade700,
      child: widget);
}
}`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.