diff --git a/example/lib/example_tag.dart b/example/lib/example_tag.dart index 92d33af..007acca 100644 --- a/example/lib/example_tag.dart +++ b/example/lib/example_tag.dart @@ -19,15 +19,15 @@ class _ExampaleTagState extends State { children: [ ListTile( title: Text('yellowSolid'), - trailing: ASTag.yellowSolid('带电'), + trailing: ASTag.yellowSolid('带电',), ), ListTile( title: Text('redHollow'), - trailing: ASTag.redHollow('带磁'), + trailing: ASTag.redHollow('带磁',width: 36.w,), ), ListTile( title: Text('yellowHollow'), - trailing: ASTag.yellowHollow('选填'), + trailing: ASTag.yellowHollow('选填',width: 36.w,), ), ListTile( title: Text('redHollow'), diff --git a/lib/tag/as_tag.dart b/lib/tag/as_tag.dart index cf8dab9..30e85b3 100644 --- a/lib/tag/as_tag.dart +++ b/lib/tag/as_tag.dart @@ -115,10 +115,9 @@ class _ASTagState extends State { @override Widget build(BuildContext context) { return Container( - padding: widget.padding ?? EdgeInsets.symmetric(horizontal: 6.w), - alignment: Alignment.center, + padding: widget.padding ?? EdgeInsets.symmetric(horizontal: 6.w,vertical: 2.w), width: widget.width, - height: widget.height ?? 18.w, + height: widget.height, decoration: BoxDecoration( color: widget.bgColor ?? kDarkPrimaryColor, border: widget.outline