2024-04-30 23:38:49 +08:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'color.dart';
|
|
|
|
|
|
|
|
|
|
extension TextStyleExtension on TextStyle {
|
2024-06-23 00:26:24 +08:00
|
|
|
TextStyle get toLight => copyWith(color: color?.toLight());
|
2024-04-30 23:38:49 +08:00
|
|
|
|
2024-06-23 00:26:24 +08:00
|
|
|
TextStyle get toLighter => copyWith(color: color?.toLighter());
|
2024-06-07 17:22:55 +08:00
|
|
|
|
2024-06-23 00:26:24 +08:00
|
|
|
TextStyle get toSoftBold => copyWith(fontWeight: FontWeight.w500);
|
2024-06-07 17:22:55 +08:00
|
|
|
|
2024-06-23 00:26:24 +08:00
|
|
|
TextStyle get toBold => copyWith(fontWeight: FontWeight.bold);
|
2024-04-30 23:38:49 +08:00
|
|
|
|
2024-06-29 21:42:00 +08:00
|
|
|
TextStyle get toMinus => copyWith(fontSize: fontSize! - 2);
|
2024-06-23 00:26:24 +08:00
|
|
|
}
|