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

Allow in-place text editing for elements #34

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

mauriziopinotti
Copy link

Description

Calling setElementEditingText() switches to edit mode, replacing the Text() widget with a TextFormField() that allows the user to edit the element text.

Screencast.from.30-08-2024.16.44.04.webm

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
sanjayankur31 Ankur Sinha
Calling setElementEditingText() switches to edit mode, replacing the
Text() widget with a TextFormField() that allows the user to edit the
element text.
Elements with isAutoSizeText set will size their text automatically
based on available space.
@mauriziopinotti mauriziopinotti marked this pull request as draft September 1, 2024 08:22
@mauriziopinotti
Copy link
Author

mauriziopinotti commented Sep 1, 2024

Converting to draft as it needs this pull request released on pub.dev: lzhuor/auto_size_text_field#36

@alnitak
Copy link
Owner

alnitak commented Sep 1, 2024

Hi @mauriziopinotti,

I would like to keep the plugin free from dependencies with other plugins. This also gives the user more freedom (maybe giving to FlowElement a child that could be a Text).

Now FlowElement already has text parameters like textSize, fontFamily etc that could mess with AutoSizeText.

Also, that issue is almost 2 years old.
Could you maybe consider using FittedBox?

@mauriziopinotti
Copy link
Author

Hi @mauriziopinotti,

I would like to keep the plugin free from dependencies with other plugins. This also gives the user more freedom (maybe giving to FlowElement a child that could be a Text).

Now FlowElement already has text parameters like textSize, fontFamily etc that could mess with AutoSizeText.

Also, that issue is almost 2 years old. Could you maybe consider using FittedBox?

Uhm, I saw the date Aug 18 and I though I was merged recently, I overlooked the year :|

I've reverted the last commit, I'll maybe push a different change with a WidgetBuilder for ElementTextWidget so that it's up to the consumer.

@mauriziopinotti mauriziopinotti marked this pull request as ready for review September 1, 2024 15:28
@alnitak alnitak changed the base branch from main to dev September 4, 2024 10:33
@alnitak alnitak merged commit d1fda2d into alnitak:dev Sep 4, 2024
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