Skip to content

Modernize Noteless for Flutter 3 and Dart 3#99

Draft
mcepl wants to merge 5 commits into
redsolver:masterfrom
openSUSE-Python:modernisation
Draft

Modernize Noteless for Flutter 3 and Dart 3#99
mcepl wants to merge 5 commits into
redsolver:masterfrom
openSUSE-Python:modernisation

Conversation

@mcepl
Copy link
Copy Markdown

@mcepl mcepl commented Jun 2, 2026

This PR migrates the Noteless application from a legacy Flutter version to a modern toolchain (Flutter 3.44, Dart 3.12). The primary focus was on implementing sound null safety across the codebase and stabilizing the Android build process for release APK generation.

##Key Changes

Technical Debt & Modernization

  • Null Safety: Fully migrated the core application state, models, and stores (Note, NotesStore, PersistentStore) to sound null safety.
  • Dependency Refresh:
    • Updated pubspec.yaml to current stable versions of critical plugins (e.g., shared_preferences, webview_flutter, file_picker, device_info_plus).
    • Removed material_design_icons_flutter due to incompatibility with final class IconData in recent Flutter versions; replaced all usages with standard Icons.
    • Replaced the discontinued preferences package with a custom PrefService based on shared_preferences.
  • API Updates: Updated FilePicker implementations to use the new static API instead of the deprecated .platform singleton.

Android Build Pipeline

  • Gradle Migration: Transitioned from legacy Groovy build scripts to Kotlin DSL (build.gradle.kts, settings.gradle.kts).
  • Toolchain Alignment:
    • Updated Gradle wrapper to 9.1.0.
    • Configured the project to use JDK 17.
    • Fixed JVM target mismatches between Java and Kotlin tasks.
  • Asset Sanitization: Renamed tutorial asset files containing emojis to ASCII-only paths to ensure compatibility with the Android Gradle Plugin (AGP) asset stat processes.

UI & UX

  • Refactored UI pages (NoteListPage, EditPage, SettingsPage, PreviewPage) to align with modern Flutter widget APIs and theme properties.
  • Updated WebView integration to use the 4.x API.
    Verification Results
  • Static Analysis: passes flutter analyze with only minor lint warnings.
  • Build: Successfully generates a release Android APK using flutter build apk --release.

Status of the effort

APK builds, but the result is not useful (errors in Markdown parsing), needs finishing (for which I don’t have enough time any more).

Whole effort is completely vibe coded. I don’t know properly Dart even.

mcepl added 5 commits June 2, 2026 12:10
Raise the Dart SDK constraint for the current Flutter toolchain and replace obsolete package dependencies with null-safe alternatives. Add a shared_preferences-backed PrefService wrapper so existing preference call sites can migrate without retaining the deprecated preferences package.
Update the note model, persistence layer, note store, YAML utilities, theme provider, and application bootstrap to Dart 3 null safety. This keeps the existing storage behavior while using current path_provider, device_info_plus, shared preference access, and YAML parsing APIs.
Remove reliance on non-null-safe editor, front matter, diff, and markdown packages by switching the editor to Flutter text editing primitives and preview rendering to markdown plus the modern webview_flutter controller API. This preserves editing, preview generation, and note navigation while allowing the project to build on current Flutter.
Migrate the main note list, settings, and about pages away from removed widgets and legacy packages. Replace the old preferences widgets with local Material controls, update package_info usage, modernize note actions, and add a minimal Flutter test so the upgraded project has a runnable test target.
Migrate the project metadata and Android Gradle setup to the current Flutter template, including Kotlin DSL build files, updated wrapper/properties, refreshed manifests/resources, and release-build compatibility flags.

Update dependencies for Dart 3 and Flutter 3.44, remove material_design_icons_flutter because it extends final IconData, replace its usages with built-in Material icons, and update file_picker calls to the new static API.

Rename tutorial asset files to ASCII-only paths and update sample references so Gradle can stat assets reliably during release builds.
@mcepl mcepl mentioned this pull request Jun 2, 2026
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.

1 participant