You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.0 KiB

import 'package:flutter/material.dart';
class BorderText extends StatelessWidget {
final String text;
final Color textColor;
final Color borderColor;
final double fontSize;
final double borderWidth;
final double radius;
final FontWeight fontWeight;
final EdgeInsetsGeometry padding;
BorderText(
{Key key, this.text,
this.textColor = Colors.black,
this.fontSize = 10,
this.borderWidth = 2,
this.borderColor = Colors.white,
this.radius = 2,
this.padding,
this.fontWeight = FontWeight.normal});
@override
Widget build(BuildContext context) {
return Container(
padding: padding,
alignment: Alignment.center,
decoration: BoxDecoration(
border: Border.all(color: borderColor, width: borderWidth),
borderRadius: BorderRadius.all(Radius.circular(radius))),
child: Text(
text,
style: TextStyle(
color: textColor,
fontSize: fontSize,
fontWeight: fontWeight,
),
),
);
}
}