上一页 1 2 3 4 5 6 7 8 ··· 188 下一页
摘要: 一,报错信息: Unable to connect to Anthropic services Failed to connect to api.anthropic.com: ERR_BAD_REQUEST如图: 二,原因: 这是因为claude code首次启动时会检查用户地区 部分地区因法律原因 阅读全文
posted @ 2026-03-08 22:07 刘宏缔的架构森林 阅读(274) 评论(0) 推荐(0)
摘要: 一,安装node和npm 二,安装claude npm install -g @anthropic-ai/claude-code 查看安装路径: $ whereis claude claude: /home/liuhongdi/.nvm/versions/node/v24.13.0/bin/clau 阅读全文
posted @ 2026-03-08 21:14 刘宏缔的架构森林 阅读(21) 评论(0) 推荐(0)
摘要: 一,代码: 说明: 使用async关键字,你可以在函数内部使用await关键字来等待另一个异步操作的完成,而不会阻塞当前线程的执行。 Future<String> getMyName() { //await Future.delayed(Duration(seconds: 2)); //函数内部不能 阅读全文
posted @ 2026-03-08 13:01 刘宏缔的架构森林 阅读(5) 评论(0) 推荐(0)
摘要: 一,代码: Future<String> getMyName() { return Future.delayed(Duration(seconds: 2), () => '老孟'); } void myclick() async{ //错误得到Future类型返回 var name = getMyN 阅读全文
posted @ 2026-03-08 12:32 刘宏缔的架构森林 阅读(7) 评论(0) 推荐(0)
摘要: 一,代码: //每1秒打印一下当前数字 void tick10() async { for (int i = 1; i <= 10; i++) { await Future.delayed(Duration(seconds: 1),(){ print("tick"+i.toString()); }) 阅读全文
posted @ 2026-03-08 10:44 刘宏缔的架构森林 阅读(4) 评论(0) 推荐(0)
摘要: 一,代码 void myclick() async{ print("a"); //await tells dart to wait till this completes. // If it's not used before a future, // then dart doesn't wait 阅读全文
posted @ 2026-03-07 22:16 刘宏缔的架构森林 阅读(4) 评论(0) 推荐(0)
摘要: 一,代码: 1,main import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:get/get.dart'; impor 阅读全文
posted @ 2026-03-07 21:13 刘宏缔的架构森林 阅读(9) 评论(0) 推荐(0)
摘要: 一,代码: 1,main import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:get/get.dart'; impor 阅读全文
posted @ 2026-03-07 20:55 刘宏缔的架构森林 阅读(12) 评论(0) 推荐(0)
摘要: 一,代码: model: class ListItemModel { String author; String title; int id; ListItemModel(this.author,this.title, this.id) {} ListItemModel.fromJson(Map<S 阅读全文
posted @ 2026-03-04 18:52 刘宏缔的架构森林 阅读(6) 评论(0) 推荐(0)
摘要: 一,报错信息: Vertical viewport was given unbounded height 二,解决: 原代码: return Scaffold( appBar: AppBar(title: Text('这是首页'),), body: Center( child:Column( chi 阅读全文
posted @ 2026-03-04 17:55 刘宏缔的架构森林 阅读(5) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 188 下一页