lcd_led 1.0.0 copy "lcd_led: ^1.0.0" to clipboard
lcd_led: ^1.0.0 copied to clipboard

Experience the nostalgic charm of a 7-segment LED display with accurate rendering of digits, commas, and dots.

LCD LED #

Pub

Emulates a 7 LEDs display (well, with colon and dot also!).

Features #

Screenshot

  • display numbers, dots, colon, and minus chars
  • customizable colors

Usage #

Case 1 (fixed overall size)

Give the LedDigits widget a fixed size. If the numberOfLeds > string.length, the widget will align the digits to the right.

SizedBox(
    width: 500,
    height: 70,
    child: LedDigits(
        string: '-12.3:',
        numberOfLeds: 6,
        spacing: 5,
        backgroundColor: Colors.black, // default value
        onColor: Colors.red, // default value
        offColor: Color.fromARGB(255, 49, 49, 49), // default value
    ),
)
Case 2 (fixed height)

If you want a fixed height and a dynamic width, use something like the below code:

SizedBox(
    height: 70,
    child: AspectRatio(
        aspectRatio: n.length.toDouble()/1.5, // the LEDs width will be half the `SizedBox` height
        child: LedDigits(
        string: n,
        numberOfLeds: n.length,
    ),
)
2
likes
140
pub points
56%
popularity
screenshot

Publisher

verified publishermarcobavagnoli.com

Experience the nostalgic charm of a 7-segment LED display with accurate rendering of digits, commas, and dots.

Repository (GitHub)
View/report issues

Topics

#lcd #led #display

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on lcd_led