ubuntu_service 0.4.0 copy "ubuntu_service: ^0.4.0" to clipboard
ubuntu_service: ^0.4.0 copied to clipboard

Simple service locator API based on GetIt.

example/main.dart

import 'package:ubuntu_service/ubuntu_service.dart';

class MyService {}

void main() {
  registerService<MyService>(MyService.new);

  somewhereElse();
}

void somewhereElse() {
  final service = getService<MyService>();
  // ignore: avoid_print
  print(service);
}
copied to clipboard
7
likes
140
points
3.07k
downloads

Publisher

verified publishercanonical.com

Weekly Downloads

2024.09.15 - 2025.03.30

Simple service locator API based on GetIt.

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

get_it, meta

More

Packages that depend on ubuntu_service