fix: Fix bugs and clean up non-idiomatic code - #134
Merged
Merged
Conversation
Fixes toolbar tap targets on touch platforms, device settings crashes, the multi theme chooser crash, stale bookmarks, the preview safe area, number and edge insets property editors, and web chapter links in WebAssembly builds. Splits the main widget into smaller widgets, removes dead code and adds regression tests.
erickzanardo
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A pass through the whole package that fixes the bugs I could reproduce and restructures the parts that were not idiomatic Flutter. Every bug below has a regression test.
Bugs fixed
DashbookIconnow uses a shrink wrapped tap target.Dashbook.multiThemeasserted when two entries had equalThemeData. The selected theme is now tracked by name, and an empty theme map fails with a clear assertion.usePreviewSafeArea: it only worked inside a device frame since the device preview feature was added. It applies to the plain preview again.dart.library.html. A malformed link hash could leave the app blank, and a deep link stacked two pages.setStatecould be called after dispose during loading.Cleanup
buildmethod inwidget.dartis split intoDashbookPage,Toolbarand the theme icon widgets.createState, most of them became stateless.Link,DeviceDialogButtons, the duplicatedDevicePropertyScaffold, the duplicate platform file, unused breakpoints, andmockingjaytogether with its commented out test.sort_constructors_first,no_logic_in_create_state,only_throw_errorsandprefer_function_declarations_over_variablesare enabled again inanalysis_options.yaml.Things that users might notice
ControlPropertyandPropertyOptionnow haveconstconstructors, so users withprefer_const_constructorsenabled will get new hints.DashbookContext.properties,DashbookContext.actions,Story.chaptersandChapter.ctxare nowfinal.Not included
flutter_markdownis discontinued in favour offlutter_markdown_plus, andvery_good_analysisis four major versions behind. Dependency upgrades are left for a separate change.sliderPropertystill only supports the range 0 to 1. Fixing that properly means addingminandmaxparameters, which is a feature.Chapter.widget(),Decorator.decorate()andProperty.createPropertyEditor()are unchanged since they are public API.Testing
dart analyze --fatal-infos .anddart format . --set-exit-if-changedare clean.flutter testpasses (74 tests), and so doesflutter test --platform chrome.