上一页 1 2 3 4 5 6 7 ··· 30 下一页

2023年1月10日

flutter 效果实现 —— 日历选择器

摘要: 效果: 代码:(已更正,周日是第一天,周六为最后一天) class _HomePageState extends State<HomePage> { DateTime startDate = DateTime.now(); DateTime endDate = DateTime.now().add( 阅读全文

posted @ 2023-01-10 10:25 Lemo_wd 阅读(499) 评论(0) 推荐(0) 编辑

2022年12月5日

SwiftUI 的状态管理

摘要: @State 被@State包装的值发生改变时,UI将被同时改变 struct ContentView: View { @State var title = "HelloWorld" var body: some View { VStack { Text(title) Button { title 阅读全文

posted @ 2022-12-05 23:18 Lemo_wd 阅读(147) 评论(0) 推荐(0) 编辑

2022年12月3日

SwiftUI 入门

摘要: [文档](https://developer.apple.com/documentation/swiftui/) ## 1 组件 ### 1.1 基础组件 #### Text ```swift Text("Hamlet") .font(.largeTitle) .fontWeight(.bold) 阅读全文

posted @ 2022-12-03 15:54 Lemo_wd 阅读(417) 评论(0) 推荐(0) 编辑

2022年12月2日

Swift 基础语法

摘要: [原文](https://swift.bootcss.com/01_welcome_to_swift/03_a_swift_tour) [英文原文](https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html) ## 简单值 类型不会 阅读全文

posted @ 2022-12-02 21:19 Lemo_wd 阅读(31) 评论(0) 推荐(0) 编辑

2022年11月18日

leetcode 算法笔记 —— 简单题

摘要: 简单题 1、两数之和 impl Solution { pub fn two_sum(nums: Vec<i32>, target: i32) -> Vec<i32> { let mut mp = HashMap::new(); for i in 0..nums.len() { let num = n 阅读全文

posted @ 2022-11-18 14:46 Lemo_wd 阅读(33) 评论(0) 推荐(0) 编辑

2022年11月17日

flutter 性能分析图表的查看

摘要: 1. Flutter 的线程 平台线程 即主线程,plugin 代码运行在此线程。具体请参阅 Android 的 MainThread 以及 iOS 的 UIKit 文档。 UI 线程 UI 线程在 Dart VM 中执行 Dart 代码。当应用创建和展示场景的时候,UI 线程首先建立一个 图层树( 阅读全文

posted @ 2022-11-17 16:48 Lemo_wd 阅读(371) 评论(0) 推荐(0) 编辑

2022年11月10日

rust 基础 —— Option 的 as_ref 与 as_deref

摘要: 代码: fn hello(name: &String) { println!("Name is {}", name); } fn greet(name: &str) { println!("Name is {}", name); } fn main() { let option_name: Opti 阅读全文

posted @ 2022-11-10 09:53 Lemo_wd 阅读(464) 评论(0) 推荐(0) 编辑

2022年11月4日

rust 基础 —— 创建链表

摘要: 使用枚举类 use crate::List::{Cons, Nil}; enum List { // Cons:元组结构体,包含链表的一个元素和一个指向下一节点的指针 Cons(u32, Box<List>), // Nil:末结点,表明链表结束 Nil, } // 可以为 enum 定义方法 im 阅读全文

posted @ 2022-11-04 14:52 Lemo_wd 阅读(365) 评论(0) 推荐(0) 编辑

2022年9月29日

flutter 效果实现 —— 组件自由移动与大小调整

摘要: 示例: class DynamicBoxPage extends StatelessWidget { const DynamicBoxPage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { 阅读全文

posted @ 2022-09-29 09:29 Lemo_wd 阅读(445) 评论(0) 推荐(0) 编辑

2022年9月21日

flutter 效果实现 —— 键盘快捷键绑定

摘要: 对于快捷键绑定回调大致有三种方式,第一种是使用 CallbackShortcuts;第二种是使用 Focus 的 onKey 回调,参考前一篇文章中的 Key Events 的示例1;第三种就是下面所介绍的。 效果: 代码: class ShortcutPage extends StatefulWi 阅读全文

posted @ 2022-09-21 00:38 Lemo_wd 阅读(502) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 30 下一页

导航