ubuntu_service 0.3.2 copy "ubuntu_service: ^0.3.2" to clipboard
ubuntu_service: ^0.3.2 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);
}