fix: code conflict

This commit is contained in:
yifeng.yl
2019-02-03 00:48:57 +08:00
181 changed files with 2261 additions and 1158 deletions

View File

@ -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)),

View File

@ -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) {

View File

@ -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) {