Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinBentdal committed Sep 14, 2019
1 parent 2848e6f commit 6f629ff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
6 changes: 4 additions & 2 deletions lib/src/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,16 @@ class _TxtBuildEditableState extends State<TxtBuildEditable> {
_placeholderStyle = TextStyle(
fontWeight: widget.textModel?.textStyle?.fontWeight,
fontSize: widget.textModel?.textStyle?.fontSize,
color: widget.textModel?.textStyle?.color?.withOpacity(0.7) ?? Colors.grey,
color:
widget.textModel?.textStyle?.color?.withOpacity(0.7) ?? Colors.grey,
fontStyle: widget.textModel?.textStyle?.fontStyle ?? FontStyle.normal,
fontFamily: widget.textModel?.textStyle?.fontFamily,
fontFamilyFallback: widget.textModel?.textStyle?.fontFamilyFallback,
letterSpacing: widget.textModel?.textStyle?.letterSpacing,
wordSpacing: widget.textModel?.textStyle?.wordSpacing,
);
_placehodlerController = TextEditingController(text: widget.textModel?.placeholder);
_placehodlerController =
TextEditingController(text: widget.textModel?.placeholder);
}

return EditableText(
Expand Down
17 changes: 10 additions & 7 deletions lib/src/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class BackgroundModel with ChangeNotifier {
/// Does not work together with `rotate()`.
void blur(double blur) {
if (blur < 0) throw ('Blur cannot be negative: $blur');
_blur = blur;
_blur = blur;
notifyListeners();
}

Expand Down Expand Up @@ -111,7 +111,7 @@ class AlignmentModel with ChangeNotifier {
void center() => _updateAlignment(Alignment.center);
void centerRight() => _updateAlignment(Alignment.centerRight);

void coordinate(double x, double y) => _updateAlignment(Alignment(x,y));
void coordinate(double x, double y) => _updateAlignment(Alignment(x, y));

void _updateAlignment(AlignmentGeometry alignment) {
_alignment = alignment;
Expand All @@ -130,9 +130,11 @@ class OverflowModel with ChangeNotifier {

void hidden() => _updateOverflow(OverflowType.hidden);

void scrollable([Axis direction = Axis.vertical]) => _updateOverflow(OverflowType.scroll, direction);
void scrollable([Axis direction = Axis.vertical]) =>
_updateOverflow(OverflowType.scroll, direction);

void visible([Axis direction = Axis.vertical]) => _updateOverflow(OverflowType.visible, direction);
void visible([Axis direction = Axis.vertical]) =>
_updateOverflow(OverflowType.visible, direction);

void _updateOverflow(OverflowType overflow, [Axis direction]) {
_overflow = overflow;
Expand Down Expand Up @@ -187,7 +189,8 @@ class StyleModel {
_replace(backgroundColor, intruder?.backgroundColor, override);
backgroundBlur =
_replace(backgroundBlur, intruder?.backgroundBlur, override);
backgroundImage = _replace(backgroundImage, intruder?.backgroundImage, override);
backgroundImage =
_replace(backgroundImage, intruder?.backgroundImage, override);
padding = _replace(padding, intruder?.padding, override);
margin = _replace(margin, intruder?.margin, override);
gradient = _replace(gradient, intruder?.gradient, override);
Expand Down Expand Up @@ -389,7 +392,7 @@ class TextModel {
TextInputType keyboardType;
String placeholder;
bool obscureText;

void Function(String) onChange;
void Function(bool focus) onFocusChange;
void Function(TextSelection, SelectionChangedCause)
Expand Down Expand Up @@ -455,4 +458,4 @@ class TextAlignModel with ChangeNotifier {
_textAlign = textAlign;
notifyListeners();
}
}
}
7 changes: 4 additions & 3 deletions lib/src/style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,10 @@ class TxtStyle extends StyleClass {
@override
void _addListeners() {
super._addListeners();
textAlign = TextAlignModel()..addListener(() {
_textModel?.textAlign = textAlign?.exportTextAlign;
});
textAlign = TextAlignModel()
..addListener(() {
_textModel?.textAlign = textAlign?.exportTextAlign;
});
}

final TextModel _textModel = TextModel();
Expand Down

0 comments on commit 6f629ff

Please sign in to comment.