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

initializing in futurebuilder #6

Open
mirozahorak opened this issue Dec 16, 2022 · 1 comment
Open

initializing in futurebuilder #6

mirozahorak opened this issue Dec 16, 2022 · 1 comment

Comments

@mirozahorak
Copy link

Hi, i cannot get this to work in FutureBuilder, any ideas?
When testing RichTextEditor above FutureBuilder, it renders properly.

  final controller = HtmlEditorController();

  FutureBuilder<BookChapter>(
      future: DBProvider().getTranscript(s.mId as int),
      builder: (context, snapshot) {
        if (snapshot.hasData) {
          BookChapter bc = snapshot.data!;
          if (bc.content != null) {
            Container(
              width: 500,
              height: 500,
              child: RichTextEditor(
                alwaysShowButtons: true,
                placeholders: [
                  RichTextPlaceholder("TEST"),
                ],
                controller: controller,
                initialValue:
                    content,
                onChanged: (String html) {
@herrytco
Copy link
Owner

herrytco commented Dec 20, 2022

Hi, what behaviour are you getting? Any error? Just a shot in the blue but isn't a return statement missing there before the Container?

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

No branches or pull requests

2 participants