diff --git a/lib/features/profile/models/sub_model.dart b/lib/features/profile/models/sub_model.dart index 4623e198..c4a04bd7 100644 --- a/lib/features/profile/models/sub_model.dart +++ b/lib/features/profile/models/sub_model.dart @@ -19,18 +19,14 @@ class SubPaginationModel with _$SubPaginationModel { @freezed class SubModel with _$SubModel { const factory SubModel({ - required int id, required String slug, required String name, required String city, required DateTime birthdate, @JsonKey(name: 'is_entity_subscribed_by_me') required bool isEntitySubscribedByMe, - required String email, @JsonKey(name: 'profile_photo_url') required String profilePhotoUrl, - required String role, + required List roles, @JsonKey(name: 'is_public_profile') required bool isPublicProfile, - @JsonKey(name: 'created_at') required DateTime createdAt, - @JsonKey(name: 'updated_at') required DateTime updatedAt, }) = _SubModel; factory SubModel.fromJson(Map json) => _$SubModelFromJson(json); diff --git a/lib/features/profile/presentation/pages/profile_screen.dart b/lib/features/profile/presentation/pages/profile_screen.dart index 5933a3ed..e127d68c 100644 --- a/lib/features/profile/presentation/pages/profile_screen.dart +++ b/lib/features/profile/presentation/pages/profile_screen.dart @@ -658,15 +658,53 @@ class _ProfileScreenState extends State { 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(), ],