aloisdeniel / aloisdeniel/flutter_sheet_localization
build_runner does not generate anything
- Vorherrschende Sprache
- Dart
- Sterne
- 286
- Forks
- 87
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Coming back to sheet_localization after several years and I'm struggling with the initial setup.
Running the build_runner reports a "severe" issue and nothing is generated:
``` log
→ flutter packages pub run build_runner build
[INFO] Generating build script...
[INFO] Generating build script completed, took 375ms
[SEVERE] Nothing can be built, yet a build was requested.
[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 58ms
[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 471ms
[INFO] Running build...
[INFO] Running build completed, took 2ms
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 35ms
[INFO] Succeeded after 51ms with 0 outputs (0 actions)
```
The `localization.dart` is as in the ReadMe, placed in `/lib` folder:
``` dart
import 'package:flutter/widgets.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_sheet_localization/flutter_sheet_localization.dart';
part 'localization.g.dart';
@SheetLocalization("redacted", "0", 2) // <- See 1. to get DOCID and SHEETID
// the `1` is the generated version. You must increment it each time you want to regenerate
// a new version of the labels.
class AppLocalizationsDelegate
extends LocalizationsDelegate {
const AppLocalizationsDelegate();
@override
bool isSupported(Locale locale) => localizedLabels.containsKey(locale);
@override
Future load(Locale locale) =>
SynchronousFuture(localizedLabels[locale]!);
@override
bool shouldReload(AppLocalizationsDelegate old) => false;
}
```
This happens on a MacOS.
Any help appreciated.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.