This is a simple encapsulation library of the base UI space, which is easy to use for common UI development.
Usage
初始化
Widget build(BuildContext context) {
return BLD(
style: TextStyle(
color: Colors.deepPurple,
),
builder: () => MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
));
}
文本(Text)
BLDText('text', textColor:Colors.white)
按钮(Button)
BLDButton(
text: '按钮标题',
image: Icon(Icons.ac_unit, size: 20),
padding: EdgeInsets.all(10),
radius: 10,
backgroundColor: Colors.deepOrangeAccent,
isExpand: false,
layoutStyle: ButtonLayoutStyle.landscapeLeft,
widgetSpace: 10,
onPressed: () {})
会话(Dialog)
showBLDCustomDialog(context, customStyle: (style){
style.titleColor = Colors.blue;
return style;
});
输入框(TextField)
BLDTextField(
controller: TextEditingController(),
hintText: '请输入内容',
title: '测试标题',
axis: BLDAxis.horizontal,
padding: EdgeInsets.symmetric(horizontal: 13.33),
backgroundColor: Colors.white,
radius: 6,
clean: Icon(Icons.close_rounded, color: Colors.red,),
alwaysClean: true,
obscureText: true,
showEye: true,
maxLength: 4,
),