Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
F
flutter_clx_base
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
flutter_clx_base
Commits
0d049dac
提交
0d049dac
authored
5月 23, 2022
作者:
guoqing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改 最小版本19
上级
b905c418
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
3 行增加
和
34 行删除
+3
-34
build.gradle
android/build.gradle
+1
-1
build.gradle
example/android/app/build.gradle
+1
-1
main.dart
example/lib/main.dart
+1
-32
没有找到文件。
android/build.gradle
浏览文件 @
0d049dac
...
...
@@ -41,7 +41,7 @@ android {
}
defaultConfig
{
minSdkVersion
1
6
minSdkVersion
1
9
}
}
...
...
example/android/app/build.gradle
浏览文件 @
0d049dac
...
...
@@ -44,7 +44,7 @@ android {
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.clx.flutter_clx_base_example"
minSdkVersion
flutter
.
minSdkVersion
minSdkVersion
19
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
...
...
example/lib/main.dart
浏览文件 @
0d049dac
import
'package:flutter/material.dart'
;
import
'dart:async'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_clx_base/flutter_clx_base.dart'
;
void
main
(
)
{
runApp
(
const
MyApp
());
...
...
@@ -16,35 +12,8 @@ class MyApp extends StatefulWidget {
}
class
_MyAppState
extends
State
<
MyApp
>
{
String
_platformVersion
=
'Unknown'
;
@override
void
initState
()
{
super
.
initState
();
initPlatformState
();
}
final
String
_platformVersion
=
'Unknown'
;
// Platform messages are asynchronous, so we initialize in an async method.
Future
<
void
>
initPlatformState
()
async
{
String
platformVersion
;
// Platform messages may fail, so we use a try/catch PlatformException.
// We also handle the message potentially returning null.
try
{
platformVersion
=
await
FlutterClxBase
.
platformVersion
??
'Unknown platform version'
;
}
on
PlatformException
{
platformVersion
=
'Failed to get platform version.'
;
}
// If the widget was removed from the tree while the asynchronous platform
// message was in flight, we want to discard the reply rather than calling
// setState to update our non-existent appearance.
if
(!
mounted
)
return
;
setState
(()
{
_platformVersion
=
platformVersion
;
});
}
@override
Widget
build
(
BuildContext
context
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论