Dart_apitool updates
Dart_apitool got an update!
The recent weeks I was working a bit on dart_apitool.
The major topics were:
Missing export detection
The way Dart allows to define the public API of a package can lead to situations in which the consumer of the API is able to receive an instance of a certain Type but can’t refer to that type directly (e.g. to define a variable or a parameter of that Type).
Let’s imagine a very simple dart package:
- lib
- some_package.dart
- src
- some_interface.dart
- some_interface_impl.dart
- used_type.dart
some_package.dart
export 'src/some_interface.dart'
export 'src/some_interface_impl.dart'
some_interface.dart
#import 'used_type.dart'
abstract class SomeInterface {
UsedType doSomethingAndReturnInstance();
}
Read more...