Home > Mobile >  Flutter find video player 2.2.7 get this error
Flutter find video player 2.2.7 get this error

Time:12-13

The argument type 'Widget Function(BuildContext, int)' can't be assigned to the parameter type 'Widget Function(BuildContext, int, int)'.",

    itemBuilder: (ctx, index) {
      if (_videoArray.length <= index) {
        return Container();
      }
      final model = _videoArray[index];
      return FindVideoPlay(
        key: ValueKey(index), 
        canPlay: index == _currentIndex, 
        videoModel: model, 
        actionCallback: (type) {
          
        }
      );
    },

CodePudding user response:

You can use '_' if you don't need to use it. Try using:

(BuildContext context, int index, _)
  • Related