parent
71fb40a28e
commit
074b48181e
@ -1,25 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'text_style_extension.dart';
|
||||
|
||||
extension TextExtension on Text {
|
||||
Text get bold {
|
||||
return Text(
|
||||
this.data,
|
||||
style: this.style.copyWith(fontWeight: FontWeight.bold),
|
||||
style: this.style?.bold ?? TextStyle().bold,
|
||||
);
|
||||
}
|
||||
|
||||
Text size(double size) {
|
||||
return Text(
|
||||
this.data,
|
||||
style: this.style.copyWith(fontSize: size.w),
|
||||
style: this.style?.size(size) ?? TextStyle().size(size),
|
||||
);
|
||||
}
|
||||
|
||||
Text color(Color color) {
|
||||
return Text(
|
||||
this.data,
|
||||
style: this.style.copyWith(color: color),
|
||||
style: this.style?.colorX(color) ?? TextStyle().colorX(color),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue