rich_text_editor_controller
所属分类:编辑器/阅读器
开发工具:Dart
文件大小:0KB
下载次数:0
上传日期:2023-11-07 22:23:47
上 传 者:
sh-1993
说明: 富文本编辑器控制器
(rich text editor controller)
文件列表:
.metadata (309, 2023-11-07)
CHANGELOG.md (642, 2023-11-07)
CONTRIBUTION_GUIDE.md (1276, 2023-11-07)
LICENSE (1058, 2023-11-07)
ROADMAP.md (463, 2023-11-07)
analysis_options.yaml (402, 2023-11-07)
coverage/ (0, 2023-11-07)
coverage/lcov.info (5697, 2023-11-07)
example/ (0, 2023-11-07)
example/.metadata (1668, 2023-11-07)
example/analysis_options.yaml (1453, 2023-11-07)
example/android/ (0, 2023-11-07)
example/android/app/ (0, 2023-11-07)
example/android/app/build.gradle (2195, 2023-11-07)
example/android/app/src/ (0, 2023-11-07)
example/android/app/src/debug/ (0, 2023-11-07)
example/android/app/src/debug/AndroidManifest.xml (412, 2023-11-07)
example/android/app/src/main/ (0, 2023-11-07)
example/android/app/src/main/AndroidManifest.xml (1667, 2023-11-07)
example/android/app/src/main/kotlin/ (0, 2023-11-07)
example/android/app/src/main/kotlin/com/ (0, 2023-11-07)
example/android/app/src/main/kotlin/com/example/ (0, 2023-11-07)
example/android/app/src/main/kotlin/com/example/example/ (0, 2023-11-07)
example/android/app/src/main/kotlin/com/example/example/MainActivity.kt (124, 2023-11-07)
example/android/app/src/main/res/ (0, 2023-11-07)
example/android/app/src/main/res/drawable-v21/ (0, 2023-11-07)
example/android/app/src/main/res/drawable-v21/launch_background.xml (438, 2023-11-07)
example/android/app/src/main/res/drawable/ (0, 2023-11-07)
example/android/app/src/main/res/drawable/launch_background.xml (434, 2023-11-07)
example/android/app/src/main/res/mipmap-hdpi/ (0, 2023-11-07)
example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (544, 2023-11-07)
example/android/app/src/main/res/mipmap-mdpi/ (0, 2023-11-07)
... ...
A very lightweight package that allows rich text editing as well as providing a simple and intuitive
API for data serialization
A Flutter package that lets you edit text in flutter text fields very easily, by
simply just providing it a ```RichTextEditorController``` and ```RichTextField``` (
just ```TextField``` that supports changing alignment).
note that you can use the controller on a normal ```TextField``` but you will not be able to change
the alignment of the text.
## Features
- Data serialization (you can store and fetch your styled text in json format)
- change text alignment
- change text color
- change text size (TBD)
- change font style
- change font family (TBD)
- change font weight
- change font features (TBD currently supports changing 1)
- change text decoration
[video example](https://user-images.githubusercontent.com/89414401/230739943-845d77cd-60df-4d90-ba5a-1c9d14634695.mov)
## Getting started
add this to your ```pubspec.yaml``` file
```yaml
dependencies:
flutter:
sdk: flutter
rich_text_editor_flutter: 0.0.4
```
or
using pub
```bash
pub add rich_text_editor_flutter
```
## Usage
```dart
import 'package:flutter/material.dart';
import 'package:flutter/rich_text_editor_controller/rich_text_editor_controller.dart';
...
class _HomePageState extends State {
final RichTextEditorController controller = RichTextEditorController();
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
children: [
RichTextField(
controller: controller,
maxLines: 10, //use or apply style like in normal text fields
minLines: 1,
),
],
),
),
);
}
}
```
Or use like normal controller
```dart
...
//or use normal TextField but without alignment support
TextField(
controller: controller,
maxLines: 10,
minLines: 1,
),
...
```
Don't forget to dispose your controller
```dart
@override
void dispose() {
controller.dispose();
super.dispose();
}
```
For more elaborate example, [see here](https://github.com/folaoluwafemi/rich_text_editor_controller_example)
## Additional information
To create issues, prs or otherwise contribute in anyway see [contribution guide](https://github.com/folaoluwafemi/rich_text_editor_controller/blob/main/CONTRIBUTION_GUIDE.md).
See our roadmap [here](https://github.com/folaoluwafemi/rich_text_editor_controller/blob/main/ROADMAP.md)
近期下载者:
相关文件:
收藏者: