AbdulRahmanAlHamali / flutter_typeahead

A TypeAhead widget for Flutter, where you can show suggestions to users as they type
BSD 2-Clause "Simplified" License
817 stars 336 forks source link

[Feature] library should also export src/common/base/types.dart #580

Open grundid opened 5 months ago

grundid commented 5 months ago

Use case

It would be nice if you could also add the above file to exports. Otherwise one cannot create a wrapper and use fields like "SuggestionsItemBuilder" around this widget without having to access an internal file of the library.

Proposal

add the following to flutter_typeahead.dart

export 'package:flutter_typeahead/src/common/base/types.dart';
clragon commented 3 months ago

Thank you for your issue. The reason these have been omitted is that we dont wish to pollute the namespace of the person importing it. However, I do generally agree that these types are important for wrappers, so I think we should indeed export them regardless. Before we do that, we should ensure that they have distinct names that are unlikely to clash with anything else.