上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 169 下一页
摘要: 一,代码: 1,文件: conf/constants.dart import 'package:flutter/material.dart'; // 定义全局常量 const String globalApiKey = '你的api密钥:1234567'; const Color defaultBa 阅读全文
posted @ 2025-04-26 08:36 刘宏缔的架构森林 阅读(46) 评论(0) 推荐(0)
摘要: 一,代码: import 'package:flutter/material.dart'; import 'package:get/get.dart'; class SmallPage extends StatelessWidget { const SmallPage({super.key}); @ 阅读全文
posted @ 2025-04-26 08:36 刘宏缔的架构森林 阅读(40) 评论(0) 推荐(0)
摘要: 一,代码: import 'package:flutter/material.dart'; class Scroll1Page extends StatefulWidget { const Scroll1Page({super.key}); @override State<Scroll1Page> 阅读全文
posted @ 2025-04-19 10:50 刘宏缔的架构森林 阅读(24) 评论(0) 推荐(0)
摘要: 一,下载 库的地址: https://pub.dev/packages/url_launcher 编辑pubspec.yaml dependencies: flutter: sdk: flutter url_launcher: ^6.3.1 然后点击 pub get 二,配置权限 配置权限:andr 阅读全文
posted @ 2025-04-19 10:50 刘宏缔的架构森林 阅读(57) 评论(0) 推荐(0)
摘要: 一,代码: 说明:参考了https://blog.csdn.net/u014361280/article/details/146199443 1,类: import 'dart:async'; import 'package:flutter/material.dart'; class Countdo 阅读全文
posted @ 2025-04-19 10:50 刘宏缔的架构森林 阅读(120) 评论(0) 推荐(0)
摘要: 一,安装第三方库 地址: https://pub.dev/packages/cached_network_image 编辑pubspec.yaml dependencies: flutter: sdk: flutter get: ^4.7.2 cached_network_image: ^3.4.1 阅读全文
posted @ 2025-04-19 10:49 刘宏缔的架构森林 阅读(223) 评论(0) 推荐(0)
摘要: 一,代码: import 'package:flutter/material.dart'; class Drag2Page extends StatefulWidget { @override State<Drag2Page> createState() => _Drag2PageState(); 阅读全文
posted @ 2025-04-19 10:49 刘宏缔的架构森林 阅读(30) 评论(0) 推荐(0)
摘要: 一,代码: import 'package:flutter/material.dart'; class DragPage extends StatefulWidget { @override State<DragPage> createState() => _DragPageState(); } c 阅读全文
posted @ 2025-04-19 10:49 刘宏缔的架构森林 阅读(26) 评论(0) 推荐(0)
摘要: 一,代码: controller: import 'package:get/get.dart'; // 定义控制器 class VisibleController extends GetxController { //变量obs RxBool isVisible = true.obs; //方法 v 阅读全文
posted @ 2025-04-19 10:49 刘宏缔的架构森林 阅读(29) 评论(0) 推荐(0)
摘要: 一,代码: 1,共享变量的controller import 'package:get/get.dart'; // 定义控制器 class StateController extends GetxController { //静态obs var goodsNum = 0.obs; // 定义一个方法 阅读全文
posted @ 2025-04-19 10:43 刘宏缔的架构森林 阅读(90) 评论(0) 推荐(0)
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 169 下一页