# CommonButton **Repository Path**: coolerting/common_button ## Basic Information - **Project Name**: CommonButton - **Description**: flutter通用按钮组件 - **Primary Language**: Dart - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-22 - **Last Updated**: 2022-03-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # common_button CommonButton Flutter通用按钮,可高度自定义 ## 使用方法 ``` CommonButton( effectDisabled: true, title: "编辑", selectedTitle: "完成", selected: _isEditing, disabled: _editButtonDisabled, normalStyle: TextStyle( fontSize: 14, color: ColorTool.mainTipColor, ), selectedStyle: TextStyle( fontSize: 14, color: ColorTool.mainTipColor, ), disabledStyle: TextStyle( fontSize: 14, color: ColorTool.unimportantWordColor, ), contentInsets: EdgeInsets.only(left: 14, right: 14), onTap: () { setState(() { _isEditing = !_isEditing; if (_isEditing) { // 非编辑状态时重置标记变量 _isAllSelected = false; _deleteButtonDisabled = _resetDisabled = true; // 删除数组清空 _deleteData.clear(); } else { // 退出编辑状态将选中状态全部置为false _selectedList = List.filled( _selectedList.length, false); } }); }, ) ```