memspace / zefyr

Soft and gentle rich text editing for Flutter applications.

Home Page:https://zefyr-editor.gitbook.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Platform TargetPlatform.windows not implemented.

a1111198 opened this issue · comments

Steps to Reproduce

  1. ...using zefyr :^0.12.0
  2. ... ` import 'package:flutter/material.dart';
    import 'package:quill_delta/quill_delta.dart';
    import 'package:zefyr/zefyr.dart';

class EditorPage extends StatefulWidget {
@OverRide
EditorPageState createState() => EditorPageState();
}

class EditorPageState extends State {
/// Allows to control the editor and the document.
ZefyrController _controller;

/// Zefyr editor like any other input field requires a focus node.
FocusNode _focusNode;

@OverRide
void initState() {
super.initState();
// Here we must load the document and pass it to Zefyr controller.
final document = _loadDocument();
_controller = ZefyrController(document);
_focusNode = FocusNode();
}

@OverRide
Widget build(BuildContext context) {
// Note that the editor requires special ZefyrScaffold widget to be
// one of its parents.
return Scaffold(
appBar: AppBar(title: Text("Editor page")),
body: ZefyrScaffold(
child: ZefyrEditor(
padding: EdgeInsets.all(16),
controller: _controller,
focusNode: _focusNode,
),
),
);
}

/// Loads the document to be edited in Zefyr.
NotusDocument _loadDocument() {
// For simplicity we hardcode a simple document with one line of text
// saying "Zefyr Quick Start".
// (Note that delta must always end with newline.)
final Delta delta = Delta()..insert("Zefyr Quick Start\n");
return NotusDocument.fromDelta(delta);
}
} [`]
This is Editor Page and using in-home of main Widget

zef1

Logs

C:\Projects\flutter paid projects\Dulingo-Admin>flutterbeta doctor -v
[√] Flutter (Channel beta, 1.23.0-18.1.pre, on Microsoft Windows
[Version 10.0.19042.804], locale en-US)
• Flutter version 1.23.0-18.1.pre at
C:\Users\ASUS\flutterbeta\flutter
• Framework revision 198df796aa (6 months ago), 2020-10-15
12:04:33 -0700
• Engine revision 1d12d82d9c
• Dart version 2.11.0 (build 2.11.0-213.1.beta)

[√] Android toolchain - develop for Android devices (Android SDK
version 30.0.0-rc3)
• Android SDK at C:\Users\ASUS\AppData\Local\Android\Sdk
• Platform android-30, build-tools 30.0.0-rc3
• ANDROID_HOME = C:\Users\ASUS\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android
Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b04)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Program Files
(x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b04)

[√] VS Code (version 1.55.0)
• VS Code at C:\Users\ASUS\AppData\Local\Programs\Microsoft VS
Code
• Flutter extension version 3.12.2

[√] Connected device (4 available)
• sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 •
Android 11 (API 30) (emulator)
• Web Server (web) • web-server • web-javascript •
Flutter Tools
• Chrome (web) • chrome • web-javascript •
Google Chrome 89.0.4389.114
• Edge (web) • edge • web-javascript •
Microsoft Edge 89.0.774.45

• No issues found!

This repo has been inactive for months. See #409 (comment)

Just FYI to save your time here.

This issue is not occurring in zefyr: ^1.0.0-dev.1.0
I am adding one question here that how can I use toolbar (which appear when we open keyboard in zefyr editor) for Flutter web?
please Answer this question I didn't found it.

Please try Zefyrka package instead of this one.

Zefyrka is a fork of Zefyr package with the following improvements:

  • support of Flutter 2.0
  • opt-in the null safety
  • text color
  • background color
  • paragraph alignment
  • paragraph indentation

This issue is not occurring in zefyr: ^1.0.0-dev.1.0

Closing as resolved.

Note that latest version of zefyr is 1.0.0-rc.1