Files
MWClash/lib/common/text.dart

15 lines
436 B
Dart
Raw Normal View History

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