上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 31 下一页

2022年8月11日

flutter 常见组件的特殊用法 —— Scaffold

摘要: scaffold 中 body 的 初始位置 通常 body 内容的初始滚动位置位于状态栏或导航栏之下。但某些情况下需要调整初始位置: 具体分以下几个情况讨论: 1、对于非 ListView 组件 ① 在AppBar 不存在时,亦即状态栏未被 AppBar 占用: body 会占满状态栏,跟 ② 中 阅读全文

posted @ 2022-08-11 21:26 Lemo_wd 阅读(2200) 评论(0) 推荐(0)

2022年7月27日

flutter —— 布局原理与约束

摘要: 一、布局模型 主要有两种布局模型: ① 基于 RenderBox 的盒模型布局。 ② 基于 Sliver ( RenderSliver ) 按需加载列表布局。(Sliver 布局请看) 两种布局方式在细节上略有差异,但大体流程相同,布局流程如下: 上层组件向下层组件传递约束(constraints) 阅读全文

posted @ 2022-07-27 11:22 Lemo_wd 阅读(762) 评论(0) 推荐(1)

2022年7月26日

Objective-C 入门

摘要: NSString 字符串 C 中字符串的存储方式 使用字符数组 使用字符指针 NS 前缀 NeXTSTEP -> Cocoa -> Fundation 框架 @符号 将 C 字符串转成 OC 字符串 OC中绝大部分关键字都是以@开头 代码示例: NSString *s1 = @"jack"; //使 阅读全文

posted @ 2022-07-26 21:49 Lemo_wd 阅读(58) 评论(0) 推荐(0)

2022年1月23日

flutter —— getx 中各种工具方法

摘要: 本地化 略(建议配合 get_cli 相关命令使用) 更新 locale var locale = Locale('en', 'US'); Get.updateLocale(locale); 获取系统的 locale return GetMaterialApp( locale: Get.device 阅读全文

posted @ 2022-01-23 14:53 Lemo_wd 阅读(1449) 评论(0) 推荐(0)

flutter —— 使用 getx 进行路由管理

摘要: 路由 基础方法 Get.toNamed("/NextScreen"); Get.offNamed("/NextScreen"); Get.offAllNamed("/NextScreen"); 路由传参 Get.toNamed("/NextScreen", arguments: 'Get is th 阅读全文

posted @ 2022-01-23 14:31 Lemo_wd 阅读(2610) 评论(0) 推荐(0)

flutter —— 使用 getx 进行状态管理

摘要: 简单状态管理器 GetxController 有一个 update 方法,用于触发更新操作。 类似于 ChangeNotifier 中的 notifyListeners 方法 源码 abstract class GetxController extends DisposableInterface w 阅读全文

posted @ 2022-01-23 14:00 Lemo_wd 阅读(2268) 评论(0) 推荐(0)

2022年1月16日

flutter 基础 —— CustomScrollView 与 Slivers

摘要: 一、CustomScrollView 的作用 创建一个公共的 Scrollable 和 Viewport ,然后它的 slivers 参数接受一个 Sliver 数组 二、常用 Sliver 组件对照表 滚动 sliver Sliver名称功能对应的可滚动组件 SliverList 列表 ListV 阅读全文

posted @ 2022-01-16 16:39 Lemo_wd 阅读(444) 评论(0) 推荐(0)

2022年1月12日

flutter 基础 —— CustomPaint 动画效果

摘要: 路径动画 示例: 代码 //路径动画 var path = Path() ..moveTo(50, 50) ..lineTo(100, 100) ..lineTo(200, 90); var rect1 = Rect.fromCircle(center: Offset(80, 450), radiu 阅读全文

posted @ 2022-01-12 23:12 Lemo_wd 阅读(496) 评论(0) 推荐(0)

flutter 基础 —— CustomPaint 解析

摘要: 基础介绍 实现自定义组件大致有三种方式,第一种是组合现有的组件;第二种是直接构建 RenderObject,比如 ColoredBox 组件;第三种就是下面介绍的,CustomPaint,它与第二种类似,都是通过 canvas 去绘制图形。 坐标 (注意Y轴正方向是向下,数学中是向上) Custom 阅读全文

posted @ 2022-01-12 10:52 Lemo_wd 阅读(611) 评论(0) 推荐(0)

2021年7月16日

rust 基础 —— iterator 迭代器

摘要: 一、自定义迭代器 实现 Iterator trait 即可 pub struct Counter { pub count: usize, } impl Iterator for Counter { type Item = usize; fn next(&mut self) -> Option<Sel 阅读全文

posted @ 2021-07-16 22:38 Lemo_wd 阅读(111) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 31 下一页

导航