Flutter
The Scrimmage Rewards Widget can be integrated into your Flutter application using the WebView
widget provided by the webview_flutter
package.
-
First, you need to add the
webview_flutter
dependency to yourpubspec.yaml
file:dependencies: webview_flutter: latest_version
-
Import the necessary package in your Dart file:
import 'package:webview_flutter/webview_flutter.dart';
-
Create the
WebView
widget:WebView( initialUrl: 'https://<your org id>.apps.scrimmage.co?token=<token>', javascriptMode: JavascriptMode.unrestricted, )
- Replace
<your org id>
with your organization ID. - Replace
<token>
with the user token. Check out the Getting Started page for more information. - All configuration options can be found here.
- Replace
-
For Android, ensure you have the internet permission in your
AndroidManifest.xml
:<uses-permission android:name="android.permission.INTERNET" />
-
For iOS, you need to add the following permissions to your
Info.plist
file:<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
Updated about 1 month ago