Flutter `build_runner` error: `BuildForInputLogger` missing `Logger.onLevelChanged` implementation due to dependency conflicts

2 days ago 1
ARTICLE AD BOX

Flutter build_runner error: BuildForInputLogger missing Logger.onLevelChanged

I’m working on a Flutter project (git-touch-rebrand) and I’m encountering an issue when trying to run:

flutter pub run build_runner build --delete-conflicting-outputs

I consistently get the following error.

PS D:\Git-Touch\git-touch-rebrand> flutter pub run build_runner build --delete-conflicting-outputs Deprecated. Use dart run instead. Building package executable... (16.8s) Failed to build build_runner:build_runner: /C:/Users/hamda/AppData/Local/Pub/Cache/hosted/pub.dev/build_runner_core-7.2.8/lib/src/logging/build_for_input_logger.dart:13:7: Error: The non-abstract class 'BuildForInputLogger' is missing implementations for these members: - Logger.onLevelChanged Try to either - provide an implementation, - inherit an implementation from a superclass or mixin, - mark the class as abstract, or - provide a 'noSuchMethod' implementation. class BuildForInputLogger implements Logger { ^^^^^^^^^^^^^^^^^^^ /C:/Users/hamda/AppData/Local/Pub/Cache/hosted/pub.dev/logging-1.2.0/lib/src/logger.dart:162:22: Context: 'Logger.onLevelChanged' is defined here. Stream<Level?> get onLevelChanged { ^^^^^^^^^^^^^^ Failed to update packages.

Analysis

This indicates an incompatibility between build_runner_core and the logging package.

Specifically:

BuildForInputLogger (from build_runner_core 7.2.8) implements Logger Logger (from logging 1.2.0) includes the getter onLevelChanged BuildForInputLogger does not implement this getter

pubspec.yaml

name: git_touch description: A new Flutter project. publish_to: "none" version: 1.13.0+26 environment: sdk: ">=2.17.5 <3.0.0" dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter gql_github: path: ./packages/gql_github gql_gitlab: path: ./packages/gql_gitlab github_trending: path: ./packages/github_trending antd_mobile: path: ../ant-design-mobile-flutter cupertino_icons: ^1.0.5 ferry: ^0.16.1+2 ferry_flutter: ^0.9.1+1 file_icon: ^1.0.0 filesize: ^2.0.1 fimber: ^0.6.6 flutter_highlight: ^0.7.0 flutter_markdown: ^0.6.12 flutter_svg: ^1.1.5 flutter_vector_icons: ^2.0.0 github: ^9.4.0 gql: ^0.14.0 gql_http_link: ^0.4.4+1 http: ^0.13.5 intl: ^0.20.2 json_annotation: ^4.7.0 launch_review: ^3.0.1 nanoid: ^1.0.0 package_info_plus: ^2.0.0 primer: ^0.1.0 provider: ^6.0.4 share_plus: ^5.0.0 shared_preferences: ^2.0.15 timeago: ^3.3.0 tuple: ^2.0.1 uni_links: ^0.5.1 universal_io: ^2.0.4 uri: ^1.0.0 url_launcher: ^6.1.6 webview_flutter: ^3.0.4 sentry_flutter: ^6.12.2 pub_semver: ^2.1.2 google_fonts: ^3.0.1 go_router: ^5.1.0 from_css_color: ^2.0.0 maps_launcher: ^2.0.1 path: ^1.8.2 freezed_annotation: ^3.1.0 dev_dependencies: build_runner: ^2.2.0 ferry_generator: ^0.12.0+3 flutter_lints: ^6.0.0 flutter_test: sdk: flutter freezed: ^3.2.4 json_serializable: ^6.5.1 flutter: generate: true assets: - images/ flutter_intl: enabled: true

Relevant pubspec.lock Versions

packages: build_runner: version: "2.4.13" # pubspec.yaml states ^2.2.0 build_runner_core: version: "7.2.8" ferry: version: "0.11.2+1" # pubspec.yaml states ^0.16.1+2 ferry_generator: version: "0.6.1" # pubspec.yaml states ^0.12.0+3 ferry_flutter: version: "0.6.2" # pubspec.yaml states ^0.9.1+1 freezed: version: "2.2.0" # pubspec.yaml states ^3.2.4 freezed_annotation: version: "2.4.2" # pubspec.yaml states ^3.1.0 gql: version: "0.14.0" gql_code_builder: version: "0.6.0" logging: version: "1.2.0"

What I’ve Tried So Far

Upgraded intl

Resolved an earlier intl dependency conflict.

Fixed .arb files

Corrected FormatException and pluralization errors in:

intl_nb.arb intl_zh.arb intl_en.arb

Clean & re-fetch dependencies

Ran flutter clean Ran flutter pub get, flutter pub upgrade Running flutter pub upgrade --major-versions introduces new conflicts in deeply nested dependencies (ferry, ferry_generator, gql).

Tried dependency_overrides for logging

Tested logging: 1.2.0 and logging: 1.0.2

Error persists, suggesting:

onLevelChanged exists even in older versions, or The issue is deeper than a simple override

Removing overrides did not help.

Attempted broad major upgrades

Resulted in cascading conflicts, such as:

freezed >=3.1.0 vs freezed_annotation ^2.2.0 ferry_flutter vs ferry_generator (conflicting ferry_exec) ferry_flutter vs ferry ferry_generator requiring gql ^1.0.0 while the project uses gql ^0.14.0

Conclusion / Question

The dependency tree appears fragile and outdated, and I’m unable to find a compatible set of versions that satisfies all constraints—especially around:

build_runner build_runner_core logging the ferry / gql / freezed ecosystem

What is the recommended approach for resolving complex, intertwined dependency conflicts like this in a Flutter project when:

flutter pub upgrade --major-versions doesn’t converge dependency_overrides doesn’t solve the issue

Are there:

Known stable combinations of build_runner, build_runner_core, and logging that work with older ferry / gql versions? A systematic strategy for untangling and modernizing this kind of dependency mess?

Any guidance would be greatly appreciated.

Read Entire Article