
Flutter 二次封装Sqlite基类
- 2023-03-22
- flutter
安装 Sqlite 插件 首先我们需要安装 Sqlite 插件 sqflite: ^2.0.2 创建基类,用来实例化数据库 import 'package:sqflite/sqflite.dart'; abstract class EntityPlus { static const String _dbNam...

Dart/Flutter防抖与节流
背景 在一些计算较为复杂、操作较为耗时或者操作为引起页面重绘的场景,如果事件触发的频率毫无限制,除了带来性能上的负担,还会导致糟糕的用户体验。如:根据输入框输入的内容向服务端查询相关文章,用户多...

Flutter/Dart循环 for、 while 、do..while 、break、continue
++、-- 表示自增、自减,运算规则和java类似在赋值运算里:如果++、--写在前面,表示先运算,后赋值如果++、--写在后面,表示先赋值,后运算while 、do..while区别:do..while无论条件是否成立,首先执行一次bre...
Dart DevTools exited with code 255解决
- 2021-12-22
- 设计开发
尝试从 Visual Studio Code 打开 DevTools 时,我看到此错误消息: Dart DevTools exited with code 255 in brand new flutter installation 解决方法...

Dart 集合:List、Set、Map
- 2019-12-11
- flutter
Dart提供了3种核心的集合类型 List(列表)、Set(集合)和Map(映射)。 一. List 编程中最常使用的集合是数组。Dart以列表(List)对象的形式表示数组。列表(List)只是一组有序的对象。 1. List种类 固定...