提交 9df6f30e authored 作者: ritheshSalyan's avatar ritheshSalyan

update Readme

上级 de95fbdc
## [1.0.0-nullsafety.0] - 10/02/2021
* Add nullsafety
## [0.3.0] - 10/02/2021
* breaking change capture method returns Uint8List instead of File.
* support for web and windows
......
......@@ -50,7 +50,7 @@ class MyHomePage extends StatefulWidget {
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
Uint8List? _imageFile;
// Uint8List? _imageFile;
//Create an instance of ScreenshotController
ScreenshotController screenshotController = ScreenshotController();
......@@ -90,18 +90,18 @@ class _MyHomePageState extends State<MyHomePage> {
child: new Center(
child: Screenshot(
controller: screenshotController,
child: Text("HEllo"),
child: Text("You have pushed button $_counter times"),
),
),
),
floatingActionButton: FloatingActionButton(
onPressed: () {
_incrementCounter();
_imageFile = null;
// _imageFile = null;
screenshotController
.capture(delay: Duration(milliseconds: 10))
.then((Uint8List? image) async {
_imageFile = image;
// _imageFile = image;
if (image != null) {
showDialog(
context: context,
......@@ -112,7 +112,7 @@ class _MyHomePageState extends State<MyHomePage> {
body: Center(
child: Column(
children: [
if (image != null) Image.memory(image),
Image.memory(image),
],
)),
),
......
......@@ -8,7 +8,7 @@ description: A new Flutter project.
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1
publish_to: none
environment:
# sdk: '>=2.8.0 <3.0.0'
sdk: '>=2.12.0-259.8.beta <3.0.0'
......
name: screenshot
description: Flutter Screenshot Package (Runtime). Capture any Widget as an image.
version: 0.3.0
version: 1.0.0-nullsafety.0
homepage: https://github.com/SachinGanesh/screenshot
environment:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论