删掉 web/ 目录与 4 个 *_web.dart 实现(jsQR/dart:html 解码、FileUploadInputElement 选图、以及为 Web 空实现的缓存与导出)。剩下 Android/iOS/Windows/macOS/Linux。 顺带把只剩单一实现的「façade + _native + _web」条件导入结构收敛成单文件, 调用点不变。同时从 .metadata 的 migration 平台列表和 analysis_options 的 exclude 里去掉 web,避免 flutter create/migrate 再把 web/ 生成回来。 QR 从图片解码此前只有 Web 端用 jsQR 真正可用,移动端走 MethodChannel 由 MainActivity/SceneDelegate 实现,桌面端无 handler——这一点在 qr_service.dart 和 README 里都注明了。 副作用:dart:html / dart:js 带来的 5 条 analyze info 随文件消失, flutter analyze 从 7 条降到 1 条(剩下的是 title_api_service 里既有的 prefer_initializing_formals)。
37 lines
1.5 KiB
YAML
37 lines
1.5 KiB
YAML
# This file configures the analyzer, which statically analyzes Dart code to
|
|
# check for errors, warnings, and lints.
|
|
#
|
|
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
|
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
|
# invoked from the command line by running `flutter analyze`.
|
|
|
|
# The following line activates a set of recommended lints for Flutter apps,
|
|
# packages, and plugins designed to encourage good coding practices.
|
|
analyzer:
|
|
exclude:
|
|
- build/**
|
|
- android/**
|
|
- ios/**
|
|
- windows/**
|
|
- macos/**
|
|
- linux/**
|
|
include: package:flutter_lints/flutter.yaml
|
|
|
|
linter:
|
|
# The lint rules applied to this project can be customized in the
|
|
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
|
# included above or to enable additional rules. A list of all available lints
|
|
# and their documentation is published at https://dart.dev/lints.
|
|
#
|
|
# Instead of disabling a lint rule for the entire project in the
|
|
# section below, it can also be suppressed for a single line of code
|
|
# or a specific dart file by using the `// ignore: name_of_lint` and
|
|
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
|
# producing the lint.
|
|
rules:
|
|
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
|
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
|
|
|
# Additional information about this file can be found at
|
|
# https://dart.dev/guides/language/analysis-options
|