PictureInPictureConfig constructor
PictureInPictureConfig({
- Offset startingPosition = const Offset(20, 20),
- bool isDraggable = true,
- required Sensor sensor,
- PictureInPictureBuilder? pictureInPictureBuilder,
- VoidCallback? onTap,
Implementation
PictureInPictureConfig({
this.startingPosition = const Offset(20, 20),
this.isDraggable = true,
required this.sensor,
PictureInPictureBuilder? pictureInPictureBuilder,
this.onTap,
}) : pictureInPictureBuilder = pictureInPictureBuilder ??
((preview, aspectRatio) {
return Container(
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(color: Colors.white60, width: 3),
borderRadius: BorderRadius.circular(23),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.15),
spreadRadius: 10,
blurRadius: 20,
offset: const Offset(0, 0),
),
],
),
child: Stack(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(20),
child: SizedBox(
// TODO: set size in config
height: 200,
child: preview,
// child: frontPreviewTexture,
),
),
Text("${sensor.position}"),
],
));
});