flutter_conscentsdkplug 0.0.1 copy "flutter_conscentsdkplug: ^0.0.1" to clipboard
flutter_conscentsdkplug: ^0.0.1 copied to clipboard

unlisted

Conscent Plugin SDK.

Step-1 Functions: To check if an article/content is free/paid or a payment needs to be done, in your class, use as below sample: Parameters detail can be checked below for more information

Parameters detail:- (a) contentID:- This will be your article or content id for which detail needs to be checked. (b) Client ID:- Pass your client_id received from Conscent

Step-2 Functions:

  1. Please show or load your content only after the success callback to aviod showing paid content for free in case of server or internet issue
  2. If you don't have a valid session ID the logIn with Conscent button will not show
  3. if you have valid session you will se the user's account balance in the paywall ● conscentCallBackReference: You can pass a callbackReference which will get called after success or failure in processing. If you pass a callbackReference, after successfull processing, the success reference will be called and for failed event, failure event will be called. You can implement ConscentCallBack in your activity and then pass it as a reference. ● success: This is the success callback which will get called for every successfull processing. You can pass your method as a reference or an lambda expression which will get called in case of success. ● failure: This is optional. You can pass it as null. This is the failure callback which will get called for every failed processing. You can pass your method as a reference or an lambda expression and it'll get called for failed cases. You can implement your code in it for failed cases. ● subscribe: This is optional callback. If you want to inflate subscribe layout, pass a subcribe function which will be called when subscribe button will be clicked inside payment flow. Passing null will not inflate subscribe layout. ● signIn: This is the callback function which will be called when a user click on signIn button in payment flow. This will be only visible if subscribe layout has been inflated. ● showSubscribe: Type boolean, pass this as "true" to show subscribe layout else "false".