Category: Flutter

Sep 24, 2023

Flutter中 ...展开操作符的使用和代码演示

在Flutter中,...展开操作符用于将List或Map展开并合并成新的集合。

Read more
Sep 21, 2023

Flutter getElementForInheritedwidget0fExactType

The `getElementForInheritedWidgetOfExactType` method in Flutter is used to access the nearest instance of a specific inherited widget type within the widget tree.

Read more
Sep 15, 2023

Flutter build 中使用 switch语句

在Flutter中,可以使用switch语句根据变量的值执行不同的操作,每个case匹配后需用break结束,无匹配时执行default操作。

Read more
Sep 15, 2023

Flutter 使用 ConstrainedBox 限制最小/最大尺寸

在 Flutter 中,使用 ConstrainedBox 可以方便地限制其子 Widget 的最小和最大尺寸,通过设置 BoxConstraints 属性来实现。

Read more
Sep 15, 2023

Flutter 在屏幕上进行水平拖动时执行“返回”操作

在Flutter中,通过使用GestureDetector和Navigator,可以实现在屏幕上水平拖动时执行“返回”操作。

Read more
PreviousNext