代码管理和调用服务器颤振

时间:2021-03-26 10:32:54

标签: flutter

我遇到了麻烦,他们最近让我使用 Flutter,我基本上不知道该怎么做,我来自 swift。我被困在一件琐碎的事情上,事实是我不熟悉代码。

当我按下文本字段旁边的箭头时,我必须让它接受插入到文本字段中的代码,对 /api/users/{code} 进行 GET 调用,这样我才能取回用户数据。

>

这是我用来创建文本字段和按钮的代码:

Positioned(
                      //top: size.height * .02,
                      //right: size.width * .02,
                      child: Row(
                        children: [
                          Expanded(
                              child: TextField(
                                inputFormatters: [
                                  new LengthLimitingTextInputFormatter(11),
                                ],
                                decoration: InputDecoration(
                                  filled: true,
                                  fillColor: Colors.white,
                                  focusedBorder: OutlineInputBorder(
                                    borderSide: BorderSide(color: Colors.white),
                                  ),
                                  enabledBorder: UnderlineInputBorder(
                                    borderSide: BorderSide(color: Colors.white),
                                  ),
                                ),
                                textAlign: TextAlign.center,
                                style: TextStyle(
                                  fontSize: 18.0,
                                  color: Colors.black,
                                ),
                              ),
                            ),
                          IconButton(
                            icon: Image.asset("assets/images/send.png"),
                            onPressed: () => showDialog(context: context, builder: (_) => PaymentDialog()),
                          ),
                        ]
                      ),
                    ),

我需要这个来验证调用中的代码是否正确,然后让数据显示在下一个屏幕上,这是一个祝酒词,我只需要输入第一次调用时收到的数据的名称

我从通话中收到的数据,我必须在 PaymentDialog 中显示它们,目前我只打印了所有内容。我没有编写代码,因为它目前只是一个带有 3 个文本字段的警报,但必须获取从调用中接收到的数据。

请帮帮我,我有点不知所措,我不熟悉发出颤振调用和处理这个..

0 个答案:

没有答案
相关问题