Skip to content

Commit 055ae38

Browse files
committed
refactor(shared): simplify searchable selection input
- Remove unused imports - Replace unnecessary type cast with 'as' operator - Add 'show' keyword for specific import
1 parent e271079 commit 055ae38

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/shared/widgets/searchable_selection_input.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import 'package:core/core.dart';
22
import 'package:data_repository/data_repository.dart';
3-
import 'package:equatable/equatable.dart';
43
import 'package:flutter/material.dart';
54
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart';
65
import 'package:flutter_news_app_web_dashboard_full_source_code/router/routes.dart';
6+
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/selection_page/searchable_selection_page.dart' show SearchableSelectionPage;
77
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/selection_page/selection_page_arguments.dart';
88
import 'package:go_router/go_router.dart';
9-
import 'package:ui_kit/ui_kit.dart';
109

1110
/// {@template searchable_selection_input}
1211
/// A custom input widget that, when tapped, navigates to a full-page
@@ -103,7 +102,7 @@ class _SearchableSelectionInputState<T>
103102
/// Updates the text controller's text based on the current selected item.
104103
void _updateTextController() {
105104
_textController.text = widget.selectedItem != null
106-
? widget.itemToString(widget.selectedItem!)
105+
? widget.itemToString(widget.selectedItem as T)
107106
: '';
108107
}
109108

0 commit comments

Comments
 (0)