Properties
- alignment
- buttonAlignedDropdown
- buttonHeight
- buttonMinWidth
- buttonPadding
- buttonTextTheme
- children
- layoutBehavior
- mainAxisSize
- overflowButtonSpacing
- overflowDirection
Example 1:
import 'package:flutter/material.dart';
void main() => DemoApp();
class DemoApp extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return DemoAppState();
}
}
class DemoAppState extends State<DemoApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("Demo App"),
),
body: ButtonBar(
alignment: MainAxisAlignment.start,
buttonPadding: EdgeInsets.all(6),
overflowDirection: VerticalDirection.down,
overflowButtonSpacing: 25,
children: [
ElevatedButton(
onPressed: () {},
child: Text('Ok'),
),
ElevatedButton(
onPressed: () {},
child: Text('Cancel'),
),
ElevatedButton(
onPressed: () {},
child: Text('Done This'),
),
ElevatedButton(
onPressed: () {},
child: Text('Another button'),
),
],
),
),
);
}
}
Video Link: