digital_lcd 1.0.2

  • Readme
  • Changelog
  • Installing
  • new47

author author author GitHub

Flutter Digital Lcd Widget #

Digital Lcd Style Widget For Numbers.

About #

With this plugin you can create digital lcd style number widgets. Supports various phone sizes. Settings are available for a responsive design.

Usage #

  1. Installing
  • Local
dependencies:
  digital_lcd:
    path: ../digital_lcd/
  • Package
dependencies:
  digital_lcd: ^1.0.1
  1. Import
import 'package:digital_lcd/digital_lcd.dart';
import 'package:digital_lcd/hex_color.dart';   //if you want use Hex Color codes this is required
  1. Example
Lcd(context).Number(
    number: 1837837, //Your number variable
    digitHorizontalMargin:8 ,//Each time this value is increased, the digits are shrinks. default 8
    digitCount:10, //Each time this value is increased, the digits are shrinks for width.
    lcdPadding: EdgeInsets.symmetric(horizontal:0),//this value only provides spaces to the left and right of the numbers. it also reduces proportionally the numbers
    lcdMargin: EdgeInsets.only(top:50),
    digitAlignment: MainAxisAlignment.center, //if you have extra width, use it for better ui
    lcdWidth: MediaQuery.of(context).size.width,// numbers automatically fit to width by count of digit. if you only use this value, the height of the lcd is automatically adjusted
    lcdHeight:110 , // you may need to use scaleFactor if you use this value.
    scaleFactor :MediaQuery.of(context).size.height < MediaQuery.of(context).size.width ? 0.38: 0.2,//if you use lcdHeight , set this value for better ui
    segmentWidth : 10,// Thickness of each segment default 10 , best value range 5-12
    lcdDecoration: BoxDecoration(  //This is default decoration . not required
                      gradient: LinearGradient(
                          begin: Alignment.topCenter,
                          end: Alignment.bottomCenter,
                          colors: [HexColor("#A2AC89"), HexColor("#ABAE75")]
                      )
                  ),
     activeColor: Colors.black87.withOpacity(0.6),  //This is default  . not required
     inactiveColor: Colors.black26.withOpacity(0.08),  //This is default  . not required
),

Screenshots #

  • Horizontal
  • Vertical

[1.0.2] - Release

  • Update readme

[1.0.1] - Release

  • Digital lcd panel style widget

Use this package as a library

1. Depend on it

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


dependencies:
  digital_lcd: ^1.0.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:digital_lcd/digital_lcd.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
7
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
47
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/digital_lcd.dart. (-1.99 points)

Analysis of lib/digital_lcd.dart reported 4 hints:

line 139 col 10: Name non-constant identifiers using lowerCamelCase.

line 220 col 10: Name non-constant identifiers using lowerCamelCase.

line 228 col 12: Name non-constant identifiers using lowerCamelCase.

line 229 col 12: Name non-constant identifiers using lowerCamelCase.

Format lib/digit_clipper.dart.

Run flutter format to format lib/digit_clipper.dart.

Format lib/hex_color.dart.

Run flutter format to format lib/hex_color.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and digital_lcd.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

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.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8