'In flutter, how to take screenshot of whole image after scrolling image horizontally?
current I am struggling to take whole screenshot from Stack Widget(used screenshot package from pub.dev). But after scrolling image horizontally and taking screenshot, I don't get missing part of image. Below is my code I have used. Thanks for advance.
Screenshot(
controller: screenshotController,
child: Stack(
children: [
// buildCurrentPath(context),
BlocBuilder<PatientBloc, PatientState>(
builder: (context, state) {
return Container(
child: LayoutBuilder(
builder: (context, constraints) => RepaintBoundary(
child: SingleChildScrollView(
// physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.horizontal,
child: SizedBox(
height: constraints.biggest.height,
// height: constraints.biggest.height,
// width: 200,
child: Image(
fit: BoxFit.cover,
image: FileImage(
File(
"/storage/emulated/0/Android/data/com.kk/files/test.png"),
),
),
),
),
),
),
);
},
),
],
),
),
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
