I'm currently developing an Android app in Flutter. How can I add a rounded button?
相关问题
- What means in Dart static type and why it differs
- Flutter : Prepare list data from http request
- How to schedule an alarm on specific time in Flutt
- MappedListIterable is not a SubType
- 'firebase_messaging/FirebaseMessagingPlugin.h&
相关文章
- Observatory server failed to start - Fails to crea
- Flutter error retrieving device properties for ro.
- Adding Shadows at the bottom of a container in flu
- Flutter. Check if a file exists before loading it
- Flutter - http.get fails on macos build target: Co
- Receive share file intents with Flutter
- Do stateless widgets dispose on their own?
- How to clean your build with Flutter RP2 in Androi
You can always use material button if you are using Material App as your main Widget.
You can simply use
RaisedButton
or you can useInkWell
to get custom button and also properties likeonDoubleTap
,onLongPress
andetc
.:If you want to use
splashColor
,highlightColor
properties inInkWell
widget, useMaterial
widget as the parent ofInkWell
widget instead of decorating the container(deleting decoration property). Read why? here.If anybody is looking for complete circular button than I achieved it this way.
If you want to set any type of styling & set decoration put that widget into the
Container()
widget, that provide many property to decoration.You can use shape for FlatButton and RaisedButton.
for rounded button:
for square button:
You can use the RaisedButton Widget. Raised Button Widget has shape property which you can utilise as shown in below snippet.