Giter Site home page Giter Site logo

jiangjuhong / fluttertextspanfield Goto Github PK

View Code? Open in Web Editor NEW
27.0 27.0 14.0 257 KB

Flutter自定义块样式输入框,实现在输入框中自定义加入任意 TextSpan,并可获得加入的 TextSpan对象。通过此组件可以快速实现@功能值绑定,隐藏域值绑定

License: Apache License 2.0

Kotlin 0.57% Ruby 4.62% Swift 0.54% Objective-C 0.05% Dart 94.22%

fluttertextspanfield's Introduction

Hi~

感谢您访问我的主页,不妨给个关注。
欢迎光临我的点卡小铺:点卡系统,如果需要更多内容,欢迎与我联系

智文AI

基于ChatGPT的一款效率助手,支持公众号、网页版以及浏览器插件,https://www.ai-text.top

技术栈

JAVA React VueJS Dart Flutter

fluttertextspanfield's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fluttertextspanfield's Issues

麻烦完善一下使用文档

感谢作者,做了一个很有用的插件
特别建议,把使用文档完善完善,因为这样能提高很大的沟通效率

dart:ui/text.dart': Failed assertion: line 1544: '<optimized out>': is not true

在开发的过程中, 有遇到两个会让程序挂掉的bug,

  1. ios设备上,在@内容前输入拼音, 直接崩溃,循环输出报错
======== Exception caught by widgets library =======================================================
The following assertion was thrown building Scrollable(axisDirection: down, physics: null, restorationId: null, dirty, dependencies: [_InheritedTheme, MediaQuery, _EffectiveTickerMode, ScrollConfiguration, _LocalizationsScope-[GlobalKey#59f39]], state: ScrollableState#20ccf(position: ScrollPositionWithSingleContext#825d9(offset: 0.0, range: 0.0..0.0, viewport: 19.0, ScrollableState, BouncingScrollPhysics -> RangeMaintainingScrollPhysics, IdleScrollActivity#9da3b, ScrollDirection.idle), effective physics: BouncingScrollPhysics -> RangeMaintainingScrollPhysics)):
'dart:ui/text.dart': Failed assertion: line 1544: '<optimized out>': is not true.

The relevant error-causing widget was: 
  CustomEditableText-[LabeledGlobalKey<EditableTextState>#3cd19] file:///Users/danhang/work/application/extend-package/FlutterTextSpanField/lib/text_span_field.dart:1010:43
When the exception was thrown, this was the stack: 
#2      TextRange.textInside (dart:ui/text.dart:1544:12)
#3      TextSpanBuilder._buildTextSpanWidget (package:text_span_field/text_span_builder.dart:249:86)
#4      TextSpanBuilder.buildSpan (package:text_span_field/text_span_builder.dart:279:33)
#5      _EditableTextSpan.buildTextSpan (package:text_span_field/custom/custom_editable_text.dart:129:34)
#6      EditableTextState.build.<anonymous closure> (package:flutter/src/widgets/editable_text.dart:2445:27)
...
====================================================================================================

======== Exception caught by rendering library =====================================================
A RenderFlex overflowed by 99896 pixels on the bottom.
The relevant error-causing widget was: 
  Column file:///Users/danhang/work/application/extend-package/FlutterTextSpanField/example/lib/main.dart:79:20
====================================================================================================

======== Exception caught by scheduler library =====================================================
The method 'findRenderObject' was called on null.
Receiver: null
Tried calling: findRenderObject()
====================================================================================================

======== Exception caught by scheduler library =====================================================
The method 'findRenderObject' was called on null.
Receiver: null
Tried calling: findRenderObject()
====================================================================================================
  1. 如果有多个@内容, 删除第一个@内容, 后面@前的最后一个字符被删除的时候会将后面的@符号也同时删掉, 而且之前的高亮也无效了

微信表情

输入[微笑]会显示微笑图片会计划搞不

系统删除键如何整体删除

hi, 感谢大佬实现的这个组件.
但我在使用的过程中有点问题,就是那个删除整体那一块,除了使用删除按钮来定义回调,对textField自带的删除键删除是无效的是吗

cursorColor != null

➜ mac flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on Mac OS X 10.15.6 19G2005 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
[✓] VS Code (version 1.59.1)
[✓] Connected device (3 available)

• No issues found!

RangeError (index): Invalid value: Only valid value is 0: 1

@多个用户,再清理之后,会出现抛异常

Performing hot restart...
Syncing files to device wenbo...
Restarted application in 711ms.
flutter:  -- @张三
flutter: @张三 -- @张三@张三
flutter: @张三@张三 -- 

======== Exception caught by foundation library ====================================================
The following RangeError was thrown while dispatching notifications for TextEditingController:
RangeError (index): Invalid value: Only valid value is 0: 1

When the exception was thrown, this was the stack: 
#0      List.[] (dart:core-patch/growable_array.dart:177:60)
#1      List.removeAt (dart:core-patch/growable_array.dart:23:22)
#2      TextSpanBuilder._deleteLimit.<anonymous closure> (package:text_span_field/text_span_builder.dart:135:56)
#3      List.forEach (dart:core-patch/growable_array.dart:313:8)
#4      TextSpanBuilder._deleteLimit (package:text_span_field/text_span_builder.dart:135:17)
...
The TextEditingController sending notification was: TextEditingController#6a99f(TextEditingValue(text: ┤├, selection: TextSelection(baseOffset: 0, extentOffset: 0, affinity: TextAffinity.downstream, isDirectional: false), composing: TextRange(start: -1, end: -1)))
====================================================================================================

======== Exception caught by widgets library =======================================================
Value not in range: 3
The relevant error-causing widget was: 
  CustomEditableText-[LabeledGlobalKey<EditableTextState>#04546] file:///Users/supermonkey/Project/flutter_lib/FlutterTextSpanField/lib/text_span_field.dart:1010:43
====================================================================================================

======== Exception caught by rendering library =====================================================
A RenderFlex overflowed by 99636 pixels on the bottom.
The relevant error-causing widget was: 
  Column file:///Users/supermonkey/Project/flutter_lib/FlutterTextSpanField/example/lib/main.dart:79:20
====================================================================================================

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.