text style TextStyle article "Click to view details"TextField input text textAlign alignment analysis chapter "click to view details"TextField input text decoration configure border style and prompt text analysis "click to view
Recently, when writing a page with Flutter , I need to use CheckBox. The style needs to be as shown in the figure. The first thing that
"),
),
1234567891011121314151617
3 Clickable rounded rectangle border
Use InkWell to achieve, more about InkWell, please check flutter InkWell set water ripple click effect details
Container(
margin: EdgeInsets.only(left: 40, top: 40
to view details"TextField input text style TextStyle article "It's this article"TextField input text textAlign alignment analysis chapter "click to view details"TextField input text decoration configure border style and prompt text
details"TextField input text textAlign alignment analysis chapter "click to view details"TextField input text decoration configure border style and prompt text analysis "click to view details"TextField TextEditingController Analysis
; style > /* inherited style */ .basic { width : 400px ; height : 100px ; border : 1px solid black ; } /* mood style */ .happy { border : 4px solid red ; ; background-color : rgba ( 255 , 255 , 0 , 0.644 ) ; background : linear
ElevatedButton( child : Text ( "Love you" ), style: ButtonStyle( side : MaterialStateProperty. all ( BorderSide ( width : 1 , color : Color ( 0 xffffffff))), //border ), onPressed
size
font-size:15pt;
1
5. Change the background color
background-color:#c3e9e5;
1
6. Set the upper border to 2 pixels , the style to solid line, and the color to black
border-top:2px solid #000000;
1
7. Set all borders to
: EdgeInsets.all ( 0 ) ,
//complex decoration style
decoration : BoxDecoration (
//background color
color : Colors . red ,
// border rounded corners
borderRadius
style: ButtonStyle { background : Rectangle { color : control.hovered? "#a0a0a0" : "#c0c0c0" ; border.width : control.pressed? 2 : 1 ; border
border to 2 pixels , the style to solid line, and the color to black
border-top:2px solid #000000;
1
7. Set all borders to 2 pixels, style to solid line, and color to black
border:2px solid #000000;
1
8. Set the top left corner
code
StadiumBorder semi-rounded rectangle (StadiumBorder translation: like a stadium-shaped border)
As shown in the picture above, the property color: Color(0xffFF7F24), the effect is matched with style
Flutter 1.22 version adds 3 new buttons, TextButton, OutlinedButton, ElevatedButton , although the previous Button has not been
every day.
important news
NetEase Cloud [Fun Big Front-End] Supporting Course EDU supporting tutorial A series of articles on the accumulation of bits and pieces developed by Flutter
There are two implementation ideas for
hard and tried your best, you will have a clear conscience.
At present, the Flutter series of tutorials are published for free on the watermelon video, which is updated daily. Welcome to pay attention to receive reminders
【x1
file and add the following content:
/*Button is still without operation style*/QPushButton{ background-color: rgb ( 255 , 255 , 255 ); color: rgb ( 6 , 168 , 255 ); border: 2 px solid rgb ( 6 , 168 , 255 ) ; font-size