forked from lxm_flutter/FlutterUnit
🎨 优化展示组件代码的存在形式,stateless重构完毕
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// create by 张风捷特烈 on 2020-03-25
|
||||
/// contact me by email 1981462002@qq.com
|
||||
/// 说明:
|
||||
// {
|
||||
// "widgetId": 141,
|
||||
// "name": 'SnackBarAction基本使用',
|
||||
// "priority": 1,
|
||||
// "subtitle":
|
||||
// "【label】 : 标签 【String】\n"
|
||||
// "【textColor】 : 文字颜色 【Color】\n"
|
||||
// "【disabledTextColor】 : 文字失效色 【Color】\n"
|
||||
// "【onPressed】 : 点击回调 【Function()】",
|
||||
// }
|
||||
class CustomSnackBarAction extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: SnackBarAction(
|
||||
disabledTextColor: Colors.red,
|
||||
textColor: Colors.blue,
|
||||
label: '确定',
|
||||
onPressed: () => print('onPressed')));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user