flutter_in_action_2nd icon indicating copy to clipboard operation
flutter_in_action_2nd copied to clipboard

《Flutter实战 第二版》 书稿

Results 120 flutter_in_action_2nd issues
Sort by recently updated
recently updated
newest added

```dart Git([this.context]) { _options = Options(extra: {"context": context}); } ``` The parameter 'context' can't have a value of 'null' because of its type, but the implicit default value is 'null'....

![image](https://user-images.githubusercontent.com/40187930/168002272-59461648-b4c1-4012-bfce-6181f144cff6.png)

Element与RenderObject不是一一对应的! 原文:根据Widget生成Element,然后创建相应的RenderObject并关联到Element.renderObject属性上。 建议改成: 根据Widget生成Element,但并非每种Widget都有UI属性(如类似Provider/Consumer的Widget没有UI属性),所以对于具有UI属性的Widget,其对应的Element(如继承自RenderObjectElement)可以通过createRenderObject方法创建相应的RenderObject并关联到Element.renderObject属性上。一般Element的RenderObject属性是其自身或子组件(Element本身非UI属性,但子组件肯定存在)RenderObject的引用。 以上是否合适点,请斟酌~

https://github.com/flutterchina/flutter_in_action_2nd/blob/960f68c84fec8215c6ccaaf24f1f4e9eb6d5970b/src/chapter8/hittest.md?plain=1#L228 这里的“续”应该是多余的,可以删掉。

似乎没有这个例子6.3.6中虽然有给ListView添加固定头的例子,但是这个例子只是在Colum中加了一个组件,并不是ListView的列表项,也不能随着ListView滚动。

![image](https://user-images.githubusercontent.com/84690869/158023437-2abb4469-6149-4e86-b78c-0ce417bfdbf0.png)

**Dart vs JavaScript** 小节中: > 正因如此,在 Flutter中,Dart 几乎放弃了脚本语言动态化的特性,如不支持反射、也不支持动态创建函数等。 Dart语言本身是支持反射的,只是Flutter考虑到移动端包大小问题放弃了支持反射特性。 这里有官方的解释:https://docs.flutter.dev/resources/faq#does-flutter-come-with-a-reflection--mirrors-system。