Skip to content

Platform Exception (Bad Arguments / Internal Consistency Error) #2584

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

Open
1 task done
Ayushrestha05 opened this issue May 28, 2025 · 2 comments
Open
1 task done

Platform Exception (Bad Arguments / Internal Consistency Error) #2584

Ayushrestha05 opened this issue May 28, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Ayushrestha05
Copy link

Ayushrestha05 commented May 28, 2025

Have you checked for an existing issue?

Flutter Quill Version

11.4.1

Steps to Reproduce

Initialize a QuillEditor with basic stuff. Then try to click it in the TextArea. This is being tested on a Windows Build.

Minimal Code

class QuillTestScreen extends StatelessWidget {
  QuillTestScreen({super.key});

  final _quillController = QuillController.basic();

  @override
  Widget build(BuildContext context) {
    final theme = Theme.of(context);
    return Scaffold(
      appBar: AppBar(),
      body: Column(
        children: [
          Column(
            children: [
              QuillSimpleToolbar(controller: _quillController, config: _getToolbarConfigs(theme)),
              DecoratedBox(
                decoration: BoxDecoration(
                  color: theme.colorScheme.surfaceContainerLowest,
                  border: Border(top: BorderSide(color: theme.colorScheme.outlineVariant, width: 2)),
                ),
                child: QuillEditor(
                  controller: _quillController,
                  focusNode: FocusNode(),
                  scrollController: ScrollController(),
                  config: const QuillEditorConfig(
                    padding: EdgeInsets.all(16),
                  ),
                ),
              ),
            ],
          )
        ],
      ),
    );
  }

  QuillSimpleToolbarConfig _getToolbarConfigs(ThemeData theme) {
    return QuillSimpleToolbarConfig(
      toolbarSize: 40,
      color: theme.colorScheme.secondaryContainer,
      toolbarIconAlignment: WrapAlignment.start,
      multiRowsDisplay: false,
      toolbarIconCrossAlignment: WrapCrossAlignment.start,
      showDividers: false,
      showStrikeThrough: false,
      showInlineCode: false,
      showColorButton: false,
      showBackgroundColorButton: false,
      showClearFormat: false,
      showAlignmentButtons: true,
      showHeaderStyle: false,
      showListCheck: false,
      showCodeBlock: false,
      showQuote: false,
      showIndent: false,
      showLink: false,
      showUndo: false,
      showRedo: false,
      showSearchButton: false,
      showSubscript: false,
      showSuperscript: false,
    );
  }
}

Expected results

RichText Editor should be working normally.

Actual results

Image
On click, quill editor throws the platform exception and stops working

Additional Context

Logs
[√] Flutter (Channel stable, 3.32.0, on Microsoft Windows [Version 10.0.26100.4061], locale en-AU) [340ms]
    • Flutter version 3.32.0 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision be698c48a6 (9 days ago), 2025-05-19 12:59:14 -0700
    • Engine revision 1881800949
    • Dart version 3.8.0
    • DevTools version 2.45.1

[√] Windows Version (Windows 11 or higher, 24H2, 2009) [2.7s]

[√] Android toolchain - develop for Android devices (Android SDK version 35.0.1) [2.8s]
    • Android SDK at C:\Users\ayush\AppData\Local\Android\sdk
    • Platform android-35, build-tools 35.0.1
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.5+-13047016-b750.29)
    • All Android licenses accepted.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe) [82ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.13.5) [81ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.13.35919.96
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2024.3) [16ms]
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.5+-13047016-b750.29)

[√] VS Code, 64-bit edition (version 1.100.2) [14ms]
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.110.0

[√] Connected device (2 available) [139ms]
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.26100.4061]
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 136.0.3240.92

[√] Network resources [1,589ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.
@Ayushrestha05 Ayushrestha05 added the bug Something isn't working label May 28, 2025
@realth000
Copy link
Contributor

Same as #2572 , and #2579 probably fix it, I will try it soon.

@realth000
Copy link
Contributor

It runs well after applying the changes, now I stay in Flutter 3.32 again...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants