Skip to content

Commit

Permalink
Fix tag overflow/size in TagChip for linux-build
Browse files Browse the repository at this point in the history
  • Loading branch information
TaYaKi71751 committed Dec 12, 2023
1 parent 8655836 commit 563f463
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions lib/widgets/article_item/article_list_item_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,12 @@ class BodyWidget extends StatelessWidget {
getxId: getxId,
),
Expanded(
child: _DetailWidget(
child: ((){
var a = _DetailWidget(
getxId: getxId,
),
);
return a;
})(),
)
],
)
Expand Down Expand Up @@ -584,13 +587,32 @@ class _DetailWidget extends StatelessWidget {
e.contains(':') ? e.split(':')[0] : 'tags',
e.contains(':') ? e.split(':')[1] : e))
.toList();

return Wrap(
var _body = Wrap(
spacing: 3.0,
runSpacing: -10.0,
children:
runSpacing: ((){
if(Platform.isAndroid || Platform.isIOS) return -10.0;
if(Platform.isLinux) return 10.0;
return -10.0;
})(),
children:
tags.map((x) => TagChip(group: x.item1, name: x.item2)).toList(),
);
if(Platform.isAndroid || Platform.isIOS){
return _body;
}
if(Platform.isLinux){
return Container(
height: ((){
if(Platform.isAndroid || Platform.isIOS) return null;
if(Platform.isLinux) return 30.0;
return null;
})(),
child: ClipRect(
child: _body,
)
);
}
return _body;
}
}

Expand Down Expand Up @@ -710,7 +732,11 @@ class TagChip extends StatelessWidget {
);

return SizedBox(
height: 42,
height: ((){
if(Platform.isAndroid || Platform.isIOS) return 42.0;
if(Platform.isLinux) return 25.0;
return 42.0;
})(),
child: FittedBox(child: fc),
);
}
Expand Down

0 comments on commit 563f463

Please sign in to comment.