flutter_glow 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • new76

Flutter Glow package #

Header

complete and easy to use flutter glow ui kit that help you to create and use glow widgets.

installation #

for install this package add package to your pubspec.yaml file:

dependencies:
  flutter_glow: ^0.1.2

run flutter pub get to download package. also, import the package in your file:

import 'package:flutter_glow/flutter_glow.dart';

Widgets #

Preview Widget Description
GlowButton A Glow button that show inkwell animation to intracting with user
GlowIcon A Glow widget that is responsible for show icon with glow effect
GlowText Glow text is used to show glow under the text
GlowCheckbox A button associated with a value, can be checked/unckecked, if checked, takes the color value
GlowRadio A set of glow radio component with single selection at time.
GlowSwitch Glow is an cupertino switch that integrated with GlowContainer to show glow under Switch

Glow Theme #

you can create your own GlowTheme. Since GlowTheme is an InheritedWidget you can use it to Handle whole app changes or use it for tiny scope.

[0.1.2] - Formatting and Refactoring code. #

  • packaged description updated

[0.1.1] - Formatting and Refactoring code. #

  • all package files has been formatted
  • packaged description updated

[0.1.0] - First Implementation of package. #

  • Components:
    • GlowContainer
    • GlowButton
    • GlowIcon
    • GlowText
    • GlowCheckbox
    • GlowRadio
    • GlowSwitch
  • Theme and Layouts:
    • GlowThemeData
    • GlowTheme
    • GlowThemeType

example/lib/main.dart

import 'dart:developer';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_glow/flutter_glow.dart';

const flutterColor = Color(0xFF40D0FD);

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  bool checkboxSelected = false;
  bool switchSelected = false;
  bool radioSelected = false;
  bool iconSelected = false;

  double sliderValue = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.max,
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            GlowButton(
              child: Text('Glow'),
              onPressed: () {},
              color: flutterColor,
            ),
            SizedBox(height: 32),
            GlowCheckbox(
              value: checkboxSelected,
              enable: true,
              color: flutterColor,
              onChange: (bool value) {
                setState(() {
                  checkboxSelected = !checkboxSelected;
                });
              },
            ),
            SizedBox(height: 32),
            GestureDetector(
              onTap: () {
                setState(() {
                  iconSelected = !iconSelected;
                });
              },
              child: GlowIcon(
                iconSelected ? Icons.wb_cloudy : Icons.cloud_queue,
                color: flutterColor,
                glowColor: iconSelected ? flutterColor : Colors.transparent,
                size: 64,
                blurRadius: 9,
              ),
            ),
            SizedBox(height: 32),
            GlowText(
              'Glow Text',
              style: TextStyle(fontSize: 40, color: flutterColor),
            ),
            SizedBox(height: 32),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                GlowRadio<bool>(
                  value: true,
                  groupValue: radioSelected,
                  color: flutterColor,
                  onChange: (value) {
                    setState(() {
                      radioSelected = value;
                      log(value.toString());
                    });
                  },
                ),
                SizedBox(width: 32),
                GlowRadio<bool>(
                  value: false,
                  color: flutterColor,
                  groupValue: radioSelected,
                  onChange: (value) {
                    setState(() {
                      radioSelected = value;
                      log(value.toString());
                    });
                  },
                ),
              ],
            ),
            SizedBox(height: 32),
            GlowSwitch(
              onChanged: (value) {
                setState(() {
                  switchSelected = value;
                });
              },
              value: switchSelected,
              activeColor: flutterColor.withOpacity(0.6),
              blurRadius: 4,
            ),
            SizedBox(height: 32),
            GlowLineProgress(
              blurRadius: 12,
              glowColor: flutterColor,
            )
          ],
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_glow: ^0.1.2

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:flutter_glow/flutter_glow.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
52
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]
76
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • flutter_glow that is a package requiring null.

Health suggestions

Format lib/src/theme/glow_theme_inherited.dart.

Run flutter format to format lib/src/theme/glow_theme_inherited.dart.

Format lib/src/theme/theme.dart.

Run flutter format to format lib/src/theme/theme.dart.

Format lib/src/widget/glow_button.dart.

Run flutter format to format lib/src/widget/glow_button.dart.

Fix additional 6 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/widget/glow_checkbox.dart (Run flutter format to format lib/src/widget/glow_checkbox.dart.)
  • lib/src/widget/glow_container.dart (Run flutter format to format lib/src/widget/glow_container.dart.)
  • lib/src/widget/glow_icon.dart (Run flutter format to format lib/src/widget/glow_icon.dart.)
  • lib/src/widget/glow_radio.dart (Run flutter format to format lib/src/widget/glow_radio.dart.)
  • lib/src/widget/glow_switch.dart (Run flutter format to format lib/src/widget/glow_switch.dart.)
  • lib/src/widget/glow_text.dart (Run flutter format to format lib/src/widget/glow_text.dart.)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test