|
@@ -32,7 +32,8 @@ class LinkNodeWidget extends StatefulWidget {
|
|
State<LinkNodeWidget> createState() => _YouTubeLinkNodeWidgetState();
|
|
State<LinkNodeWidget> createState() => _YouTubeLinkNodeWidgetState();
|
|
}
|
|
}
|
|
|
|
|
|
-class _YouTubeLinkNodeWidgetState extends State<LinkNodeWidget> with Selectable {
|
|
|
|
|
|
+class _YouTubeLinkNodeWidgetState extends State<LinkNodeWidget>
|
|
|
|
+ with Selectable {
|
|
Node get node => widget.node;
|
|
Node get node => widget.node;
|
|
EditorState get editorState => widget.editorState;
|
|
EditorState get editorState => widget.editorState;
|
|
String get src => widget.node.attributes['youtube_link'] as String;
|
|
String get src => widget.node.attributes['youtube_link'] as String;
|
|
@@ -66,12 +67,6 @@ class _YouTubeLinkNodeWidgetState extends State<LinkNodeWidget> with Selectable
|
|
throw UnimplementedError();
|
|
throw UnimplementedError();
|
|
}
|
|
}
|
|
|
|
|
|
- @override
|
|
|
|
- Rect getCursorRectInPosition(Position position) {
|
|
|
|
- // TODO: implement getCursorRectInPosition
|
|
|
|
- throw UnimplementedError();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@override
|
|
@override
|
|
Position getPositionInOffset(Offset start) {
|
|
Position getPositionInOffset(Offset start) {
|
|
// TODO: implement getPositionInOffset
|
|
// TODO: implement getPositionInOffset
|
|
@@ -85,16 +80,16 @@ class _YouTubeLinkNodeWidgetState extends State<LinkNodeWidget> with Selectable
|
|
|
|
|
|
late final PodPlayerController controller;
|
|
late final PodPlayerController controller;
|
|
|
|
|
|
-@override
|
|
|
|
|
|
+ @override
|
|
void initState() {
|
|
void initState() {
|
|
controller = PodPlayerController(
|
|
controller = PodPlayerController(
|
|
playVideoFrom: PlayVideoFrom.network(
|
|
playVideoFrom: PlayVideoFrom.network(
|
|
- src,
|
|
|
|
|
|
+ src,
|
|
),
|
|
),
|
|
)..initialise();
|
|
)..initialise();
|
|
- super.initState();
|
|
|
|
|
|
+ super.initState();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
Widget _build(BuildContext context) {
|
|
Widget _build(BuildContext context) {
|
|
return Column(
|
|
return Column(
|
|
children: [
|
|
children: [
|