clubeon_sdk 0.0.1 clubeon_sdk: ^0.0.1 copied to clipboard
A Flutter package to access ClubeOn's API.
clubeon_sdk #
A Flutter package to access ClubeOn's API.
Installation #
Just follow the basic installation of any flutter plugin by adding the package to the project's pubspec.yaml.
Setting up this amazing package #
To start you need to add the initialization code inside your main file.
void main() {
...
// Widget call to avoid a bug within SharedPrefences library
WidgetsFlutterBinding.ensureInitialized();
// SDK init
ClubeOn.init(apiBaseUrl: '<CLUBE_END_POINT>');
...
}
Right now, the sdk has support for 1 endpoints from ClubeOn's API. All methods return a Future with an ApiCallback type that can have a subtype depending on the method:
class ApiCallback<T> {
ApiCallback({this.isSuccessful, this.resultData, this.resultErrorMessage, this.error});
bool isSuccessful;
T resultData;
String resultErrorMessage;
DioError error;
}