buttons method
Implementation
Widget buttons(BuildContext context) {
return Padding(
padding:
const EdgeInsets.only(right: 20, left: 20, top: 16.0, bottom: 20.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: List.generate(actions!.length, (index) {
final TextDirection direction = Directionality.of(context);
double padding = index != 0 ? 8 : 0;
double rightPadding = 0;
double leftPadding = 0;
direction == TextDirection.rtl
? rightPadding = padding
: leftPadding = padding;
return Expanded(
child: Padding(
padding: EdgeInsets.only(left: leftPadding, right: rightPadding),
child: actions![index],
),
);
}),
),
);
}