New Material buttons in Flutter
Blog post from LogRocket
Flutter v1.22 introduced a new set of Material buttons that offer a more flexible and modern approach to button customization in mobile app development, replacing the older FlatButton, RaisedButton, and OutlineButton with TextButton, ElevatedButton, and OutlinedButton, respectively. These new buttons align with the updated Material Design specifications and provide developers with the ability to define themes at both the app and widget levels, allowing for distinct customization without affecting other button types. The enhanced button features include smoother ripple effects, the ability to set colors for different button states, and the use of the ButtonStyle class for extensive styling options, making it easier to implement custom theming and manage defaults app-wide. The update addresses the limitations of the older buttons, providing a more efficient and streamlined development process, and encourages developers to adopt these new features as the older buttons may eventually be deprecated.