forked from eatvio/eatvio_app
fix: fixed analyzer issues and merge conflicts
This commit is contained in:
@@ -63,7 +63,7 @@ class ProfileCubit extends Cubit<ProfileState> {
|
||||
}
|
||||
}
|
||||
|
||||
updateFeedBlogPostList(FeedBlogPostModel feedBlogPostModel, bool wasLikedByMe) {
|
||||
void updateFeedBlogPostList(FeedBlogPostModel feedBlogPostModel, bool wasLikedByMe) {
|
||||
List<FeedBlogPostModel> feedBlogPostList = [...(state as ProfileStateLoaded).blogPosts];
|
||||
final int index = feedBlogPostList.indexOf(feedBlogPostModel);
|
||||
feedBlogPostList[index] = feedBlogPostModel.copyWith(
|
||||
@@ -79,7 +79,7 @@ class ProfileCubit extends Cubit<ProfileState> {
|
||||
);
|
||||
}
|
||||
|
||||
addCircumference({
|
||||
Future<void> addCircumference({
|
||||
required int chestCircumference,
|
||||
required int waistCircumference,
|
||||
required int hipCircumference,
|
||||
@@ -96,7 +96,7 @@ class ProfileCubit extends Cubit<ProfileState> {
|
||||
}
|
||||
}
|
||||
|
||||
addWeight({
|
||||
Future<void> addWeight({
|
||||
required double weight,
|
||||
}) async {
|
||||
try {
|
||||
@@ -107,7 +107,7 @@ class ProfileCubit extends Cubit<ProfileState> {
|
||||
}
|
||||
}
|
||||
|
||||
getChatRoomIdBySlug({
|
||||
Future<String?> getChatRoomIdBySlug({
|
||||
required Author author,
|
||||
}) async {
|
||||
try {
|
||||
@@ -126,19 +126,21 @@ class ProfileCubit extends Cubit<ProfileState> {
|
||||
'chatId': chatIdOrError,
|
||||
},
|
||||
);
|
||||
return chatIdOrError;
|
||||
}
|
||||
} catch (e, st) {
|
||||
log(e.toString(), stackTrace: st);
|
||||
return '';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
uploadPhoto(File file) async {
|
||||
Future<void> uploadPhoto(File file) async {
|
||||
await profileRepository.uploadPhoto(await ImageCompressUtility.compressFile(file));
|
||||
return await getMyProfile();
|
||||
}
|
||||
|
||||
deletePhoto() async {
|
||||
Future<void> deletePhoto() async {
|
||||
await profileRepository.deletePhoto();
|
||||
return await getMyProfile();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user