stock_strings.dart 1.21 KB
Newer Older
1 2 3 4 5 6
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:intl/intl.dart';
import 'package:flutter/widgets.dart';
7 8 9 10 11 12 13 14 15

// Wrappers for strings that are shown in the UI.  The strings can be
// translated for different locales using the Dart intl package.
//
// Locale-specific values for the strings live in the i18n/*.arb files.
//
// To generate the stock_messages_*.dart files from the ARB files, run:
//   pub run intl:generate_from_arb --output-dir=lib/i18n --generated-file-prefix=stock_ --no-use-deferred-loading lib/stock_strings.dart lib/i18n/stocks_*.arb

16 17 18 19 20 21 22 23
class StockStrings extends LocaleQueryData {
  static StockStrings of(BuildContext context) {
    return LocaleQuery.of(context);
  }

  static final StockStrings instance = new StockStrings();

  String title() => Intl.message(
24 25 26 27 28
    'Stocks',
    name: 'title',
    desc: 'Title for the Stocks application'
  );

29
  String market() => Intl.message(
30 31 32 33 34
    'MARKET',
    name: 'market',
    desc: 'Label for the Market tab'
  );

35
  String portfolio() => Intl.message(
36 37 38 39 40
    'PORTFOLIO',
    name: 'portfolio',
    desc: 'Label for the Portfolio tab'
  );
}