refactor(tests): replace 'final' with 'const' for improved performance in various test files

This commit is contained in:
mso7nueh
2025-12-08 11:32:40 +03:00
parent c2a506cdbf
commit 746d366c18
56 changed files with 199 additions and 254 deletions

View File

@@ -25,7 +25,7 @@ void main() {
theme: ThemeHelper().themeData(),
home: BlocProvider<CreateRecipeCubit>.value(
value: mockCubit,
child: Scaffold(
child: const Scaffold(
body: TagsWidget(),
),
),
@@ -33,7 +33,7 @@ void main() {
}
testWidgets('displays tags widget', (tester) async {
final initialState = CreateRecipeState(
const initialState = CreateRecipeState(
entity: RecipeCreateEntity(
ingredients: [],
steps: [],
@@ -55,7 +55,7 @@ void main() {
});
testWidgets('displays existing tags', (tester) async {
final stateWithTags = CreateRecipeState(
const stateWithTags = CreateRecipeState(
entity: RecipeCreateEntity(
ingredients: [],
steps: [],
@@ -78,7 +78,7 @@ void main() {
});
testWidgets('calls addTag when add button is tapped', (tester) async {
final initialState = CreateRecipeState(
const initialState = CreateRecipeState(
entity: RecipeCreateEntity(
ingredients: [],
steps: [],