Skip to content

Commit

Permalink
feat: update text
Browse files Browse the repository at this point in the history
  • Loading branch information
drawcall committed Feb 8, 2023
1 parent 84cef00 commit 54a1628
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions lib/src/node/text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,22 @@ class ZKText extends ZKNode {
this.layout();
}

void setColor(Color color) {
_style = _style!.merge(TextStyle(color: color));
}

void setFontFamily(String fontFamily) {
_style = _style!.merge(TextStyle(fontFamily: fontFamily));
}

void setFontSize(double fontSize) {
_style = _style!.merge(TextStyle(fontSize: fontSize));
}

void refresh() {
this.setText(this.text);
}

////////////////////////////////////////////////////////////
///
/// Update, render and other related functions
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: Zerker is a flexible and lightweight flutter canvas graphic animati
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 2.2.5
version: 2.2.6
homepage: https://github.com/flutterkit/zerker

environment:
Expand Down

0 comments on commit 54a1628

Please sign in to comment.