DatePicker在Flutter中使用原生Android小部件还是Flutter中的自定义小部件?

huangapple go评论66阅读模式
英文:

Does DatePicker in flutter uses native android widget or its a custom widget in Flutter

问题

When working on a Flutter project that involved handling dates, I noticed that the DatePicker widget looked very similar to the native Android date picker.

I'm curious to know whether DatePicker is a custom implementation in Flutter or if it uses a method to invoke the native Android date picker.

In Flutter:
DatePicker在Flutter中使用原生Android小部件还是Flutter中的自定义小部件?

In Native Android:
DatePicker在Flutter中使用原生Android小部件还是Flutter中的自定义小部件?

英文:

When working on a Flutter project that involved handling dates, I noticed that the DatePicker widget looked very similar to the native Android date picker.

I'm curious to know whether DatePicker is a custom implementation in Flutter or if it uses a method to invoke the native Android date picker.

In Flutter:

DatePicker在Flutter中使用原生Android小部件还是Flutter中的自定义小部件?

In Native Android:

DatePicker在Flutter中使用原生Android小部件还是Flutter中的自定义小部件?

答案1

得分: 1

这是自定义实现。我找不到对以下内容的任何使用:

  • PlatformViewLink(混合式组合)
  • AndroidView(虚拟显示)

date_picker.dartcalendar_date_picker.dart 文件中可以看到它们是如何实现的。

英文:

It's a custom implementation. I couldn't find any use of

  • PlatformViewLink (Hybrid composition)
  • AndroidView (Virtual display)

in the date_picker.dart and calendar_date_picker.dart

You can see in the files how it is implemented.

huangapple
  • 本文由 发表于 2023年5月10日 19:03:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76217632.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定