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 HtmlElementView(
            viewType: 'io.flutter.plugins.flutter_dropzone/dropzone',
            onPlatformViewCreated: onPlatformViewCreated,
          );
        } else if (snapshot.hasError)
          return const Center(child: Text('Error loading library'));
        else
          return const Center(child: CircularProgressIndicator());
      },
    );