childTopTabText method

Widget childTopTabText({
  1. AFWidgetID? wid,
  2. required String text,
  3. required bool isSel,
  4. required AFPressedDelegate onPressed,
})

Implementation

Widget childTopTabText({
  AFWidgetID? wid,
  required String text,
  required bool isSel,
  required AFPressedDelegate onPressed
}) {
  final style = isSel ? styleOnPrimary.bodyLarge : styleOnPrimary.bodyMedium;
  final colorButton = isSel ? colorPrimaryDarker : colorPrimary;
  final buttonStyle = TextButton.styleFrom(
    backgroundColor: colorButton,
    textStyle: style,
  );
  return TextButton(
    key: keyForWID(wid),
    style: buttonStyle,
    onPressed: onPressed,
    child: childText(text: text, style: style)
  );
}