ezet / stripe-sdk

A simple and flexible Stripe library for Flutter with complete support for SCA and PSD2.
https://pub.dev/packages/stripe_sdk
Other
137 stars 137 forks source link

What is locator.dart? #73

Closed ollyde closed 4 years ago

ollyde commented 4 years ago

The example has some unknown's in it, for example, what is locator.dart?

ResoDev commented 4 years ago

The example app is using get_it for dependency injection, so locator.dart is a service locator. In this case, it just makes sure that you can access CloudFunctions and NetworkService as singletons.

eyoeldefare commented 4 years ago

The example has some unknown's in it, for example, what is locator.dart?

Its a service locator using Get. You don't have to use it. You can create your own Service Provider which I will try to show an example sometime soon.