2025-03-12 17:15:31 +08:00
|
|
|
import 'package:fl_clash/enum/enum.dart';
|
2024-04-30 23:38:49 +08:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'color.dart';
|
|
|
|
|
|
|
|
|
|
extension TextStyleExtension on TextStyle {
|
2025-03-12 17:15:31 +08:00
|
|
|
TextStyle get toLight => copyWith(color: color?.opacity80);
|
2024-04-30 23:38:49 +08:00
|
|
|
|
2025-03-12 17:15:31 +08:00
|
|
|
TextStyle get toLighter => copyWith(color: color?.opacity60);
|
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
|
|
|
|
2025-03-12 17:15:31 +08:00
|
|
|
TextStyle get toJetBrainsMono => copyWith(
|
|
|
|
|
fontFamily: FontFamily.jetBrainsMono.value,
|
|
|
|
|
);
|
|
|
|
|
|
2024-12-09 01:40:39 +08:00
|
|
|
TextStyle adjustSize(int size) => copyWith(
|
|
|
|
|
fontSize: fontSize! + size,
|
|
|
|
|
);
|
2024-06-23 00:26:24 +08:00
|
|
|
}
|