fix: segment button icons

This commit is contained in:
DenserMeerkat
2024-07-04 16:24:53 +05:30
parent 3f17840361
commit 9eeaf7e498

View File

@ -425,13 +425,8 @@ class _BodySuccessState extends State<BodySuccess> {
(widget.options == kRawBodyViewOptions)
? const SizedBox()
: SegmentedButton<ResponseBodyView>(
showSelectedIcon: showLabel,
style: const ButtonStyle(
padding: WidgetStatePropertyAll(
EdgeInsets.symmetric(
horizontal: 8,
),
),
style: SegmentedButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 8),
),
selectedIcon: Icon(currentSeg.icon),
segments: widget.options
@ -439,7 +434,10 @@ class _BodySuccessState extends State<BodySuccess> {
(e) => ButtonSegment<ResponseBodyView>(
value: e,
label: Text(e.label),
icon: showLabel ? Icon(e.icon) : null,
icon: constraints.maxWidth >
kMinWindowSize.width
? Icon(e.icon)
: null,
),
)
.toList(),