[gen_l10n] Optional Headers (#52125)

* Expose --header and --header-file arguments for gen_l10n
This commit is contained in:
Shi-Hao Hong
2020-03-11 13:55:54 -07:00
committed by GitHub
parent d56266375b
commit 96fd143cd7
6 changed files with 159 additions and 8 deletions

View File

@@ -0,0 +1,3 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View File

@@ -18,7 +18,7 @@ for more info.
```dart
dart ${FLUTTER_PATH}/dev/tools/localization/bin/gen_l10n.dart --arb-dir=lib/i18n \
--template-arb-file=stocks_en.arb --output-localization-file=stock_strings.dart \
--output-class=StockStrings
--output-class=StockStrings --header-file=header.txt
```
The `StockStrings` class creates a delegate that performs message lookups