Skip to content

Commit e271079

Browse files
committed
refactor(selection_page): optimize imports and simplify itemBuilder
- Remove unused imports from core and equatable packages - Use show clause to import only necessary class from data_repository - Simplify itemBuilder assignment by removing unnecessary type declaration
1 parent 322151a commit e271079

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/shared/selection_page/searchable_selection_page.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import 'package:core/core.dart';
2-
import 'package:equatable/equatable.dart';
1+
import 'package:data_repository/data_repository.dart' show DataRepository;
32
import 'package:flutter/material.dart';
43
import 'package:flutter_bloc/flutter_bloc.dart';
54
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart';
@@ -196,7 +195,7 @@ class _SearchableSelectionViewState extends State<_SearchableSelectionView> {
196195
final item = state.items[index];
197196
// Retrieve the itemBuilder function from arguments.
198197
// This function expects an Object and will cast it internally.
199-
final Widget Function(BuildContext, Object) itemBuilder =
198+
final itemBuilder =
200199
widget.arguments.itemBuilder;
201200

202201
return ListTile(

0 commit comments

Comments
 (0)