[SYNC] Added enabled condition for link underline
This commit is contained in:
@@ -90,7 +90,7 @@ class AstromicButtons {
|
||||
TextDirection? textDirection,
|
||||
|
||||
//
|
||||
bool? isUnderlined,
|
||||
bool Function(bool isEnabled)? isUnderlined,
|
||||
EdgeInsetsGeometry? contentPadding,
|
||||
TextStyle Function(bool isEnabled)? style,
|
||||
//
|
||||
@@ -106,7 +106,7 @@ class AstromicButtons {
|
||||
isEnabled: isEnabled ?? true,
|
||||
textDirection: textDirection ?? TextDirection.ltr,
|
||||
//
|
||||
isUnderlined: isUnderlined ?? true,
|
||||
isUnderlined: isUnderlined ?? (e) => e,
|
||||
contentPadding: contentPadding,
|
||||
style: style,
|
||||
//
|
||||
|
||||
@@ -29,7 +29,7 @@ class AstromicLinkButton extends StatelessWidget {
|
||||
final bool isEnabled;
|
||||
final TextDirection textDirection;
|
||||
//s1 -- Style
|
||||
final bool isUnderlined;
|
||||
final bool Function(bool isEnabled) isUnderlined;
|
||||
final EdgeInsetsGeometry? contentPadding;
|
||||
final TextStyle Function(bool isEnabled)? style;
|
||||
//
|
||||
@@ -106,10 +106,10 @@ class AstromicLinkButton extends StatelessWidget {
|
||||
text!,
|
||||
style: style != null
|
||||
? style!(isEnabled).copyWith(
|
||||
decoration: isUnderlined ? TextDecoration.underline : TextDecoration.none,
|
||||
decoration: isUnderlined(isEnabled) ? TextDecoration.underline : TextDecoration.none,
|
||||
)
|
||||
: TextStyle(
|
||||
decoration: isUnderlined ? TextDecoration.underline : TextDecoration.none,
|
||||
decoration: isUnderlined(isEnabled) ? TextDecoration.underline : TextDecoration.none,
|
||||
),
|
||||
),
|
||||
if (suffix != null) suffix!,
|
||||
|
||||
Reference in New Issue
Block a user