Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Strategy for rendering and editing data other than String

Aperta
#74 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
dart, flutter
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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?

Lingua principale
Dart
Stelle
764
Fork
104
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di reqable/re-editor

Tutte le issue di reqable/re-editor

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.