autoclose_getx 1.0.5 copy "autoclose_getx: ^1.0.5" to clipboard
autoclose_getx: ^1.0.5 copied to clipboard

autoclose_getx is a package providing AutoClose functionality for the GetX

AutoClose-GetX #

This is a part of AutoClose package: You should first visit this link to become familiar with the key concepts of this library..

This library provides functionality of AutoClose package for GetX classes.

Getting started #

flutter pub add autoclose_getx
# optional, but I insist on giving it a chance
flutter pub add autoclose_lint

Usage #

class ProfileEditingController extends GetxController with CloserGetx {
  final UserRepository userRepository;

  ProfileEditingController({
    required this.userRepository,
  });

  @override
  void onInit() {
    super.onInit();

    userRepository.userAuthTokenStream.listen((token) {
      // ... handle token update
    })
    // CloserGetx mixin provides `closeWith` functionality
    // so subscriptions/resources get canceled in onClose().
    .closeWith(this);
  }
}
0
likes
160
points
30
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

autoclose_getx is a package providing AutoClose functionality for the GetX

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

autoclose_flutter, flutter, get

More

Packages that depend on autoclose_getx