mobsur_flutter_sdk 1.0.3 copy "mobsur_flutter_sdk: ^1.0.3" to clipboard
mobsur_flutter_sdk: ^1.0.3 copied to clipboard

PlatformAndroidiOS
outdated

Flutter SDK for mobsur.com

MobSur Flutter SDK #

More information on https://mobsur.com

Usage #

  1. Add this package as dependency in pubspec.yml
  dependencies:
    mobsur_flutter_sdk: ^1.0.3

Then run flutter pub get

  1. Import it in your project
import 'package:mobsur_flutter_sdk/mobsur_flutter_sdk.dart';
  1. Call the setup method.
void main() {
  WidgetsFlutterBinding.ensureInitialized()

  // You can call this method somewhere else in the app instead,
  // but it should not be right before an event, that should trigger a survey
  MobSurSDK().setup('YOUR-APP-ID', 'user-id');
  
  runApp(const MyApp());
}
  1. Call the event method, passing the build context.
MobSurSDK().logEvent('event-name-here', context);
  1. If you do not know the client id during the setup, you can pass it later. The client id can't be empty string.
  MobSurSDK().updateClientId('client-id-here');

Recommendation #

Call the event method in a wrapper class that manages your events. If you already have events in the app, it's a good idea to call the method for all the events and then, the correct one will be selected in the dashboard.

0
likes
100
points
48
downloads

Publisher

verified publishermobsur.com

Weekly Downloads

Flutter SDK for mobsur.com

Homepage

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, http, package_info_plus, shared_preferences, webview_flutter

More

Packages that depend on mobsur_flutter_sdk