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