`
var myLongWidget = Builder(builder: (context) {
return Container(
padding: const EdgeInsets.all(30.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.blueAccent, width: 5.0),
color: Colors.redAccent,
),
///
/// Note: Do not use Scrolling widget, instead place your children in Column.
///
/// Do not use widgets like 'Expanded','Flexible',or 'Spacer'
///
child: Column(
children: [
...List.generate(2000, (e)=>Text('123231231231kagahjhjwhewtjewrewlrewrew')),
],
),
);
});
return screenshotController.captureFromLongWidget(
InheritedTheme.captureAll(
context,
Material(
child: myLongWidget,
),
to: context,
),
delay: Duration(milliseconds: 100),
context: context,
///
/// Additionally you can define constraint for your image.
///
/// constraints: BoxConstraints(
/// maxHeight: 1000,
/// maxWidth: 1000,
/// )
);
`
[✓] Flutter (Channel stable, 3.27.4, on macOS 15.3.2 24D81 darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.3.4.1)