interfaces 0.0.4 interfaces: ^0.0.4 copied to clipboard
A set of common interfaces for Dart classes. Made mostly for internal usage.
example/interfaces_example.dart
import 'package:interfaces/interfaces.dart';
class PrintsByeOnDispose with DisposableMixin {
@override
void dispose() {
print('Bye');
super.dispose();
}
}
void main() {
final myObject = PrintsByeOnDispose();
// false
print(myObject.isDisposed);
// Bye
myObject.dispose();
// true
print(myObject.isDisposed);
}