buildView method

  1. @override
Widget buildView(
  1. Map<String, dynamic> creationParams,
  2. Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers,
  3. PlatformViewCreatedCallback onPlatformViewCreated
)
override

Internal function to build the platform view.

Implementation

@override
Widget buildView(Map<String, dynamic> creationParams, Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers, PlatformViewCreatedCallback onPlatformViewCreated) => FutureBuilder<bool>(
      future: _isReady,
      builder: (context, snapshot) {
        if (snapshot.hasData) {
          return HtmlElementViewEx(
            viewType: 'com.creativephotocloud.plugins/dropzone',
            onPlatformViewCreated: onPlatformViewCreated,
          );
        } else if (snapshot.hasError)
          return Center(child: Text('Error loading library'));
        else
          return Center(child: CircularProgressIndicator());
      },
    );