Skip to content

Conversation

@ViscousPot
Copy link
Contributor

@ViscousPot ViscousPot commented Aug 13, 2025

Fixes an error in dev (probably silent in prod) because the listener added is not removed in dispose

The following assertion was thrown while dispatching notifications for CodeCrafterController:
setState() called after dispose()

(branch based on #8)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LSP suggestions or any suggestions aren't showing on this PR.

@heckmon heckmon requested a review from Copilot November 9, 2025 15:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the controller listener logic in the code editor widget by extracting an anonymous listener function into a named method, improving code organization and enabling proper cleanup. Additionally, it adds comprehensive example project configuration files for Windows, macOS, and web platforms.

Key Changes:

  • Extracted inline anonymous controller listener to a named controllerListener method for better code organization
  • Added proper listener cleanup in the dispose method to prevent memory leaks
  • Added complete example project platform configurations (Windows, macOS, web)

Reviewed Changes

Copilot reviewed 89 out of 129 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/code_crafter/code_area.dart Refactored controller listener from inline anonymous function to named method with proper cleanup
example/windows/* Added Windows platform configuration files for example app
example/macos/* Added macOS platform configuration files for example app
example/web/* Added web platform configuration files and assets for example app
example/pubspec.yaml Added example app dependencies and configuration
Files not reviewed (3)
  • example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: Language not supported
  • example/ios/Runner.xcworkspace/contents.xcworkspacedata: Language not supported
  • example/macos/Runner.xcworkspace/contents.xcworkspacedata: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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