rich_textfield 1.0.0

rich_textfield #

flutter富文本输入框,支持表情、@某人、#话题#

The example screen shot

使用方法 #

import 'package:rich_textfield/rich_textfield.dart';
MyTextEditingController _editCtrl = new MyTextEditingController(
  topicStyle: new TextStyle(
    fontWeight: FontWeight.bold,
    color: Colors.yellow
  ),
  atStyle: new TextStyle(
    fontWeight: FontWeight.bold,
    color: Colors.green
  ),
  emojiImgSourceType: EmojiImgSourceType.asset
);

Widget ret = new MyTextField(
  controller: _editCtrl,
  focusNode: _focusNode,
  style: new TextStyle(
    fontSize: 20,
    color: const Color.fromARGB(255, 180, 180, 180)
  ),
);

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

example/README.md

hello_rich #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  rich_textfield: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:rich_textfield/rich_textfield.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
39
Health:
Code health derived from static analysis. [more]
8
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
34
Learn more about scoring.

We analyzed this package on Aug 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms:

Low code quality prevents platform classification.

Health issues and suggestions

Fix lib/edit/my_text_selection.dart. (-68.36 points)

Analysis of lib/edit/my_text_selection.dart failed with 4 errors:

line 202 col 46: 6 required argument(s) expected, but 4 found.

line 202 col 71: The argument type 'Offset' can't be assigned to the parameter type 'double'.

line 202 col 81: The argument type 'TextSelectionDelegate' can't be assigned to the parameter type 'Offset'.

line 262 col 84: The getter 'handleSize' isn't defined for the class 'TextSelectionControls'.

Fix lib/edit/my_text_editing_controller.dart. (-57.81 points)

Analysis of lib/edit/my_text_editing_controller.dart failed with 3 errors:

line 338 col 38: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.

line 339 col 32: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.

line 349 col 34: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.

Fix lib/edit/my_editable_text.dart. (-43.75 points)

Analysis of lib/edit/my_editable_text.dart failed with 2 errors:

line 398 col 7: Missing concrete implementations of TextInputClient.updateFloatingCursor, getter TextSelectionDelegate.copyEnabled, getter TextSelectionDelegate.cutEnabled, getter TextSelectionDelegate.pasteEnabled and 1 more.

line 862 col 28: The method 'reparentIfNeeded' isn't defined for the class 'FocusScopeNode'.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/edit/my_editable.dart (Run flutter format to format lib/edit/my_editable.dart.)
  • lib/edit/my_text_field.dart (Run flutter format to format lib/edit/my_text_field.dart.)
  • lib/info.dart (Run flutter format to format lib/info.dart.)
  • lib/rich_textfield.dart (Run flutter format to format lib/rich_textfield.dart.)

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test