Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add auto expanded editor showcase #920

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

LucasXu0
Copy link
Collaborator

Add an example showcase to set up an auto-expanded editor

showcase.mp4

Code

    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.black,
        title: const Text('Custom Theme For Editor'),
        titleTextStyle: const TextStyle(color: Colors.white),
        iconTheme: const IconThemeData(
          color: Colors.white,
        ),
      ),
      body: SafeArea(
        child: Center(
          child: IntrinsicHeight(
            child: Container(
              alignment: Alignment.center,
              decoration: BoxDecoration(
                border: Border.all(color: Colors.grey),
              ),
              constraints: const BoxConstraints(
                maxHeight: 360,
                maxWidth: 400,
              ),
              child: SingleChildScrollView(
                child: IntrinsicHeight(
                  child: AppFlowyEditor(
                    editorState: editorState,
                    disableAutoScroll: true,
                    shrinkWrap: true,
                    editorStyle: const EditorStyle.desktop(
                      padding: EdgeInsets.symmetric(horizontal: 8),
                    ),
                    blockComponentBuilders: _buildBlockComponentBuilders(),
                    editorScrollController: EditorScrollController(
                      editorState: editorState,
                      shrinkWrap: true,
                    ),
                  ),
                ),
              ),
            ),
          ),
        ),
      ),
    );

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.06%. Comparing base (0a0d441) to head (1920705).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #920   +/-   ##
=======================================
  Coverage   72.06%   72.06%           
=======================================
  Files         318      318           
  Lines       15000    15000           
=======================================
  Hits        10810    10810           
  Misses       4190     4190           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LucasXu0 LucasXu0 merged commit 41048fe into AppFlowy-IO:main Oct 14, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants