Hi I am working on a Flutter Project where I have a Stack widget having youtubePlayer widget which is wrapped in an absorb pointer to avoid getting interactions from the container wrapped in a gesture detector which is enabled when islock is true. this gesturedetector is in the same stack in which I have this youtubeplayer. so, when I tab on the container/gesture detector my youtubePlayer get paused and as far as I know it get paused due to its builtin nature that currently its not active or something it get paused. Is there any way that i can stop my video from getting paused? here is the sample code I am using:
body: Stack(
children: [
IgnorePointer(
ignoring: _isLock,
child: Column(
children: [
Expanded(
child: YoutubePlayer(
controller: _controller,
showVideoProgressIndicator: true,
onReady: () {
_isPlayerReady = true;
playVideo(_currentIndex);
},
),
),
if (!_isFullScreen)
Expanded(
child: ListView.builder(
itemCount: widget.videos.length,
itemBuilder: (context, index) {
final video = widget.videos[index];
return ListTile(
leading: Container(
width: 90.0,
child: Image.network(video.thumbnailUrl,
fit: BoxFit.cover),
),
title: Text(video.title),
subtitle: Text(video.duration),
onTap: () => playVideo(index),
);
},
),
),
],
),
),
if (_isLock)
Positioned.fill(
child: GestureDetector(
onTap: () {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Hi There!'),
),
);
},
child:Container(
color: Colors.transparent,
child: Center(
child: Transform.translate(
offset: _offset,
child: _showImage,
),
),
),