-
Notifications
You must be signed in to change notification settings - Fork 290
Open
Labels
type_bugSomething isn't workingSomething isn't working
Description
Package Version
super_editor 0.3.0-dev.40
User Info
Solid Red AB
To Reproduce
Steps to reproduce the behavior:
- Run the example below on iOS or Android
- Click link
- Nothing happens
Minimal Reproduction Code
Minimal, Runnable Code Sample
import 'package:flutter/material.dart';
import 'package:super_editor/super_editor.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: _HomePage(),
);
}
}
class _HomePage extends StatefulWidget {
const _HomePage();
@override
State<_HomePage> createState() => __HomePageState();
}
class __HomePageState extends State<_HomePage> {
late final MutableDocument _document;
late final MutableDocumentComposer _composer;
late final Editor _editor;
@override
void initState() {
super.initState();
_document = MutableDocument(
nodes: [
ParagraphNode(
id: Editor.createNodeId(),
text: AttributedText(
'Example text',
AttributedSpans(
attributions: [
SpanMarker(
attribution: LinkAttribution('https://example.com'),
offset: 0,
markerType: SpanMarkerType.start,
),
SpanMarker(
attribution: LinkAttribution('https://example.com'),
offset: 6,
markerType: SpanMarkerType.end,
),
],
),
),
),
],
);
_composer = MutableDocumentComposer();
_editor = createDefaultDocumentEditor(document: _document, composer: _composer);
}
@override
Widget build(context) {
return Scaffold(
appBar: AppBar(),
body: SuperEditor(
editor: _editor,
componentBuilders: [
...defaultComponentBuilders,
TaskComponentBuilder(_editor),
],
),
);
}
}Actual behavior
Nothing happens when a link is pressed
Expected behavior
The link should be opened.
Platform
iOS, Android
Flutter version
3.38.1
Additional context
Another solution could be to do like for example Google Keep. When a user clicks the link, ask if they want to edit or open the link.
Metadata
Metadata
Assignees
Labels
type_bugSomething isn't workingSomething isn't working