WillPopScope小部件是有状态小部件还是无状态小部件?

时间:2019-02-10 17:30:21

标签: dart flutter

我正在尝试在无状态小部件内使用 WillPopScope

1 个答案:

答案 0 :(得分:0)

易于在Flutter源代码中查找

https://github.com/flutter/flutter/blob/d927c9331005f81157fa39dff7b5dab415ad330b/packages/flutter/lib/src/widgets/will_pop_scope.dart#L16-L43

  

WillPopScope类扩展了StatefulWidget {

显然是有状态的小部件。