createButtonArray method

List<Widget> createButtonArray(
  1. BuildContext context
)

Implementation

List<Widget> createButtonArray(BuildContext context) {
  const buttonTextStyle = TextStyle(
    fontWeight: FontWeight.bold,
    color: Colors.black,
    fontSize: 20,
  );
  const buttonSpacing = SizedBox(width: 30);
  var buttonStyle = ElevatedButton.styleFrom(
    backgroundColor: colorSelected.color,
    padding: const EdgeInsets.symmetric(
      horizontal: buttonPaddingHorizontal,
      vertical: buttonPaddingVertical,
    ),
  );
  return <Widget>[
    ElevatedButton(
      style: buttonStyle,
      child: Text(
        AppLocalizations.of(context)!.homepage,
        style: buttonTextStyle,
      ),
      onPressed: () {
        Navigator.pushNamed(context, '/aboutMe');
      },
    ),
    buttonSpacing,
    ElevatedButton(
      style: buttonStyle,
      child: Text(
        AppLocalizations.of(context)!.aboutme,
        style: buttonTextStyle,
      ),
      onPressed: () {
        Navigator.pushNamed(context, '/quotes');
      },
    ),
  ];
}