fix: fixed analyzer issues and merge conflicts

This commit is contained in:
Username1548
2025-07-02 19:01:37 +07:00
parent d42604dc87
commit e80b660210
85 changed files with 276 additions and 272 deletions

View File

@@ -11,7 +11,7 @@ class PlansCubit extends Cubit<PlansState> {
required this.plansRepository,
}) : super(const PlansState());
getPlans(String slug) async {
Future<void> getPlans(String slug) async {
emit(const PlansState.loading());
try {
emit(PlansState.loaded(plansList: await plansRepository.getPlansBySlug(slug)));

View File

@@ -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();
}

View File

@@ -9,7 +9,7 @@ class SubCubit extends Cubit<SubState> {
required this.profileRepository,
}) : super(const SubState());
getSubscriptions(String slug, [String? query]) async {
Future<void> getSubscriptions(String slug, [String? query]) async {
emit(const SubState.loading());
try {
emit(SubState.loaded(subList: await profileRepository.getSubscriptionsBySlug(slug, query)));
@@ -18,7 +18,7 @@ class SubCubit extends Cubit<SubState> {
}
}
getSubscribers(String slug, [String? query]) async {
Future<void> getSubscribers(String slug, [String? query]) async {
emit(const SubState.loading());
try {
emit(SubState.loaded(subList: await profileRepository.getSubscribersBySlug(slug, query)));
@@ -27,11 +27,11 @@ class SubCubit extends Cubit<SubState> {
}
}
subscribe(String slug) async {
Future<void> subscribe(String slug) async {
return await profileRepository.subscribe(slug);
}
unsubscribe(String slug) async {
Future<void> unsubscribe(String slug) async {
return await profileRepository.unsubscribe(slug);
}
}