forked from eatvio/eatvio_app
feat(profile): 371 task badge description onTap
This commit is contained in:
@@ -658,15 +658,53 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
children: [
|
||||
for (int i = 0; i < state.profile.badges.length; i++) ...[
|
||||
state.profile.badges[i].image.contains('svg')
|
||||
? SvgPicture.network(
|
||||
'$baseUrl/storage/${state.profile.badges[i].image}',
|
||||
width: 40,
|
||||
height: 40,
|
||||
? Tooltip(
|
||||
message: state.profile.badges[i].description,
|
||||
triggerMode: TooltipTriggerMode.tap,
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withAlpha((255 * 0.2).toInt()),
|
||||
blurRadius: 32,
|
||||
)
|
||||
],
|
||||
),
|
||||
child: SvgPicture.network(
|
||||
'$baseUrl/storage/${state.profile.badges[i].image}',
|
||||
width: 40,
|
||||
height: 40,
|
||||
),
|
||||
)
|
||||
: CachedNetworkImage(
|
||||
imageUrl: '$baseUrl/storage/${state.profile.badges[i].image}',
|
||||
width: 40,
|
||||
height: 40,
|
||||
: Tooltip(
|
||||
message: state.profile.badges[i].description,
|
||||
triggerMode: TooltipTriggerMode.tap,
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withAlpha((255 * 0.2).toInt()),
|
||||
blurRadius: 32,
|
||||
)
|
||||
],
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: '$baseUrl/storage/${state.profile.badges[i].image}',
|
||||
width: 40,
|
||||
height: 40,
|
||||
),
|
||||
),
|
||||
i < state.profile.badges.length - 1 ? const SizedBox(width: 8) : const SizedBox.shrink(),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user