From b1b9666b37a2ca7c9d2bfc961cbaa9f5de4647bb Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Mon, 10 Jan 2022 10:07:17 +0800 Subject: [PATCH] bug fix --- lib/extension/widget_extension.dart | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/extension/widget_extension.dart b/lib/extension/widget_extension.dart index 6f9c416..1b055ca 100644 --- a/lib/extension/widget_extension.dart +++ b/lib/extension/widget_extension.dart @@ -5,7 +5,8 @@ import 'package:flutter/material.dart'; import 'Text_extension.dart'; extension WidgetExt on Widget { - Widget paddingExt(double horizontal, [double vertical = 0]) => Padding( + Widget paddingExt(double horizontal, [double vertical = 0]) => + Padding( padding: EdgeInsets.symmetric( horizontal: horizontal, vertical: vertical, @@ -14,12 +15,12 @@ extension WidgetExt on Widget { ); Widget match(String match) { - var spans = (this as AutoSizeText).textSpan; - if (spans != null) { - spans = spans.match(match); - return Text.rich(spans); - } if (this.runtimeType == Text) { + // var spans = (this as Text).textSpan; + // if (spans != null) { + // spans = spans.match(match); + // return Text.rich(spans); + // } return MatchText( matchText: match, text: (this as Text).data ?? '',