Skip to content

A new Flutter package. about font adaptation label size widget

License

Notifications You must be signed in to change notification settings

HappyGhostz/label_auto_text

Repository files navigation

label_auto_text

A label widget that appears on other widgets, and its internal text adapts to the label size

Revised from https://github.com/flyou/label_view

Getting Started

To use this packages, add label_auto_text as a dependency in your pubspec.yaml file.

import 'package:label_auto_text.dart';

Example

@override
  Widget build(BuildContext context) {
    return LabelViewDecoration(
        size: Size(80.0, 80.0),//label size
        labelColor: Colors.red,//label color
        labelAlignment: LabelAlignment.leftTop,//The orientation of the label attached to the widget
        useAngle: true,//
        labelText: "Hot",
        labelTextColor: Colors.white,
        child: _builderItem()//Label attached widget
    );
  }
  • labelAlignment: LabelAlignment.leftTop, LabelAlignment.leftTop

  • labelAlignment: LabelAlignment.leftBottom, LabelAlignment.leftBottom

  • labelAlignment: LabelAlignment.rightTop, LabelAlignment.rightTop

  • labelAlignment: LabelAlignment.rightBottom, LabelAlignment.rightBottom

About

A new Flutter package. about font adaptation label size widget

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published