Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion get-started/codelab/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ class RandomWordsState extends State<RandomWords> {
// 在每一列之前,添加一个1像素高的分隔线widget
[[highlight]]if (i.isOdd) return new Divider();[[/highlight]]

// 语法 "i ~/ 2" 表示i除以2,但返回值是整形(向下取整),比如i为:1, 2, 3, 4, 5
// 语法 "i ~/ 2" 表示i除以2,但返回值是整型(向下取整),比如i为:1, 2, 3, 4, 5
// 时,结果为0, 1, 1, 2, 2, 这可以计算出ListView中减去分隔线后的实际单词对数量
[[highlight]]final index = i ~/ 2;[[/highlight]]
// 如果是建议列表中最后一个单词对
Expand Down