Skip to content

Commit

Permalink
feat: Added support for textScaler in Mirai Text Parser
Browse files Browse the repository at this point in the history
  • Loading branch information
i-asimkhan committed Jan 19, 2024
1 parent b352381 commit 60ba5c3
Show file tree
Hide file tree
Showing 8 changed files with 292 additions and 73 deletions.
2 changes: 1 addition & 1 deletion docs/docs/basics/parsers.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MiraiTextParser extends MiraiParser<MiraiText> {
textDirection: model.textDirection,
softWrap: model.softWrap,
overflow: model.overflow,
textScaleFactor: model.textScaleFactor,
textScaler: MiraiTextScalerParser.parse(model.textScaler),
maxLines: model.maxLines,
semanticsLabel: model.semanticsLabel,
textWidthBasis: model.textWidthBasis,
Expand Down
3 changes: 2 additions & 1 deletion packages/mirai/lib/src/parsers/mirai_text/mirai_text.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:mirai/src/parsers/mirai_text_scaler/mirai_text_scaler.dart';
import 'package:mirai/src/parsers/mirai_text_style/mirai_text_style.dart';

export 'package:mirai/src/parsers/mirai_text/mirai_text_parser.dart';
Expand All @@ -17,7 +18,7 @@ class MiraiText with _$MiraiText {
TextDirection? textDirection,
bool? softWrap,
TextOverflow? overflow,
double? textScaleFactor,
MiraiTextScaler? textScaler,
int? maxLines,
String? semanticsLabel,
TextWidthBasis? textWidthBasis,
Expand Down
Loading

0 comments on commit 60ba5c3

Please sign in to comment.