cost 182 ms
如何从“添加新”DropdownButtonFormField 调用表单 - How to call a form from an 'Add New' DropdownButtonFormField

我是一名拥有 25 年学位的计算机科学家,但对 Flutter 和一般的移动应用程序还是陌生的。 我现在正在构建 forms 并希望 append 在 DropDownButtonFormField 中现有成员列表的底部添加一个“添加新”项。 如果用户选择“添加新”项,我想调用一个“注册新成员”表单 ...

构建 RegisterScreen() 时抛出了以下 _TypeError:类型“String”不是“index”的“int”类型的子类型 - The following _TypeError was thrown building RegisterScreen() : type 'String' is not a subtype of type 'int' of 'index'

我的下拉按钮有问题下拉列表中的值以前见过,但在 2023 年 1 月 25 日更新后,我遇到错误“type 'String' is not a subtype of type 'int' of 'index'” ...

flutter:应该只有一个项目具有 [DropdownButton] 的值:A。检测到零个或 2 个或更多 [DropdownMenuItem] 具有相同的值 - flutter: There should be exactly one item with [DropdownButton]'s value: A. Either zero or 2 or more [DropdownMenuItem]s were detected with the same

我用 Flutter 制作了 DropdownButton,但出现错误“应该只有一个项目具有 [DropdownButton] 的值:A。检测到零个或 2 个或更多 [DropdownMenuItem] 具有相同的值 'package:flutter /src/material/dropdown.d ...

想要将下拉列表与 flutter 中下拉按钮 2 的中心对齐 - Wants to align drop down list to the center for drop down button2 in flutter

在 flutter 中,我想使下拉列表居中对齐。下面是我当前的代码,有人可以指导我解决这个问题。 我想将它居中对齐到下拉按钮下方。我应该对齐文本小部件还是有任何其他属性来设置它的 alignment ...

我如何从列表中调用/分配单个变量 - How can i call/assign individual variables from the list

从“Cel”类,我想从“cel_lista”传输数据,但只有“cel”项目在此处输入图像描述 ` 这是“Cel”类代码 这是 DropdownButton 代码: ` 我想将变量'imie'分配给文本在这里输入图像描述` 这是用户类代码: 这是文本项目代码 ` 我试图调用该对象但没有成功我缺乏知 ...

应该只有一项具有 [DropdownButton] 的值: 。 检测到具有相同值的零个或两个或多个 [DropdownMenuItem] - There should be exactly one item with [DropdownButton]'s value: . Either zero or 2 or more [DropdownMenuItem]s were detected with the same value

它显示此错误。 应该只有一项具有 [DropdownButton] 的值: 。 检测到零个或两个或多个 [DropdownMenuItem] 具有相同的值 'package:flutter/src/material/dropdown.dart': Failed assertion: line 89 ...

如何使下拉按钮分离 class 并在 flutter 项目的任何地方使用? - How to make Dropdown Button Seprate class andd use in any where in flutter project?

我使 Seprate DropDownButton 自定义 StatelessWidget class 但它给我错误。 错误=> 应该只有一项具有 [DropdownButton] 的值:“公司”实例。 检测到零个或两个或多个 [DropdownMenuItem] 具有相同的值 'packa ...

无法在对话框中获取 DropdownButton 以在更改/选择时更新为新值 - Cannot get DropdownButton inside Dialog to update to new value on changed/selected

这是我所拥有的。 小部件按预期构建,但下拉菜单在选择新值后不会更新。 我知道那里有很多类似的问题,但大多数解决方案都是确保selected的等效项是全局定义的使用setState() 我都尝试过,但似乎无法正常工作。 我可以确认 selected 被设置为等于值,只是没有反映在 UI 上。 ...

为什么 DropDownButtonFormField 不需要 setState 来重建,而 DropDownButton 需要它? - Why the DropDownButtonFormField does not need a setState to to rebuild, while the DropDownButton needs it?

我试图弄清楚,并阅读了两者的文档,但我没有找到答案,这是我的意思的一个例子: 这只是一个简单的无状态小部件,中间有一个DropdownButton :上面代码的 output 如果我们只是将小部件更改为DropdownButtonFormField而其他所有内容保持不变,则对所选项目的更改会反映在 ...

注册表单中 DropdownButtonFormFields 的条件语句 - Conditional statement for DropdownButtonFormFields in registeration form

仍然是 flutter 的新手,想知道是否有人可以帮助我解决我遇到的问题。 我正在尝试使用 email、密码、密码确认、县和 zip 代码创建一个注册表单。 (县和 zip 代码 forms 是下拉按钮表单字段)除了 zip 代码下拉之外,我已经成功编码了所有其他内容。 我需要它以县选择为条件。 ...

Flutter - DropdownButton 未显示所选项目 - Flutter - DropdownButton not showing selected item

当我 select DropdownButton 中的项目之一时,它应该从提示文本更改为所选项目。 它继续显示提示文本,就像我没有 select 一样。 虽然我将选择打印到控制台,但我可以在那里看到我的选择。 您的帮助将不胜感激。 (我想我已经阅读了这里的每一篇文章) 当我 select 设备(' ...

如何将下拉按钮与 TabBar 结合使用 - how to combine Dropdown buttom with TabBar

我想将下拉按钮与 TabBar 结合起来我找到了一个解决方案,但是 DropDown 按钮位于 Tab 内,您必须按下字母才能显示下拉按钮,而在按下整个 TabBar 时它不会这样做,这就是为什么虽然这是一个解决方案,它不是最好的,你能帮我改进一下吗? ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM