草庐IT

RaisedButton

全部标签

dart - 列中 RaisedButton 小部件之间出现不需要的空间

tl;dr当我没有明确设置任何按钮时,为什么两个按钮之间会出现空格?我正在尝试制作如下所示的布局:但是,两个按钮之间出现了大约16px的空间,我不知道它是从哪里来的。我起初以为Column可能会增加空间,但我使用的是MainAxisAlignment.center,它不应该增加任何空间。我现在认为可能有一些Material主题正在自动将填充应用于RaisedButton,但是我已经查看了button_theme.dart和raised_button.dart似乎只设置了内部填充(文本和按钮边缘之间)。我确信我忽略了一些东西,如果能帮助我找出这个空间存在的原因,我将不胜感激。auth.d

user-interface - Flutter 中的水平按钮组

我正在尝试使用flutter构建一个水平按钮组,但我没有达到预期的效果,我是使用dart构建UI的新手,我如何调整代码以获得预期的结果?下面你会看到我目前的进度和想要的结果!当前行的按钮//HorizontalbuttonsrowWrap(direction:Axis.horizontal,children:[ButtonTheme(minWidth:40.0,child:RaisedButton(color:Colors.white,onPressed:(){},child:Text("A"),),),ButtonTheme(minWidth:40.0,child:RaisedBut

user-interface - Flutter 中的水平按钮组

我正在尝试使用flutter构建一个水平按钮组,但我没有达到预期的效果,我是使用dart构建UI的新手,我如何调整代码以获得预期的结果?下面你会看到我目前的进度和想要的结果!当前行的按钮//HorizontalbuttonsrowWrap(direction:Axis.horizontal,children:[ButtonTheme(minWidth:40.0,child:RaisedButton(color:Colors.white,onPressed:(){},child:Text("A"),),),ButtonTheme(minWidth:40.0,child:RaisedBut

flutter - 如何设置或删除按钮(RaisedButton)的圆角半径?

Flutter按钮似乎都没有提供更改按钮矩形角半径的方法。有一个形状属性,但我不知道如何使用它。 最佳答案 您可以从shape属性更改半径,并给它一个RoundedRectangleBorder,在这里您可以调整边框半径。在下面的示例中,您只会在topRight、topLeft和bottomRight中获得圆角:RaisedButton(onPressed:(){},shape:RoundedRectangleBorder(borderRadius:BorderRadius.only(topRight:Radius.circular

flutter - 如何设置或删除按钮(RaisedButton)的圆角半径?

Flutter按钮似乎都没有提供更改按钮矩形角半径的方法。有一个形状属性,但我不知道如何使用它。 最佳答案 您可以从shape属性更改半径,并给它一个RoundedRectangleBorder,在这里您可以调整边框半径。在下面的示例中,您只会在topRight、topLeft和bottomRight中获得圆角:RaisedButton(onPressed:(){},shape:RoundedRectangleBorder(borderRadius:BorderRadius.only(topRight:Radius.circular

Flutter : Exception on using Navigator. of(context) 用于 RaisedButton 的 onPressed 事件

我遇到了这个异常Exceptionhasoccurred.NoSuchMethodError(NoSuchMethodError:Themethod'ancestorStateOfType'wascalledonnull.Receiver:nullTriedcalling:ancestorStateOfType(Instanceof'TypeMatcher'))关于使用我为onPressed函数传递的自定义方法(navigateToLogin),对于RaisedButton,但是,当我直接在onPressed=(){...Navigationcode..}上编写相同的导航时,它工作正常

flutter - 在 Flutter 中将 RaisedButton 居中

我正在研究如何使这个按钮居中。@overrideWidgetbuild(BuildContextcontext){returnnewMaterialApp(debugShowCheckedModeBanner:false,color:Colors.pinkAccent,home:newScaffold(appBar:newAppBar(backgroundColor:Colors.white,),body:newColumn(children:[newPadding(padding:constEdgeInsets.symmetric(vertical:10.0),),newRaised

flutter - 在 Flutter 中将 RaisedButton 居中

我正在研究如何使这个按钮居中。@overrideWidgetbuild(BuildContextcontext){returnnewMaterialApp(debugShowCheckedModeBanner:false,color:Colors.pinkAccent,home:newScaffold(appBar:newAppBar(backgroundColor:Colors.white,),body:newColumn(children:[newPadding(padding:constEdgeInsets.symmetric(vertical:10.0),),newRaised

flutter - 在 Flutter 中使用半透明灰色填充渲染的 RaisedButton

我在一个列内有一个RaisedButton,它在一个堆栈内Stack(children:[PageView(children:[...],),Column(crossAxisAlignment:CrossAxisAlignment.center,mainAxisAlignment:MainAxisAlignment.end,children:[RaisedButton(color:Colors.teal,child:Text("Button"),),...),...但是,按钮不是用青色填充渲染的,而是灰色和半透明的。HereitisontopofanorangeContainer.我有

flutter - 在 Flutter 中使用半透明灰色填充渲染的 RaisedButton

我在一个列内有一个RaisedButton,它在一个堆栈内Stack(children:[PageView(children:[...],),Column(crossAxisAlignment:CrossAxisAlignment.center,mainAxisAlignment:MainAxisAlignment.end,children:[RaisedButton(color:Colors.teal,child:Text("Button"),),...),...但是,按钮不是用青色填充渲染的,而是灰色和半透明的。HereitisontopofanorangeContainer.我有