Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Username1548
2024-11-25 16:10:45 +07:00
46 changed files with 2967 additions and 453 deletions

View File

@@ -1,5 +1,6 @@
import 'package:easy_debounce/easy_debounce.dart';
import 'package:eatvio_app/features/create_diet/presentation/create_diet_screen.dart';
import 'package:eatvio_app/core/widgets/loader.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/diets_cubit/diets_cubit.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/diets_cubit/diets_state.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart';
@@ -21,7 +22,6 @@ import 'package:eatvio_app/core/theme/theme_helper.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:rive/rive.dart';
final bucket = PageStorageBucket();
@@ -180,16 +180,7 @@ class _FeedScreenState extends State<FeedScreen> {
physics: BouncingScrollPhysics(),
itemBuilder: (context, index) {
if (index == state.feedBlogPostList.length) {
return Container(
alignment: Alignment.center,
child: SizedBox(
height: 32,
width: 32,
child: RiveAnimation.asset(
'assets/rive_animations/loading.riv',
),
),
);
return const Loader();
}
return BlogPostWidget(feedBlogPostModel: state.feedBlogPostList[index]);
},
@@ -211,15 +202,7 @@ class _FeedScreenState extends State<FeedScreen> {
} else {
return Scaffold(
backgroundColor: Colors.grey.shade200,
body: Center(
child: SizedBox(
height: 32,
width: 32,
child: RiveAnimation.asset(
'assets/rive_animations/loading.riv',
),
),
),
body: const Loader(),
);
}
},
@@ -261,15 +244,7 @@ class _FeedScreenState extends State<FeedScreen> {
} else {
return Scaffold(
backgroundColor: Colors.grey.shade200,
body: Center(
child: SizedBox(
height: 32,
width: 32,
child: RiveAnimation.asset(
'assets/rive_animations/loading.riv',
),
),
),
body: const Loader(),
);
}
},
@@ -288,15 +263,7 @@ class _FeedScreenState extends State<FeedScreen> {
if (state.isLoading) {
return Scaffold(
backgroundColor: Colors.grey.shade200,
body: Center(
child: SizedBox(
height: 32,
width: 32,
child: RiveAnimation.asset(
'assets/rive_animations/loading.riv',
),
),
),
body: const Loader(),
);
} else if (state.errorMessage != null) {
return Scaffold(
@@ -375,15 +342,7 @@ class _FeedScreenState extends State<FeedScreen> {
} else {
return Scaffold(
backgroundColor: Colors.grey.shade200,
body: Center(
child: SizedBox(
height: 32,
width: 32,
child: RiveAnimation.asset(
'assets/rive_animations/loading.riv',
),
),
),
body: const Loader(),
);
}
},