ffBody method
body
Implementation
@override
Widget? ffBody(BuildContext context) {
return SingleChildScrollView(
child: FFLineContainer(
color: Colors.green,
children: [
FFTextButton(
notes: "文本展示",
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
unconstrainedBox: true,
text: "这是按扭",
color: Colors.pink,
onClick: () {
print("点击我了");
},
hiddenKeepFrame: boolValue,
// hiddenClearFrame: boolValue,
),
FFTextButton(
notes: "多行文本展示",
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
maxLines: 10,
text: "多行文本展示多行文本展示多行文本展示多行文本展示多行文本展示多行文本展示多行文本展示多行文本展示多行文本展示多行文本展示多行文本展示多行文本展示多行文本展示end",
color: Colors.pink,
onClick: () {
print("点击我了");
boolValue = !boolValue;
setState(() {
});
},
),
FFImageButton(
notes: "这是图片网络,带缓存",
image: FFImageFactory.cacheNetWork(FFImageUtil.utilDefaultNetImage),
width: 80,
color: Colors.pink,
),
SizedBox(
height: 20,
),
FFImageButton(
notes: "网络图片",
image: FFImageFactory.netWork(FFImageUtil.utilDefaultNetImage),
width: 80,
color: Colors.black,
),
FFImageButton(
notes: "这是本地图片",
image: FFImageFactory.asset(
"assets/images/common/icon_article_collect_nor@3x.png"),
width: 40,
heigth: 40,
color: Colors.red,
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 8),
),
SizedBox(
height: 20,
),
FFLineContainer(
notes: "线性布局",
direction: Axis.vertical,
children: [
FFImageButton(
image: null,
width: 60,
heigth: 60,
color: Colors.red,
),
FFImageButton(
image: null,
width: 60,
heigth: 60,
color: Colors.blue,
),
],
),
SizedBox(
height: 20,
),
FFLineContainer(
direction: Axis.horizontal,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
FFImageButton(
image: null,
width: 60,
heigth: 60,
color: Colors.red,
),
FFImageButton(
image: null,
width: 60,
heigth: 60,
color: Colors.blue,
),
],
),
SizedBox(
height: 20,
),
FFStackContainer(children: [
FFImageButton(
image: null,
width: 140,
heigth: 60,
color: Colors.red,
),
Positioned(
child: FFTextButton(
text: "我在红色上面",
),
),
])
],
),
);
}