fix: analyzer

This commit is contained in:
Alex
2024-12-13 17:41:15 +03:00
parent 7715da6b8e
commit a58fbf1ee4
22 changed files with 65 additions and 64 deletions

View File

@@ -90,7 +90,8 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
],
),
const Spacer(),
if (!(state.feedBlogPostList[widget.index].author.isEntitySubscribedByMe ?? false) && !state.feedBlogPostList[widget.index].author.authorIsMe)
if (!(state.feedBlogPostList[widget.index].author.isEntitySubscribedByMe ?? false) &&
!state.feedBlogPostList[widget.index].author.authorIsMe)
SubscribeButtonWidget(
slug: state.feedBlogPostList[widget.index].author.authorSlug,
),
@@ -167,9 +168,9 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
FeedIconButton(
icon: isLiked ? Icons.favorite_rounded : Icons.favorite_border_rounded,
text: totalLikes.toString(),
iconColor: isLiked ? Colors.red.withOpacity(0.8) : null,
backgroundColor: isLiked ? Colors.red.withOpacity(0.1) : null,
textColor: isLiked ? Colors.red.withOpacity(0.8) : null,
iconColor: isLiked ? Colors.red.withValues(alpha: 0.8) : null,
backgroundColor: isLiked ? Colors.red.withValues(alpha: 0.1) : null,
textColor: isLiked ? Colors.red.withValues(alpha: 0.8) : null,
onTap: () async {
setState(() {
isLiked = !isLiked;

View File

@@ -50,7 +50,7 @@ class _CommentsWidgetState extends State<CommentsWidget> {
return Container(
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: widget.replyId == comment.id ? appTheme.blueA400.withOpacity(0.1) : Colors.white,
color: widget.replyId == comment.id ? appTheme.blueA400.withValues(alpha: 0.1) : Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Padding(

View File

@@ -60,7 +60,7 @@ class PlanWidget extends StatelessWidget {
child: Container(
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.8),
color: Colors.white.withValues(alpha: 0.8),
borderRadius: BorderRadius.circular(16),
),
child: Row(
@@ -89,7 +89,7 @@ class PlanWidget extends StatelessWidget {
child: Container(
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.8),
color: Colors.white.withValues(alpha: 0.8),
borderRadius: BorderRadius.circular(16),
),
child: Row(
@@ -147,7 +147,7 @@ class PlanWidget extends StatelessWidget {
return Container(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.8),
color: Colors.white.withValues(alpha: 0.8),
borderRadius: BorderRadius.circular(16),
),
height: 32,

View File

@@ -104,9 +104,9 @@ class _RecipesWidgetState extends State<RecipesWidget> {
FeedIconButton(
icon: true ? Icons.favorite_rounded : Icons.favorite_border_rounded,
text: widget.recipes.likesCount.toString(),
iconColor: true ? Colors.red.withOpacity(0.8) : null,
backgroundColor: true ? Colors.red.withOpacity(0.1) : null,
textColor: true ? Colors.red.withOpacity(0.8) : null,
iconColor: true ? Colors.red.withValues(alpha: 0.8) : null,
backgroundColor: true ? Colors.red.withValues(alpha: 0.1) : null,
textColor: true ? Colors.red.withValues(alpha: 0.8) : null,
onTap: () async {
// setState(() {
// isLiked = !isLiked;