fix: analyzer issue

This commit is contained in:
misha
2025-11-28 01:00:56 +03:00
parent 9ca09e8137
commit cbeb91a9f0
9 changed files with 75 additions and 75 deletions

View File

@@ -26,17 +26,17 @@ void main() {
late MockMyPlansRepository mockMyPlansRepository;
late MyPlansCubit myPlansCubit;
final testPlan = PlanModel(
const testPlan = PlanModel(
id: 1,
slug: 'test-plan',
name: 'Test Plan',
image: 'test-image.jpg',
duration: 30,
state: 'active',
type: const PlanType(fit: true, slim: false, behavior: false, wellness: false),
type: PlanType(fit: true, slim: false, behavior: false, wellness: false),
details: 'Test plan description',
packetsCount: 1,
author: const Author(authorSlug: '', authorName: '', authorProfileIcon: '', authorIsMe: false),
author: Author(authorSlug: '', authorName: '', authorProfileIcon: '', authorIsMe: false),
totalLikes: 1,
totalViews: 1,
totalComments: 1,
@@ -96,7 +96,7 @@ void main() {
testWidgets('should display MyPlanWidget with plan name', (WidgetTester tester) async {
// Arrange
myPlansCubit.emit(MyPlansState(selectedStateIndex: 0));
final widget = MyPlanWidget(plan: testPlan);
const widget = MyPlanWidget(plan: testPlan);
// Act
await tester.pumpWidget(createTestWidget(widget));
@@ -112,7 +112,7 @@ void main() {
testWidgets('should display MyPlanWidget with description when details are present', (WidgetTester tester) async {
// Arrange
myPlansCubit.emit(MyPlansState(selectedStateIndex: 0));
final widget = MyPlanWidget(plan: testPlan);
const widget = MyPlanWidget(plan: testPlan);
// Act
await tester.pumpWidget(createTestWidget(widget));
@@ -128,7 +128,7 @@ void main() {
testWidgets('should display MyPlanWidget with price', (WidgetTester tester) async {
// Arrange
myPlansCubit.emit(MyPlansState(selectedStateIndex: 0));
final widget = MyPlanWidget(plan: testPlan);
const widget = MyPlanWidget(plan: testPlan);
// Act
await tester.pumpWidget(createTestWidget(widget));
@@ -144,7 +144,7 @@ void main() {
testWidgets('should display MyPlanWidget buttons', (WidgetTester tester) async {
// Arrange
myPlansCubit.emit(MyPlansState(selectedStateIndex: 0));
final widget = MyPlanWidget(plan: testPlan);
const widget = MyPlanWidget(plan: testPlan);
// Act
await tester.pumpWidget(createTestWidget(widget));
@@ -160,7 +160,7 @@ void main() {
testWidgets('should display MyPlanWidget structure correctly', (WidgetTester tester) async {
// Arrange
myPlansCubit.emit(MyPlansState(selectedStateIndex: 0));
final widget = MyPlanWidget(plan: testPlan);
const widget = MyPlanWidget(plan: testPlan);
// Act
await tester.pumpWidget(createTestWidget(widget));