forked from eatvio/eatvio_app
fix: analyzer
This commit is contained in:
@@ -25,7 +25,7 @@ class AppDecoration {
|
||||
);
|
||||
|
||||
static BoxDecoration get fillDeepOrange => BoxDecoration(
|
||||
color: appTheme.deepOrange900.withOpacity(0.8),
|
||||
color: appTheme.deepOrange900.withValues(alpha: 0.8),
|
||||
);
|
||||
|
||||
static BoxDecoration get fillGray => BoxDecoration(
|
||||
@@ -41,7 +41,7 @@ class AppDecoration {
|
||||
);
|
||||
|
||||
static BoxDecoration get fillGreenA => BoxDecoration(
|
||||
color: appTheme.greenA700.withOpacity(0.8),
|
||||
color: appTheme.greenA700.withValues(alpha: 0.8),
|
||||
);
|
||||
|
||||
static BoxDecoration get fillPrimary => BoxDecoration(
|
||||
@@ -77,7 +77,7 @@ class BorderRadiusStyle {
|
||||
color: appTheme.whiteA700,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: appTheme.black900.withOpacity(0.15),
|
||||
color: appTheme.black900.withValues(alpha: 0.15),
|
||||
spreadRadius: 2,
|
||||
blurRadius: 2,
|
||||
offset: Offset(
|
||||
|
||||
@@ -175,7 +175,7 @@ class PrimaryColors {
|
||||
|
||||
Color get lightGray => Color(0xFFCECECE);
|
||||
|
||||
Color get transparentBlue => Color(0xFF2F80ED).withOpacity(0.1);
|
||||
Color get transparentBlue => Color(0xFF2F80ED).withValues(alpha: 0.1);
|
||||
|
||||
Color get lightGray0 => Color(0xFFF6F6F6);
|
||||
|
||||
@@ -185,7 +185,7 @@ class PrimaryColors {
|
||||
|
||||
Color get red => Color(0xFFCD4141);
|
||||
|
||||
Color get transparentBlack => Color(0xFF1313264).withOpacity(0.3);
|
||||
Color get transparentBlack => Color(0xFF1313264).withValues(alpha: 0.3);
|
||||
}
|
||||
|
||||
PrimaryColors get appTheme => ThemeHelper().themeColor();
|
||||
|
||||
@@ -23,7 +23,7 @@ class MainBackgroundBouble extends StatelessWidget {
|
||||
boxShadow: enableShadow
|
||||
? [
|
||||
BoxShadow(
|
||||
color: Color(0x00000000).withOpacity(0.2),
|
||||
color: Color(0x00000000).withValues(alpha: 0.2),
|
||||
spreadRadius: 0,
|
||||
blurRadius: 32,
|
||||
offset: Offset(0, 0),
|
||||
|
||||
@@ -69,7 +69,7 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
|
||||
color: Colors.white,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
color: Colors.black.withValues(alpha: 0.1),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -293,9 +293,9 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
|
||||
_iconButton(
|
||||
icon: 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;
|
||||
@@ -338,7 +338,7 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
|
||||
width: MediaQuery.of(context).size.width - 32,
|
||||
height: 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
color: Colors.black.withValues(alpha: 0.2),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -184,7 +184,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
color: Colors.black.withValues(alpha: 0.1),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -116,7 +116,7 @@ class ChatBubbleWidget extends StatelessWidget {
|
||||
child: Text(
|
||||
DateTime.parse(sendTime).format('hh:mm'),
|
||||
style: TextStyle(
|
||||
color: isCurrentUser ? Colors.white.withOpacity(0.4) : Color(0xFF323F4B).withOpacity(0.4),
|
||||
color: isCurrentUser ? Colors.white.withValues(alpha: 0.4) : Color(0xFF323F4B).withValues(alpha: 0.4),
|
||||
height: 1,
|
||||
fontSize: 10,
|
||||
),
|
||||
|
||||
@@ -94,7 +94,7 @@ class _AdditionalSettingsScreenState extends State<AdditionalSettingsScreen> {
|
||||
),
|
||||
trailing: CupertinoSwitch(
|
||||
value: value,
|
||||
activeColor: appTheme.blueA400,
|
||||
activeTrackColor: appTheme.blueA400,
|
||||
onChanged: (_) {
|
||||
onTap();
|
||||
},
|
||||
|
||||
@@ -66,7 +66,7 @@ class _DietPreviewScreenState extends State<DietPreviewScreen> {
|
||||
color: Colors.white,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
color: Colors.black.withValues(alpha: 0.1),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -109,7 +109,7 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
color: Colors.white,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
color: Colors.black.withValues(alpha: 0.1),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -55,8 +55,8 @@ class _ExpandableTextState extends State<ExpandableText> {
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.0),
|
||||
Colors.white.withOpacity(0.6),
|
||||
Colors.white.withValues(alpha: 0.0),
|
||||
Colors.white.withValues(alpha: 0.6),
|
||||
Colors.white,
|
||||
],
|
||||
),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -107,7 +107,7 @@ class _AboutPlanScreenState extends State<AboutPlanScreen> {
|
||||
color: Colors.white,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
color: Colors.black.withValues(alpha: 0.1),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -811,7 +811,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
color: Colors.black.withOpacity(0.4),
|
||||
color: Colors.black.withValues(alpha: 0.4),
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
@@ -1044,7 +1044,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
padding: EdgeInsets.all(8),
|
||||
width: (MediaQuery.of(context).size.width - 40) / 2,
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blueA400.withOpacity(0.1),
|
||||
color: appTheme.blueA400.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Text(
|
||||
@@ -1150,7 +1150,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
|
||||
_choiceIntervalChipWidget(int index) {
|
||||
return ChoiceChip(
|
||||
selectedColor: Colors.grey.withOpacity(0.1),
|
||||
selectedColor: Colors.grey.withValues(alpha: 0.1),
|
||||
pressElevation: 0,
|
||||
showCheckmark: false,
|
||||
side: BorderSide.none,
|
||||
|
||||
@@ -154,9 +154,9 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withValues(alpha: 0.3)),
|
||||
axisLine: AxisLine(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
color: Colors.grey.withValues(alpha: 0.3),
|
||||
width: 0.4,
|
||||
),
|
||||
),
|
||||
@@ -309,7 +309,7 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
borderColor: seriesColor1,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
seriesColor1.withOpacity(0.14),
|
||||
seriesColor1.withValues(alpha: 0.14),
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
@@ -334,7 +334,7 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
borderColor: seriesColor2,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
seriesColor2.withOpacity(0.14),
|
||||
seriesColor2.withValues(alpha: 0.14),
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
@@ -359,7 +359,7 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
borderColor: seriesColor3,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
seriesColor3.withOpacity(0.14),
|
||||
seriesColor3.withValues(alpha: 0.14),
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
|
||||
@@ -22,14 +22,14 @@ class ImtChartWidget extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
if (weightPoints.length > 0)
|
||||
Text(
|
||||
'${weightPoints.last.bmi.toStringAsFixed(2)}',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
Text(
|
||||
'${weightPoints.last.bmi.toStringAsFixed(2)}',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (weightPoints.length > 1)
|
||||
weightPoints.last.bmi > weightPoints[weightPoints.length - 2].bmi
|
||||
? Icon(
|
||||
@@ -66,9 +66,9 @@ class ImtChartWidget extends StatelessWidget {
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withValues(alpha: 0.3)),
|
||||
axisLine: AxisLine(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
color: Colors.grey.withValues(alpha: 0.3),
|
||||
width: 0.4,
|
||||
),
|
||||
),
|
||||
@@ -99,7 +99,7 @@ class ImtChartWidget extends StatelessWidget {
|
||||
borderColor: appTheme.blueA400,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
appTheme.blueA400.withOpacity(0.14),
|
||||
appTheme.blueA400.withValues(alpha: 0.14),
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
|
||||
@@ -166,9 +166,9 @@ class _ProfileBlogPostWidgetState extends State<ProfileBlogPostWidget> {
|
||||
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;
|
||||
@@ -178,9 +178,9 @@ class _ProfileBlogPostWidgetState extends State<ProfileBlogPostWidget> {
|
||||
? await context.read<FeedCubit>().likePost(state.blogPosts[widget.index].id)
|
||||
: await context.read<FeedCubit>().unlikedPost(state.blogPosts[widget.index].id);
|
||||
await widget.profileCubit.updateFeedBlogPostList(
|
||||
state.blogPosts[widget.index],
|
||||
isLiked ? false : true,
|
||||
);
|
||||
state.blogPosts[widget.index],
|
||||
isLiked ? false : true,
|
||||
);
|
||||
},
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
|
||||
@@ -59,12 +59,12 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
? Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 40,
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
color: Colors.grey.withValues(alpha: 0.4),
|
||||
)
|
||||
: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 40,
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
color: Colors.grey.withValues(alpha: 0.4),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -93,9 +93,9 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withValues(alpha: 0.3)),
|
||||
axisLine: AxisLine(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
color: Colors.grey.withValues(alpha: 0.3),
|
||||
width: 0.4,
|
||||
),
|
||||
),
|
||||
@@ -227,7 +227,7 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
borderColor: appTheme.blueA400,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
appTheme.blueA400.withOpacity(0.14),
|
||||
appTheme.blueA400.withValues(alpha: 0.14),
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
|
||||
@@ -55,7 +55,7 @@ class _AboutRecipesScreenState extends State<AboutRecipesScreen> {
|
||||
color: Colors.white,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
color: Colors.black.withValues(alpha: 0.1),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -216,7 +216,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
title: 'Уведомление о новых обновлениях',
|
||||
trailing: CupertinoSwitch(
|
||||
value: updatesNotificationsSwitchState,
|
||||
activeColor: appTheme.blueA400,
|
||||
activeTrackColor: appTheme.blueA400,
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
updatesNotificationsSwitchState = newValue;
|
||||
@@ -245,7 +245,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
title: 'Напоминание о заполнении дневника',
|
||||
trailing: CupertinoSwitch(
|
||||
value: fillDiaryNotificationsSwitchState,
|
||||
activeColor: appTheme.blueA400,
|
||||
activeTrackColor: appTheme.blueA400,
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
fillDiaryNotificationsSwitchState = newValue;
|
||||
@@ -274,7 +274,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
title: 'Указывать “настроение” в заполнение дневника',
|
||||
trailing: CupertinoSwitch(
|
||||
value: moodSwitchState,
|
||||
activeColor: appTheme.blueA400,
|
||||
activeTrackColor: appTheme.blueA400,
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
moodSwitchState = newValue;
|
||||
@@ -303,7 +303,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
title: 'Указывать “отход ко сну” в заполнение дневника',
|
||||
trailing: CupertinoSwitch(
|
||||
value: bedTimeSwitchState,
|
||||
activeColor: appTheme.blueA400,
|
||||
activeTrackColor: appTheme.blueA400,
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
bedTimeSwitchState = newValue;
|
||||
|
||||
Reference in New Issue
Block a user