Commit 9ce3ba31 authored by xster's avatar xster Committed by GitHub

Add Cupertino icon fonts helper and dependency for default template (#12559)

* add CupertinoIcons

* Use new font name convention

* review
parent ad72c783
......@@ -12,6 +12,7 @@ export 'src/cupertino/bottom_tab_bar.dart';
export 'src/cupertino/button.dart';
export 'src/cupertino/colors.dart';
export 'src/cupertino/dialog.dart';
export 'src/cupertino/icons.dart';
export 'src/cupertino/nav_bar.dart';
export 'src/cupertino/page_scaffold.dart';
export 'src/cupertino/route.dart';
......
// Copyright 2017 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:flutter/widgets.dart';
/// Identifiers for the supported Cupertino icons.
///
/// Use with the [Icon] class to show specific icons.
///
/// Icons are identified by their name as listed below.
///
/// To use this class, make sure you add a dependency on `cupertino_icons` in your
/// project's `pubspec.yaml` file. This ensures that the CupertinoIcons font is
/// included in your application. This font is used to display the icons. For example:
///
/// ```yaml
/// name: my_awesome_application
///
/// dependencies:
/// cupertino_icons: ^0.1.0
/// ```
///
/// See also:
///
/// * [Icon]
class CupertinoIcons {
CupertinoIcons._();
static const String iconFont = 'packages/cupertino_icons/CupertinoIcons';
// Manually maintained list
static const IconData left_chevron = const IconData(0xf3f0, fontFamily: iconFont);
static const IconData right_chevron = const IconData(0xf3f2, fontFamily: iconFont);
static const IconData share = const IconData(0xf4ca, fontFamily: iconFont);
static const IconData book = const IconData(0xf3e7, fontFamily: iconFont);
static const IconData info = const IconData(0xf44c, fontFamily: iconFont);
static const IconData reply = const IconData(0xf4c6, fontFamily: iconFont);
static const IconData conversation_bubble = const IconData(0xf3fb, fontFamily: iconFont);
static const IconData profile_circled = const IconData(0xf419, fontFamily: iconFont);
static const IconData plus_circled = const IconData(0xf48a, fontFamily: iconFont);
static const IconData minus_circled = const IconData(0xf463, fontFamily: iconFont);
static const IconData flag = const IconData(0xf42c, fontFamily: iconFont);
static const IconData search = const IconData(0xf4c6, fontFamily: iconFont);
static const IconData check_mark = const IconData(0xf41e, fontFamily: iconFont);
static const IconData check_mark_circled = const IconData(0xf41f, fontFamily: iconFont);
}
\ No newline at end of file
......@@ -5,6 +5,10 @@ dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.0
dev_dependencies:
flutter_test:
sdk: flutter
......@@ -26,7 +30,7 @@ flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the Icons class.
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
......@@ -39,7 +43,7 @@ flutter:
# For details regarding adding assets from package dependencies, see
# https://flutter.io/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment