userleap_flutter

Creator: coderz1093

Last updated:

0 purchases

userleap_flutter Image
userleap_flutter Images

Languages

Categories

Add to Cart

Description:

userleap flutter

userleap_flutter #

A Flutter plugin integrating the official android and ios SDK for Userleap Survey Platform



Usage #
Import package:userleap_flutter/userleap_flutter.dart and use the methods in UserleapFlutter class.
Example:
import 'package:userleap_flutter/userleap_flutter.dart';

void main() async {
UserleapFlutter.configure('ENVIRONMENT_ID');
runApp(App());
}

class App extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Center(
child: FlatButton(
onPressed: () {
UserleapFlutter.presentDebugSurvey()
.then((value) => print(value));
},
child: Text('Present Debug Survey'),
));
}
}

copied to clipboard
See Userleap Android and iOS package documentation for more information.
USerleap docs
Userleap requires a Fragment Activity for the android implementation to work, im your MainActivity.kt, you can change FlutterActivity to FlutterFragmentActivity.
import android.os.Bundle
import androidx.annotation.NonNull
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.plugins.GeneratedPluginRegistrant


class MainActivity: FlutterFragmentActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine)
}

}

copied to clipboard
Add Java 8 support to your project (if not added already)
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// For Kotlin projects
kotlinOptions {
jvmTarget = "1.8"
}
}
copied to clipboard
Web support is currently in progress
checkout the example project for full implementation

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.