Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Strategy for rendering and editing data other than String

Đang mở
#74 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
dart, flutter
Lĩnh vực
frontend

Hướng nghiên cứu

Start by reading the mentioned CodeLines class and _CodeLineEditingControllerImpl to understand how lines, spans, and editing state are currently represented. Define the required mapping between rendered lines, edits, and backing MyEntry objects before deciding whether the controller or CodeLines API should change; the issue does not specify an implementation or completion criteria.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi, thanks for creating an awesome package. I'm trying to find best way to maintain editing state of my custom class instead of String. It could potentially be represented by String, but when viewing and modifying it I would like the CodeLines object be aware of the backing data.

For instance in pseudo code my class could be:

class MyEntry {
  final DateTime date;
  final String message;
  final String tag;
  final Map<String,String> metadata;

  String toString() => '$date $tag $message $jsonEncode(metadata)';
}

And then I would like to render the toString() representation. When user would modify any part of the string, I would like to receive a callback e.g. with a editing position or any other trace that could let me modify the backing object. When rendering a TextSpan I would love to get access to the corresponding MyEntry object so that I can style the span to my needs. I can assume that each MyEntry would be rendered in a separate line.

I would like to avoid parsing the String in the spanBuilder as the data will be parsed prior to rendering.

I don't think this is a valid feature request for the package itself, but I'm happy to either fork or re-implement any classes that could allow me to achieve this experience.

What would you recommend in such case? Should I implement my own CodeLineEditingController based on _CodeLineEditingControllerImpl and extend CodeLines with a reference to MyEntry?

Ngôn ngữ chính
Dart
Star
764
Fork
104
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của reqable/re-editor

Tất cả issue của reqable/re-editor

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.