From c79363ad7b658228fade1528a5b083a5610855d7 Mon Sep 17 00:00:00 2001 From: tanjiancheng <562575412@qq.com> Date: Mon, 2 Dec 2024 14:13:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D3.22=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9sample?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tanjiancheng <562575412@qq.com> --- example/lib/main.dart | 6 +++--- example/pubspec.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index bf59225..be4a4ba 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -39,9 +39,9 @@ class _MyAppState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ new Text("Screen is kept on ? "), - new Checkbox(value: _isKeptOn, onChanged: (bool b){ - Screen.keepOn(b); - setState((){_isKeptOn = b; }); + new Checkbox(value: _isKeptOn, onChanged: (b){ + Screen.keepOn(b!); + setState((){_isKeptOn = b!; }); }) ] ), diff --git a/example/pubspec.yaml b/example/pubspec.yaml index acc3109..e94a219 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -15,7 +15,7 @@ name: screen_example description: Demonstrates how to use the screen plugin. environment: - sdk: '>=2.0.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' dependencies: flutter: @@ -23,7 +23,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^0.1.0 + cupertino_icons: ^1.0.6 dev_dependencies: flutter_test: -- Gitee