Skip to content

Instantly share code, notes, and snippets.

@mortezanazari-hub
Created January 23, 2025 13:11
Show Gist options
  • Select an option

  • Save mortezanazari-hub/f9769d6976fff10888c4026281bf8065 to your computer and use it in GitHub Desktop.

Select an option

Save mortezanazari-hub/f9769d6976fff10888c4026281bf8065 to your computer and use it in GitHub Desktop.
/// {@template secondary_text_button}
/// یک ویجت دکمه متنی ثانویه سفارشی که با پلتفرم سازگار است.
/// A custom secondary text button widget that adapts to the platform.
/// {@endtemplate}
class SecondaryTextButton extends AppTextButton {
/// {@macro secondary_text_button}
const SecondaryTextButton({
super.key,
required super.label,
super.onTap,
super.leading,
super.trailing,
super.appButtonSize,
});
/// رنگ پس‌زمینه.
/// The background color.
@override
Color backgroundColor(BuildContext context) {
return context.buttonTheme.secondaryDefault;
}
/// رنگ غیرفعال.
/// The disabled color.
@override
Color disabledColor(BuildContext context) {
return context.buttonTheme.secondaryDisabled;
}
/// رنگ فوکوس.
/// The focus color.
@override
Color focusColor(BuildContext context) {
return context.buttonTheme.secondaryFocused;
}
/// رنگ هاور.
/// The hover color.
@override
Color hoverColor(BuildContext context) {
return context.buttonTheme.secondaryHover;
}
/// رنگ متن.
/// The text color.
@override
Color textColor(BuildContext context) {
return context.buttonTheme.primaryTextOnBrand;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment