mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-04-30 19:37:35 -05:00
improvement: style tweaks
This commit is contained in:
29
lib/widgets/label.dart
Normal file
29
lib/widgets/label.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
|
||||
class Label extends StatelessWidget {
|
||||
final String name;
|
||||
final String cssColor;
|
||||
|
||||
Label({this.name, this.cssColor});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final color = convertColor(cssColor);
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 2, horizontal: 6),
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
borderRadius: BorderRadius.all(Radius.circular(4)),
|
||||
),
|
||||
child: Text(
|
||||
name,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: getFontColorByBrightness(color),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user