feat(diary): add diary page, calendar, meals

This commit is contained in:
mso7nueh
2024-10-24 16:59:51 +03:00
parent e2b54cca99
commit 1883b93315
52 changed files with 2480 additions and 5592 deletions

View File

@@ -483,11 +483,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: Row(
children: [
for (int i = 0; i < state.profile.badges.length; i++) ...[
SvgPicture.network(
baseUrl + '/storage/' + state.profile.badges[i].image,
width: 40,
height: 40,
),
state.profile.badges[i].image.contains('svg')
? SvgPicture.network(
baseUrl + '/storage/' + state.profile.badges[i].image,
width: 40,
height: 40,
)
: CachedNetworkImage(
imageUrl: baseUrl + '/storage/' + state.profile.badges[i].image,
),
i < state.profile.badges.length - 1 ? const SizedBox(width: 8) : const SizedBox.shrink(),
],
],
@@ -634,11 +638,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
}
_additionalInfo(ProfileStateLoaded state) {
String text = state.profileDetails.additionalInfo;
if (state.profileDetails.additionalInfo.length > 250) {
text = state.profileDetails.additionalInfo.substring(0, 250);
}
return Container(
alignment: Alignment.centerLeft,
padding: const EdgeInsets.all(16),
child: Text(
state.profileDetails.additionalInfo,
text,
style: TextStyle(
color: Colors.black.withOpacity(0.4),
height: 1,