forked from eatvio/eatvio_app
fix(feed): fix comments ui
This commit is contained in:
@@ -51,7 +51,7 @@ class ChatBubbleWidget extends StatelessWidget {
|
||||
!mediaData[index].toString().contains('.jpg') &&
|
||||
!mediaData[index].toString().contains('.jpeg')) {
|
||||
return ListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
contentPadding: EdgeInsets.all(4),
|
||||
horizontalTitleGap: 8,
|
||||
onTap: () async {
|
||||
if (!await launchUrl(Uri.parse(baseUrl + '/storage/' + mediaData[index].toString()))) {
|
||||
@@ -60,17 +60,17 @@ class ChatBubbleWidget extends StatelessWidget {
|
||||
},
|
||||
leading: Icon(
|
||||
Icons.file_copy_outlined,
|
||||
color: Color(0xFF2F80ED),
|
||||
color: Colors.white,
|
||||
),
|
||||
trailing: Icon(
|
||||
Icons.download_outlined,
|
||||
color: Color(0xFF2F80ED),
|
||||
color: Colors.white,
|
||||
),
|
||||
title: Text(
|
||||
mediaData[index].toString().replaceAll('chat_files/', ''),
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
color: Color(0xFF323F4B),
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -110,12 +110,15 @@ class ChatBubbleWidget extends StatelessWidget {
|
||||
style: TextStyle(color: isCurrentUser ? Colors.white : Color(0xFF323F4B), height: 1),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
DateTime.parse(sendTime).format('hh:mm'),
|
||||
style: TextStyle(
|
||||
color: isCurrentUser ? Colors.white.withOpacity(0.4) : Color(0xFF323F4B).withOpacity(0.4),
|
||||
height: 1,
|
||||
fontSize: 10,
|
||||
Padding(
|
||||
padding: mediaData.length > 0 ? const EdgeInsets.only(right: 8, top: 4, left: 8) : EdgeInsets.zero,
|
||||
child: Text(
|
||||
DateTime.parse(sendTime).format('hh:mm'),
|
||||
style: TextStyle(
|
||||
color: isCurrentUser ? Colors.white.withOpacity(0.4) : Color(0xFF323F4B).withOpacity(0.4),
|
||||
height: 1,
|
||||
fontSize: 10,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -311,6 +311,17 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
itemCount: widget.diet.dailySchedule.length,
|
||||
),
|
||||
SizedBox(height: 32),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Container(
|
||||
height: 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
alignment: Alignment.centerLeft,
|
||||
|
||||
@@ -17,10 +17,7 @@ class RecipesCubit extends Cubit<RecipesState> {
|
||||
loadRecipesList({
|
||||
String? query,
|
||||
}) async {
|
||||
emit(const RecipesState.loading());
|
||||
try {
|
||||
print('asdasdasdasda');
|
||||
print(query);
|
||||
final recipesList = await feedRepository.getRecipes(
|
||||
tags: _selectedTags.toList(),
|
||||
query: query,
|
||||
|
||||
@@ -300,18 +300,31 @@ class _AboutRecipesScreenState extends State<AboutRecipesScreen> {
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) => _step(widget.recipes.steps[index], index + 1),
|
||||
separatorBuilder: (context, index) => Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Container(
|
||||
height: 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
separatorBuilder: (context, index) =>
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Container(
|
||||
height: 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
itemCount: widget.recipes.steps.length,
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Container(
|
||||
height: 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
alignment: Alignment.centerLeft,
|
||||
@@ -416,7 +429,10 @@ class _AboutRecipesScreenState extends State<AboutRecipesScreen> {
|
||||
|
||||
_comment(Comment comment, [double radius = 16]) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
width: MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width,
|
||||
decoration: BoxDecoration(
|
||||
color: replyId == comment.id ? appTheme.blueA400.withOpacity(0.1) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
|
||||
Reference in New Issue
Block a user