init method

  1. @override
Future<void> init(
  1. int viewId,
  2. String url,
  3. double width,
  4. double height,
  5. bool isRepeat,
)
override

Implementation

@override
Future<void> init(int viewId,
    String url, double width, double height, bool isRepeat) async {
  try {
    var methodChannel = MethodChannel('${channelPrefix}_$viewId');
    await methodChannel.invokeMethod<void>('init', {
      'url': url,
      'width': width,
      'height': height,
      'isRepeat': isRepeat,
    });
  } on PlatformException catch (e) {
    debugPrint('${e.code}: ${e.message}');
  }
}