got_it 1.1.1+2 got_it: ^1.1.1+2 copied to clipboard
Slightly more advanced service locator in the style of get-it
import 'package:got_it/got_it.dart';
final gotIt = GotIt();
void main() {
const name = "This is the got_it package!";
gotIt.registerSingleton<String>(name);
sayMyName();
}
void sayMyName() {
print(gotIt<String>());
}