Skip to content

Commit

Permalink
update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ritheshSalyan committed Feb 10, 2021
1 parent de95fbd commit 9df6f30
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [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
Expand Down
10 changes: 5 additions & 5 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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,
Expand All @@ -112,7 +112,7 @@ class _MyHomePageState extends State<MyHomePage> {
body: Center(
child: Column(
children: [
if (image != null) Image.memory(image),
Image.memory(image),
],
)),
),
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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:
Expand Down

0 comments on commit 9df6f30

Please sign in to comment.