草庐IT

dart-polymer

全部标签

sockets - 连接到Socket、Dart、Flutter的奇怪时间

在我的研究中,我正在测量移动客户端(用Flutter编写)通过Socket连接到服务器(用Ktor编写)所需的时间。我的应用程序与套接字连接和断开连接10次,结果如下(以毫秒为单位):[23,19,1,1,2,1,6,2,3,1]有人可以向我解释一下,在1-2-3连接之后,下一个连接的时间怎么可能只需要几毫秒?是我的测试方法有误还是它背后有某种Dart机制?连接客户端的函数:voidconnectionLoop(){_connectionTimesMultiple().then((connectionTime){_connectionTimes.add(connectionTime);

sockets - 连接到Socket、Dart、Flutter的奇怪时间

在我的研究中,我正在测量移动客户端(用Flutter编写)通过Socket连接到服务器(用Ktor编写)所需的时间。我的应用程序与套接字连接和断开连接10次,结果如下(以毫秒为单位):[23,19,1,1,2,1,6,2,3,1]有人可以向我解释一下,在1-2-3连接之后,下一个连接的时间怎么可能只需要几毫秒?是我的测试方法有误还是它背后有某种Dart机制?连接客户端的函数:voidconnectionLoop(){_connectionTimesMultiple().then((connectionTime){_connectionTimes.add(connectionTime);

dart - flutter 用户界面 : Absolute positioned element with fixed height and 100% width

在flutter中,我想要一个具有固定高度和100%宽度的容器。为此,我使用了:Row(children:[Flexible(child:Container(color:Colors.blue,height:40.0,),),],),现在,我想将这一行偏移屏幕几个像素。为此,我尝试使用:Stack(children:[Positioned(left:-5.0,child:Row(children:[Flexible(child:Container(color:Colors.blue,height:40.0,),),],),),],),这给了我错误:在performLayout()期间抛

dart - flutter 用户界面 : Absolute positioned element with fixed height and 100% width

在flutter中,我想要一个具有固定高度和100%宽度的容器。为此,我使用了:Row(children:[Flexible(child:Container(color:Colors.blue,height:40.0,),),],),现在,我想将这一行偏移屏幕几个像素。为此,我尝试使用:Stack(children:[Positioned(left:-5.0,child:Row(children:[Flexible(child:Container(color:Colors.blue,height:40.0,),),],),),],),这给了我错误:在performLayout()期间抛

dart - 与最高 child 一样高并允许其他 child CrossAxisAlignment.stretch 的行

我想在Flutter中创建一个Row,它的最高子元素的高度最大。然后其他较小的child应该在可用空间中拉伸(stretch)。我尝试在Row上使用CrossAxisAlignment.stretch和MainAxisSize.min:Row(crossAxisAlignment:CrossAxisAlignment.stretch,mainAxisAlignment:MainAxisAlignment.spaceBetween,mainAxisSize:MainAxisSize.min,children:[Container(child:Text("1")),Container(ch

dart - 与最高 child 一样高并允许其他 child CrossAxisAlignment.stretch 的行

我想在Flutter中创建一个Row,它的最高子元素的高度最大。然后其他较小的child应该在可用空间中拉伸(stretch)。我尝试在Row上使用CrossAxisAlignment.stretch和MainAxisSize.min:Row(crossAxisAlignment:CrossAxisAlignment.stretch,mainAxisAlignment:MainAxisAlignment.spaceBetween,mainAxisSize:MainAxisSize.min,children:[Container(child:Text("1")),Container(ch

dart - 我如何在 flutter 中增加 bottomAppbar 的高度

我的应用程序中有一个BottomAppBar,但高度似乎只是环绕其中的图标。我想给bottomappbar一些更高的高度,请问我该怎么做bottomNavigationBar:BottomAppBar(child:Row(mainAxisSize:MainAxisSize.max,mainAxisAlignment:MainAxisAlignment.spaceBetween,children:[Icon(Icons.category),Icon(Icons.account_circle),Icon(Icons.message),Icon(Icons.access_alarm)],),

dart - 我如何在 flutter 中增加 bottomAppbar 的高度

我的应用程序中有一个BottomAppBar,但高度似乎只是环绕其中的图标。我想给bottomappbar一些更高的高度,请问我该怎么做bottomNavigationBar:BottomAppBar(child:Row(mainAxisSize:MainAxisSize.max,mainAxisAlignment:MainAxisAlignment.spaceBetween,children:[Icon(Icons.category),Icon(Icons.account_circle),Icon(Icons.message),Icon(Icons.access_alarm)],),

dart - 如何在 flutter 中调整 CircularProgressIndicator 的大小?

我看到了thisquestion和thisissue,但它不能解决我的问题。我尝试了SizedBox和SizedBox.fromSize以及BoxConstraints,但它们都不起作用。我该如何处理?import'package:flutter/material.dart';import'package:mymovie/bloc_helpers/bloc_event_state_builder.dart';import'package:mymovie/logics/intro/intro.dart';import'package:mymovie/resources/strings.d

dart - 如何在 flutter 中调整 CircularProgressIndicator 的大小?

我看到了thisquestion和thisissue,但它不能解决我的问题。我尝试了SizedBox和SizedBox.fromSize以及BoxConstraints,但它们都不起作用。我该如何处理?import'package:flutter/material.dart';import'package:mymovie/bloc_helpers/bloc_event_state_builder.dart';import'package:mymovie/logics/intro/intro.dart';import'package:mymovie/resources/strings.d