mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-05-24 08:37:00 +08:00
fix: code conflict
This commit is contained in:
@ -33,11 +33,13 @@ class DisclaimerMsgState extends State<DisclaimerMsg> {
|
||||
void refs(bool value) async {
|
||||
final SharedPreferences prefs = await _prefs;
|
||||
final bool unKnow = value;
|
||||
setState(() {
|
||||
_unKnow = prefs.setBool("disclaimer::Boolean", unKnow).then((bool success) {
|
||||
return unKnow;
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_unKnow = prefs.setBool("disclaimer::Boolean", unKnow).then((bool success) {
|
||||
return unKnow;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
@ -135,12 +137,12 @@ class DisclaimerMsgState extends State<DisclaimerMsg> {
|
||||
tristate: false,
|
||||
value: _valBool,
|
||||
onChanged: (bool bol) {
|
||||
setState(() {
|
||||
_valBool = bol;
|
||||
});
|
||||
// refs(bol);
|
||||
Navigator.of(context)
|
||||
.pop(); // here I pop to avoid multiple Dialogs
|
||||
if(mounted) {
|
||||
setState(() {
|
||||
_valBool = bol;
|
||||
});
|
||||
}
|
||||
Navigator.of(context).pop(); // here I pop to avoid multiple Dialogs
|
||||
showAlertDialog(context); //here i call the same function
|
||||
}),
|
||||
Text('不再自动提示', style: TextStyle(fontSize: 14)),
|
||||
|
@ -20,6 +20,7 @@ class _FullScreenCodeDialogState extends State<FullScreenCodeDialog> {
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
print('widget.filePath=======${widget.filePath}');
|
||||
getExampleCode(context,'${widget.filePath}', DefaultAssetBundle.of(context))
|
||||
.then<void>((String code) {
|
||||
if (mounted) {
|
||||
|
@ -61,7 +61,9 @@ class _ListRefreshState extends State<ListRefresh> {
|
||||
Future _getMoreData() async {
|
||||
if (!isLoading && _hasMore) {
|
||||
// 如果上一次异步请求数据完成 同时有数据可以加载
|
||||
setState(() => isLoading = true);
|
||||
if (mounted) {
|
||||
setState(() => isLoading = true);
|
||||
}
|
||||
//if(_hasMore){ // 还有数据可以拉新
|
||||
List newEntries = await mokeHttpRequest();
|
||||
//if (newEntries.isEmpty) {
|
||||
|
Reference in New Issue
Block a user