Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
screenshot
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
screenshot
Commits
9df6f30e
提交
9df6f30e
authored
2月 10, 2021
作者:
ritheshSalyan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update Readme
上级
de95fbdc
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
10 行增加
和
7 行删除
+10
-7
CHANGELOG.md
CHANGELOG.md
+3
-0
main.dart
example/lib/main.dart
+5
-5
pubspec.yaml
example/pubspec.yaml
+1
-1
pubspec.yaml
pubspec.yaml
+1
-1
没有找到文件。
CHANGELOG.md
浏览文件 @
9df6f30e
## [1.0.0-nullsafety.0] - 10/02/2021
*
Add nullsafety
## [0.3.0] - 10/02/2021
## [0.3.0] - 10/02/2021
*
breaking change capture method returns Uint8List instead of File.
*
breaking change capture method returns Uint8List instead of File.
*
support for web and windows
*
support for web and windows
...
...
example/lib/main.dart
浏览文件 @
9df6f30e
...
@@ -50,7 +50,7 @@ class MyHomePage extends StatefulWidget {
...
@@ -50,7 +50,7 @@ class MyHomePage extends StatefulWidget {
class
_MyHomePageState
extends
State
<
MyHomePage
>
{
class
_MyHomePageState
extends
State
<
MyHomePage
>
{
int
_counter
=
0
;
int
_counter
=
0
;
Uint8List
?
_imageFile
;
//
Uint8List? _imageFile;
//Create an instance of ScreenshotController
//Create an instance of ScreenshotController
ScreenshotController
screenshotController
=
ScreenshotController
();
ScreenshotController
screenshotController
=
ScreenshotController
();
...
@@ -90,18 +90,18 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -90,18 +90,18 @@ class _MyHomePageState extends State<MyHomePage> {
child:
new
Center
(
child:
new
Center
(
child:
Screenshot
(
child:
Screenshot
(
controller:
screenshotController
,
controller:
screenshotController
,
child:
Text
(
"
HEllo
"
),
child:
Text
(
"
You have pushed button
$_counter
times
"
),
),
),
),
),
),
),
floatingActionButton:
FloatingActionButton
(
floatingActionButton:
FloatingActionButton
(
onPressed:
()
{
onPressed:
()
{
_incrementCounter
();
_incrementCounter
();
_imageFile
=
null
;
//
_imageFile = null;
screenshotController
screenshotController
.
capture
(
delay:
Duration
(
milliseconds:
10
))
.
capture
(
delay:
Duration
(
milliseconds:
10
))
.
then
((
Uint8List
?
image
)
async
{
.
then
((
Uint8List
?
image
)
async
{
_imageFile
=
image
;
//
_imageFile = image;
if
(
image
!=
null
)
{
if
(
image
!=
null
)
{
showDialog
(
showDialog
(
context:
context
,
context:
context
,
...
@@ -112,7 +112,7 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -112,7 +112,7 @@ class _MyHomePageState extends State<MyHomePage> {
body:
Center
(
body:
Center
(
child:
Column
(
child:
Column
(
children:
[
children:
[
if
(
image
!=
null
)
Image
.
memory
(
image
),
Image
.
memory
(
image
),
],
],
)),
)),
),
),
...
...
example/pubspec.yaml
浏览文件 @
9df6f30e
...
@@ -8,7 +8,7 @@ description: A new Flutter project.
...
@@ -8,7 +8,7 @@ description: A new Flutter project.
# build by specifying --build-name and --build-number, respectively.
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
# Read more about versioning at semver.org.
version
:
1.0.0+1
version
:
1.0.0+1
publish_to
:
none
environment
:
environment
:
# sdk: '>=2.8.0 <3.0.0'
# sdk: '>=2.8.0 <3.0.0'
sdk
:
'
>=2.12.0-259.8.beta
<3.0.0'
sdk
:
'
>=2.12.0-259.8.beta
<3.0.0'
...
...
pubspec.yaml
浏览文件 @
9df6f30e
name
:
screenshot
name
:
screenshot
description
:
Flutter Screenshot Package (Runtime). Capture any Widget as an image.
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
homepage
:
https://github.com/SachinGanesh/screenshot
environment
:
environment
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论