get static method

dynamic get({
  1. BuildContext? context,
})

返回值或运行基于平台的函数。 如果传递了上下文,它将通过 Theme.of(context).platform 获取平台。 否则,它将使用 defaultTargetPlatform。

Implementation

static get({BuildContext? context}) {
  return context != null ? Theme.of(context).platform : defaultTargetPlatform;
}