Skip to content

Commit

Permalink
fix BrnMultiSelectTagsPicker style error (LianjiaTech#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayceV552 committed Sep 3, 2022
1 parent 1878c79 commit 8a607fa
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions lib/src/components/picker/brn_mulit_select_tags_picker.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import 'package:bruno/src/components/picker/base/brn_picker_title_config.dart';
import 'package:bruno/src/components/picker/brn_tags_common_picker.dart';
import 'package:bruno/src/components/picker/brn_tags_picker_config.dart';
Expand Down Expand Up @@ -239,28 +237,35 @@ class BrnMultiSelectTagsPicker extends CommonTagsPicker {
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Wrap(
spacing: 15.0,
runSpacing: 15.0,
children: this._sourceTags.map((choice) {
bool selected = choice.isSelect;
Color titleColor = selected
? tagConfig.selectTagTextStyle.color!
: tagConfig.tagTextStyle.color!;
EdgeInsets edgeInsets = this.tagPickerConfig.chipPadding ??
EdgeInsets.only(top: 9.0, left: 10.0, right: 10, bottom: 11.0);
return ChoiceChip(
selected: selected,
padding: edgeInsets,
pressElevation: 0,
backgroundColor: tagConfig.tagBackgroundColor,
selectedColor: tagConfig.selectedTagBackgroundColor
.withAlpha(0x14),
selectedColor: tagConfig.selectedTagBackgroundColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(2.0)),
label: Text(
onTagValueGetter(choice),
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
strutStyle: StrutStyle(forceStrutHeight: true, height: 1),
style: TextStyle(color: Colors.grey),
style: TextStyle(
height: 1,
color: titleColor,
fontWeight: selected ? FontWeight.w600 : FontWeight.w400,
fontSize: this.tagPickerConfig.tagTitleFontSize),
),
onSelected: (bool value) {
if (_selectedTags.length > this.maxSelectItemCount &&
if (_selectedTags.length >= this.maxSelectItemCount &&
this.maxSelectItemCount > 0 &&
value == true) {
if (this.onMaxSelectClick != null) {
Expand Down

0 comments on commit 8a607fa

Please sign in to comment.