trainman_booking_sdk

Creator: coderz1093

Last updated:

0 purchases

trainman_booking_sdk Image
trainman_booking_sdk Images
Add to Cart

Description:

trainman booking sdk

Trainman Booking SDK #
Flutter Integration Steps: #


Add flutter plugin in dependencies:

Use command: flutter pub add trainman_booking_sdk
Manually:

Add plugin in pubspec.yaml within dependencies section dependencies: flutter: sdk: flutter #trainman_booking_sdk: ^0.1.7#





Implement TmBookingInterface

it has functions like

void openLoginPage(String message, String source)
void backPressed(BuildContext context)
void refreshToken(String? pastAuthToken, String source)





Create InitiateTmBookingSdk object.
import package:trainman_booking_sdk/trainman_booking_sdk.dart
class SampleCode extends StatelessWidget {
const SampleCode({Key? key}) : super(key: key)
@override Widget build(BuildContext context) {
//trainman booking sdk
return const InitiateTmBookingSdk( {super.key, required this.tmBookingInterface, this.authToken});
}
}
copied to clipboard
this will automatically invoke Trainman Booking SDK.
Auth token is optional parameter. In case of refresh auth token after successful authentication you can use updateAccessToken(String? accessToken, String? refreshToken)


NOTE: For now we have invoked a intermediate page to login test user for testing. Post Client user login integration, this step will be skipped.


Click on Continue without login button.


For Android, make sure you have added Internet permission
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="[http://schemas.android.com/apk/res/android](http://schemas.android.com/apk/res/android)" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
</manifest>
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.