mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
parent
022cb2d9dc
commit
cc11c39b59
@ -23,7 +23,7 @@ Available examples include:
|
||||
the text "hello, world."
|
||||
|
||||
- **Flutter gallery** The [flutter gallery app](flutter_gallery) showcases
|
||||
Flutter's implementation of [material design](https://www.google.com/design/spec/material-design/introduction.html).
|
||||
Flutter's implementation of [material design](https://material.google.com/).
|
||||
|
||||
- **Layers** The [layers vignettes](layers) show how to use the various layers
|
||||
in the Flutter framework. There is no main.dart in this directory because each
|
||||
|
@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
// This demo is based on
|
||||
// https://www.google.com/design/spec/components/dialogs.html#dialogs-full-screen-dialogs
|
||||
// https://material.google.com/components/dialogs.html#dialogs-full-screen-dialogs
|
||||
|
||||
enum DismissDialogAction {
|
||||
cancel,
|
||||
|
@ -7,7 +7,7 @@
|
||||
/// To use, import `package:flutter/material.dart`.
|
||||
///
|
||||
/// See
|
||||
/// [www.google.com/design/spec/material-design](https://www.google.com/design/spec/material-design/introduction.html)
|
||||
/// [material.google.com](https://material.google.com/)
|
||||
/// for an introduction to Material Design.
|
||||
library material;
|
||||
|
||||
|
@ -149,7 +149,7 @@ class MaterialApp extends StatefulWidget {
|
||||
|
||||
/// Turns on a [GridPaper] overlay that paints a baseline grid
|
||||
/// Material apps:
|
||||
/// https://www.google.com/design/spec/layout/metrics-keylines.html
|
||||
/// https://material.google.com/layout/metrics-keylines.html
|
||||
/// Only available in checked mode.
|
||||
final bool debugShowMaterialGrid;
|
||||
|
||||
|
@ -83,7 +83,7 @@ class _ToolbarLayout extends MultiChildLayoutDelegate {
|
||||
}
|
||||
|
||||
// TODO(eseidel) Toolbar needs to change size based on orientation:
|
||||
// http://www.google.com/design/spec/layout/structure.html#structure-app-bar
|
||||
// http://material.google.com/layout/structure.html#structure-app-bar
|
||||
// Mobile Landscape: 48dp
|
||||
// Mobile Portrait: 56dp
|
||||
// Tablet/Desktop: 64dp
|
||||
@ -130,7 +130,7 @@ class _AppBarExpandedHeight extends InheritedWidget {
|
||||
/// * [IconButton]
|
||||
/// * [PopupMenuButton]
|
||||
/// * [FlexibleSpaceBar]
|
||||
/// * <https://www.google.com/design/spec/layout/structure.html#structure-toolbars>
|
||||
/// * <https://material.google.com/layout/structure.html#structure-toolbars>
|
||||
class AppBar extends StatelessWidget {
|
||||
/// Creates a material design app bar.
|
||||
///
|
||||
|
@ -39,7 +39,7 @@ const Color _kBarrierColor = Colors.black54;
|
||||
///
|
||||
/// * [Scaffold.showBottomSheet]
|
||||
/// * [showModalBottomSheet]
|
||||
/// * <https://www.google.com/design/spec/components/bottom-sheets.html>
|
||||
/// * <https://material.google.com/components/bottom-sheets.html>
|
||||
class BottomSheet extends StatefulWidget {
|
||||
/// Creates a bottom sheet.
|
||||
///
|
||||
@ -255,7 +255,7 @@ class _ModalBottomSheetRoute<T> extends PopupRoute<T> {
|
||||
///
|
||||
/// * [BottomSheet]
|
||||
/// * [Scaffold.showBottomSheet]
|
||||
/// * <https://www.google.com/design/spec/components/bottom-sheets.html#bottom-sheets-modal-bottom-sheets>
|
||||
/// * <https://material.google.com/components/bottom-sheets.html#bottom-sheets-modal-bottom-sheets>
|
||||
Future<dynamic/*=T*/> showModalBottomSheet/*<T>*/({ BuildContext context, WidgetBuilder builder }) {
|
||||
assert(context != null);
|
||||
assert(builder != null);
|
||||
|
@ -12,7 +12,7 @@ import 'material.dart';
|
||||
///
|
||||
/// * [Dialog]
|
||||
/// * [showDialog]
|
||||
/// * <https://www.google.com/design/spec/components/cards.html>
|
||||
/// * <https://material.google.com/components/cards.html>
|
||||
class Card extends StatelessWidget {
|
||||
/// Creates a material design card.
|
||||
const Card({
|
||||
|
@ -28,8 +28,8 @@ import 'toggleable.dart';
|
||||
/// * [Radio]
|
||||
/// * [Switch]
|
||||
/// * [Slider]
|
||||
/// * <https://www.google.com/design/spec/components/selection-controls.html#selection-controls-checkbox>
|
||||
/// * <https://www.google.com/design/spec/components/lists-controls.html#lists-controls-types-of-list-controls>
|
||||
/// * <https://material.google.com/components/selection-controls.html#selection-controls-checkbox>
|
||||
/// * <https://material.google.com/components/lists-controls.html#lists-controls-types-of-list-controls>
|
||||
class Checkbox extends StatefulWidget {
|
||||
/// Creates a material design checkbox.
|
||||
///
|
||||
|
@ -33,7 +33,7 @@ const TextStyle _kLabelStyle = const TextStyle(
|
||||
/// See also:
|
||||
///
|
||||
/// * [CircleAvatar]
|
||||
/// * <https://www.google.com/design/spec/components/chips.html>
|
||||
/// * <https://material.google.com/components/chips.html>
|
||||
class Chip extends StatelessWidget {
|
||||
/// Creates a material design chip.
|
||||
///
|
||||
|
@ -18,7 +18,7 @@ import 'theme.dart';
|
||||
///
|
||||
/// * [Chip]
|
||||
/// * [ListItem]
|
||||
/// * <https://www.google.com/design/spec/components/chips.html#chips-contact-chips>
|
||||
/// * <https://material.google.com/components/chips.html#chips-contact-chips>
|
||||
class CircleAvatar extends StatelessWidget {
|
||||
/// Creates a circle that represents a user.
|
||||
CircleAvatar({
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'dart:ui' show Color;
|
||||
|
||||
/// [Color] constants which represent Material design's
|
||||
/// [color palette](http://www.google.com/design/spec/style/color.html).
|
||||
/// [color palette](http://material.google.com/style/color.html).
|
||||
///
|
||||
/// To select a specific color from one of the swatches, index into the swatch
|
||||
/// using an integer for the specific color desired, as follows:
|
||||
|
@ -223,7 +223,7 @@ class DataCell {
|
||||
/// * [DataRow]
|
||||
/// * [DataCell]
|
||||
/// * [PaginatedDataTable]
|
||||
/// * <https://www.google.com/design/spec/components/data-tables.html>
|
||||
/// * <https://material.google.com/components/data-tables.html>
|
||||
class DataTable extends StatelessWidget {
|
||||
/// Creates a widget describing a data table.
|
||||
///
|
||||
|
@ -160,7 +160,7 @@ final _DayPickerGridDelegate _kDayPickerGridDelegate = new _DayPickerGridDelegat
|
||||
/// See also:
|
||||
///
|
||||
/// * [showDatePicker].
|
||||
/// * <https://www.google.com/design/spec/components/pickers.html#pickers-date-pickers>
|
||||
/// * <https://material.google.com/components/pickers.html#pickers-date-pickers>
|
||||
class DayPicker extends StatelessWidget {
|
||||
/// Creates a day picker.
|
||||
///
|
||||
@ -288,7 +288,7 @@ class DayPicker extends StatelessWidget {
|
||||
/// See also:
|
||||
///
|
||||
/// * [showDatePicker]
|
||||
/// * <https://www.google.com/design/spec/components/pickers.html#pickers-date-pickers>
|
||||
/// * <https://material.google.com/components/pickers.html#pickers-date-pickers>
|
||||
class MonthPicker extends StatefulWidget {
|
||||
/// Creates a month picker.
|
||||
///
|
||||
@ -440,7 +440,7 @@ class _MonthPickerState extends State<MonthPicker> {
|
||||
/// See also:
|
||||
///
|
||||
/// * [showDatePicker]
|
||||
/// * <https://www.google.com/design/spec/components/pickers.html#pickers-date-pickers>
|
||||
/// * <https://material.google.com/components/pickers.html#pickers-date-pickers>
|
||||
class YearPicker extends StatefulWidget {
|
||||
/// Creates a year picker.
|
||||
///
|
||||
@ -676,7 +676,7 @@ class _DatePickerDialogState extends State<_DatePickerDialog> {
|
||||
/// See also:
|
||||
///
|
||||
/// * [showTimePicker]
|
||||
/// * <https://www.google.com/design/spec/components/pickers.html#pickers-date-pickers>
|
||||
/// * <https://material.google.com/components/pickers.html#pickers-date-pickers>
|
||||
Future<DateTime> showDatePicker({
|
||||
BuildContext context,
|
||||
DateTime initialDate,
|
||||
|
@ -24,7 +24,7 @@ import 'theme.dart';
|
||||
/// * [AlertDialog]
|
||||
/// * [SimpleDialog]
|
||||
/// * [showDialog]
|
||||
/// * <https://www.google.com/design/spec/components/dialogs.html>
|
||||
/// * <https://material.google.com/components/dialogs.html>
|
||||
class Dialog extends StatelessWidget {
|
||||
/// Creates a dialog.
|
||||
///
|
||||
@ -321,7 +321,7 @@ class _DialogRoute<T> extends PopupRoute<T> {
|
||||
///
|
||||
/// See also:
|
||||
/// * [Dialog]
|
||||
/// * <https://www.google.com/design/spec/components/dialogs.html>
|
||||
/// * <https://material.google.com/components/dialogs.html>
|
||||
Future<dynamic/*=T*/> showDialog/*<T>*/({ BuildContext context, Widget child }) {
|
||||
return Navigator.push(context, new _DialogRoute<dynamic/*=T*/>(
|
||||
child: child,
|
||||
|
@ -19,7 +19,7 @@ import 'theme.dart';
|
||||
///
|
||||
/// * [ListItem.divideItems]
|
||||
/// * [PopupMenuDivider]
|
||||
/// * <https://www.google.com/design/spec/components/dividers.html>
|
||||
/// * <https://material.google.com/components/dividers.html>
|
||||
class Divider extends StatelessWidget {
|
||||
/// Creates a material design divider.
|
||||
///
|
||||
|
@ -8,7 +8,7 @@ import 'colors.dart';
|
||||
import 'material.dart';
|
||||
|
||||
// TODO(eseidel): Draw width should vary based on device size:
|
||||
// http://www.google.com/design/spec/layout/structure.html#structure-side-nav
|
||||
// http://material.google.com/layout/structure.html#structure-side-nav
|
||||
|
||||
// Mobile:
|
||||
// Width = Screen width − 56 dp
|
||||
@ -39,7 +39,7 @@ const Duration _kBaseSettleDuration = const Duration(milliseconds: 246);
|
||||
/// * [Scaffold.drawer]
|
||||
/// * [DrawerItem]
|
||||
/// * [DrawerHeader]
|
||||
/// * <https://www.google.com/design/spec/patterns/navigation-drawer.html>
|
||||
/// * <https://material.google.com/patterns/navigation-drawer.html>
|
||||
class Drawer extends StatelessWidget {
|
||||
/// Creates a material design drawer.
|
||||
///
|
||||
|
@ -23,7 +23,7 @@ const double _kDrawerHeaderHeight = 160.0 + 1.0; // bottom edge
|
||||
/// * [UserAccountsDrawerHeader], a variant of [DrawerHeader] that is
|
||||
/// specialized for showing user accounts.
|
||||
/// * [DrawerItem]
|
||||
/// * <https://www.google.com/design/spec/patterns/navigation-drawer.html>
|
||||
/// * <https://material.google.com/patterns/navigation-drawer.html>
|
||||
class DrawerHeader extends StatelessWidget {
|
||||
/// Creates a material design drawer header.
|
||||
///
|
||||
|
@ -24,7 +24,7 @@ import 'theme.dart';
|
||||
///
|
||||
/// * [Drawer]
|
||||
/// * [DrawerHeader]
|
||||
/// * <https://www.google.com/design/spec/patterns/navigation-drawer.html>
|
||||
/// * <https://material.google.com/patterns/navigation-drawer.html>
|
||||
class DrawerItem extends StatelessWidget {
|
||||
/// Creates a material design drawer item.
|
||||
///
|
||||
|
@ -211,7 +211,7 @@ class _DropdownMenuRouteLayout<T> extends SingleChildLayoutDelegate {
|
||||
// The maximum height of a simple menu should be one or more rows less than
|
||||
// the view height. This ensures a tappable area outside of the simple menu
|
||||
// with which to dismiss the menu.
|
||||
// -- https://www.google.com/design/spec/components/menus.html#menus-simple-menus
|
||||
// -- https://material.google.com/components/menus.html#menus-simple-menus
|
||||
final double maxHeight = math.max(0.0, constraints.maxHeight - 2 * _kMenuItemHeight);
|
||||
final double width = buttonRect.width + 8.0;
|
||||
return new BoxConstraints(
|
||||
@ -405,7 +405,7 @@ class DropdownButtonHideUnderline extends InheritedWidget {
|
||||
///
|
||||
/// * [RaisedButton]
|
||||
/// * [FlatButton]
|
||||
/// * <https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons>
|
||||
/// * <https://material.google.com/components/buttons.html#buttons-dropdown-buttons>
|
||||
class DropdownButton<T> extends StatefulWidget {
|
||||
/// Creates a drop down button.
|
||||
///
|
||||
|
@ -33,7 +33,7 @@ import 'theme.dart';
|
||||
///
|
||||
/// * [RaisedButton]
|
||||
/// * [DropdownButton]
|
||||
/// * <https://www.google.com/design/spec/components/buttons.html>
|
||||
/// * <https://material.google.com/components/buttons.html>
|
||||
class FlatButton extends StatelessWidget {
|
||||
/// Creates a flat button.
|
||||
///
|
||||
|
@ -25,7 +25,7 @@ import 'theme.dart';
|
||||
///
|
||||
/// * [AppBar]
|
||||
/// * [Scaffold]
|
||||
/// * <https://www.google.com/design/spec/patterns/scrolling-techniques.html>
|
||||
/// * <https://material.google.com/patterns/scrolling-techniques.html>
|
||||
class FlexibleSpaceBar extends StatefulWidget {
|
||||
/// Creates a flexible space bar.
|
||||
///
|
||||
|
@ -14,7 +14,7 @@ import 'theme.dart';
|
||||
import 'tooltip.dart';
|
||||
|
||||
// TODO(eseidel): This needs to change based on device size?
|
||||
// http://www.google.com/design/spec/layout/metrics-keylines.html#metrics-keylines-keylines-spacing
|
||||
// http://material.google.com/layout/metrics-keylines.html#metrics-keylines-keylines-spacing
|
||||
const double _kSize = 56.0;
|
||||
const double _kSizeMini = 40.0;
|
||||
final Object _kDefaultHeroTag = new Object();
|
||||
@ -37,7 +37,7 @@ final Object _kDefaultHeroTag = new Object();
|
||||
/// * [Scaffold]
|
||||
/// * [RaisedButton]
|
||||
/// * [FlatButton]
|
||||
/// * <https://www.google.com/design/spec/components/buttons-floating-action-button.html>
|
||||
/// * <https://material.google.com/components/buttons-floating-action-button.html>
|
||||
class FloatingActionButton extends StatefulWidget {
|
||||
/// Creates a floating action button.
|
||||
///
|
||||
|
@ -14,7 +14,7 @@ import 'package:flutter/widgets.dart';
|
||||
///
|
||||
/// * [ScrollableGrid]
|
||||
/// * [GridTileBar]
|
||||
/// * <https://www.google.com/design/spec/components/grid-lists.html>
|
||||
/// * <https://material.google.com/components/grid-lists.html>
|
||||
class GridTile extends StatelessWidget {
|
||||
/// Creates a grid tile.
|
||||
///
|
||||
|
@ -19,7 +19,7 @@ import 'typography.dart';
|
||||
/// See also:
|
||||
///
|
||||
/// * [GridTile]
|
||||
/// * <https://www.google.com/design/spec/components/grid-lists.html#grid-lists-specs>
|
||||
/// * <https://material.google.com/components/grid-lists.html#grid-lists-specs>
|
||||
class GridTileBar extends StatelessWidget {
|
||||
/// Creates a grid tile bar.
|
||||
///
|
||||
|
@ -30,7 +30,7 @@ export 'package:flutter/services.dart' show TextInputType;
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * <https://www.google.com/design/spec/components/text-fields.html>
|
||||
/// * <https://material.google.com/components/text-fields.html>
|
||||
///
|
||||
/// For a detailed guide on using the input widget, see:
|
||||
///
|
||||
|
@ -11,7 +11,7 @@ import 'package:flutter/widgets.dart';
|
||||
/// * [MaterialList]
|
||||
/// * [ListItem]
|
||||
/// * [kListItemExtent]
|
||||
/// * <https://www.google.com/design/spec/components/lists.html#lists-specs>
|
||||
/// * <https://material.google.com/components/lists.html#lists-specs>
|
||||
enum MaterialListType {
|
||||
/// A list item that contains a single line of text.
|
||||
oneLine,
|
||||
@ -33,7 +33,7 @@ enum MaterialListType {
|
||||
/// * [MaterialListType]
|
||||
/// * [ListItem]
|
||||
/// * [kListItemExtent]
|
||||
/// * <https://www.google.com/design/spec/components/lists.html#lists-specs>
|
||||
/// * <https://material.google.com/components/lists.html#lists-specs>
|
||||
Map<MaterialListType, double> kListItemExtent = const <MaterialListType, double>{
|
||||
MaterialListType.oneLine: 48.0,
|
||||
MaterialListType.oneLineWithAvatar: 56.0,
|
||||
@ -52,7 +52,7 @@ Map<MaterialListType, double> kListItemExtent = const <MaterialListType, double>
|
||||
/// * [ScrollableList]
|
||||
/// * [TwoLevelList]
|
||||
/// * [ScrollableGrid]
|
||||
/// * <https://www.google.com/design/spec/components/lists.html>
|
||||
/// * <https://material.google.com/components/lists.html>
|
||||
class MaterialList extends StatelessWidget {
|
||||
/// Creates a material list.
|
||||
///
|
||||
|
@ -26,7 +26,7 @@ import 'theme.dart';
|
||||
/// * [MaterialList]
|
||||
/// * [CircleAvatar]
|
||||
/// * [Divider]
|
||||
/// * <https://www.google.com/design/spec/components/lists.html>
|
||||
/// * <https://material.google.com/components/lists.html>
|
||||
class ListItem extends StatelessWidget {
|
||||
/// Creates a list item.
|
||||
///
|
||||
|
@ -160,7 +160,7 @@ abstract class MaterialInkController {
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * <https://www.google.com/design/spec/material-design/introduction.html>
|
||||
/// * <https://material.google.com/>
|
||||
class Material extends StatefulWidget {
|
||||
/// Creates a piece of material.
|
||||
///
|
||||
|
@ -358,7 +358,7 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
|
||||
new DefaultTextStyle(
|
||||
// These typographic styles aren't quite the regular ones. We pick the closest ones from the regular
|
||||
// list and then tweak them appropriately.
|
||||
// See https://www.google.com/design/spec/components/data-tables.html#data-tables-tables-within-cards
|
||||
// See https://material.google.com/components/data-tables.html#data-tables-tables-within-cards
|
||||
style: _selectedRowCount > 0 ? themeData.textTheme.subhead.copyWith(color: themeData.accentColor)
|
||||
: themeData.textTheme.title.copyWith(fontWeight: FontWeight.w400),
|
||||
child: new IconTheme.merge(
|
||||
|
@ -23,7 +23,7 @@ const double _kCircularProgressIndicatorStrokeWidth = 4.0;
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * <https://www.google.com/design/spec/components/progress-activity.html>
|
||||
/// * <https://material.google.com/components/progress-activity.html>
|
||||
abstract class ProgressIndicator extends StatefulWidget {
|
||||
/// Creates a progress indicator.
|
||||
///
|
||||
@ -130,7 +130,7 @@ class _LinearProgressIndicatorPainter extends CustomPainter {
|
||||
/// See also:
|
||||
///
|
||||
/// * [CircularProgressIndicator]
|
||||
/// * <https://www.google.com/design/spec/components/progress-activity.html#progress-activity-types-of-indicators>
|
||||
/// * <https://material.google.com/components/progress-activity.html#progress-activity-types-of-indicators>
|
||||
class LinearProgressIndicator extends ProgressIndicator {
|
||||
/// Creates a linear progress indicator.
|
||||
///
|
||||
@ -276,7 +276,7 @@ class _CircularProgressIndicatorPainter extends CustomPainter {
|
||||
/// See also:
|
||||
///
|
||||
/// * [LinearProgressIndicator]
|
||||
/// * <https://www.google.com/design/spec/components/progress-activity.html#progress-activity-types-of-indicators>
|
||||
/// * <https://material.google.com/components/progress-activity.html#progress-activity-types-of-indicators>
|
||||
class CircularProgressIndicator extends ProgressIndicator {
|
||||
/// Creates a circular progress indicator.
|
||||
///
|
||||
|
@ -34,7 +34,7 @@ const double _kInnerRadius = 5.0;
|
||||
/// * [CheckBox]
|
||||
/// * [Slider]
|
||||
/// * [Switch]
|
||||
/// * <https://www.google.com/design/spec/components/selection-controls.html#selection-controls-radio-button>
|
||||
/// * <https://material.google.com/components/selection-controls.html#selection-controls-radio-button>
|
||||
class Radio<T> extends StatefulWidget {
|
||||
/// Creates a material design radio button.
|
||||
///
|
||||
|
@ -31,7 +31,7 @@ import 'theme.dart';
|
||||
/// * [FlatButton]
|
||||
/// * [DropdownButton]
|
||||
/// * [FloatingActionButton]
|
||||
/// * <https://www.google.com/design/spec/components/buttons.html>
|
||||
/// * <https://material.google.com/components/buttons.html>
|
||||
class RaisedButton extends StatelessWidget {
|
||||
/// Creates a raised button.
|
||||
///
|
||||
|
@ -79,7 +79,7 @@ enum _DismissTransition {
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * <https://www.google.com/design/spec/patterns/swipe-to-refresh.html>
|
||||
/// * <https://material.google.com/patterns/swipe-to-refresh.html>
|
||||
/// * [RefreshIndicatorState], can be used to programatically show the refresh indicator.
|
||||
/// * [RefreshProgressIndicator].
|
||||
class RefreshIndicator extends StatefulWidget {
|
||||
|
@ -296,7 +296,7 @@ class _FloatingActionButtonTransitionState extends State<_FloatingActionButtonTr
|
||||
/// * [SnackBar]
|
||||
/// * [BottomSheet]
|
||||
/// * [ScaffoldState]
|
||||
/// * <https://www.google.com/design/spec/layout/structure.html>
|
||||
/// * <https://material.google.com/layout/structure.html>
|
||||
class Scaffold extends StatefulWidget {
|
||||
/// Creates a visual scaffold for material design widgets.
|
||||
///
|
||||
@ -525,7 +525,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
|
||||
///
|
||||
/// * [BottomSheet]
|
||||
/// * [showModalBottomSheet]
|
||||
/// * <https://www.google.com/design/spec/components/bottom-sheets.html#bottom-sheets-persistent-bottom-sheets>
|
||||
/// * <https://material.google.com/components/bottom-sheets.html#bottom-sheets-persistent-bottom-sheets>
|
||||
PersistentBottomSheetController<dynamic/*=T*/> showBottomSheet/*<T>*/(WidgetBuilder builder) {
|
||||
if (_currentBottomSheet != null) {
|
||||
_currentBottomSheet.close();
|
||||
|
@ -6,7 +6,7 @@ import 'dart:ui' show Color, Offset;
|
||||
|
||||
import 'package:flutter/painting.dart';
|
||||
|
||||
// Based on http://www.google.com/design/spec/what-is-material/elevation-shadows.html
|
||||
// Based on http://material.google.com/what-is-material/elevation-shadows.html
|
||||
// Currently, only the elevation values that are bound to one or more widgets are
|
||||
// defined here.
|
||||
|
||||
@ -20,7 +20,7 @@ import 'package:flutter/painting.dart';
|
||||
/// See also:
|
||||
///
|
||||
/// * [Material]
|
||||
/// * <https://www.google.com/design/spec/what-is-material/elevation-shadows.html>
|
||||
/// * <https://material.google.com/what-is-material/elevation-shadows.html>
|
||||
const Map<int, List<BoxShadow>> kElevationToShadow = _elevationToShadow; // to hide the literal from the docs
|
||||
|
||||
const Color _kKeyUmbraOpacity = const Color(0x33000000); // alpha = 0.2
|
||||
|
@ -38,7 +38,7 @@ import 'typography.dart';
|
||||
/// * [CheckBox]
|
||||
/// * [Radio]
|
||||
/// * [Switch]
|
||||
/// * <https://www.google.com/design/spec/components/sliders.html>
|
||||
/// * <https://material.google.com/components/sliders.html>
|
||||
class Slider extends StatefulWidget {
|
||||
/// Creates a material design slider.
|
||||
///
|
||||
|
@ -13,7 +13,7 @@ import 'theme_data.dart';
|
||||
import 'theme.dart';
|
||||
import 'typography.dart';
|
||||
|
||||
// https://www.google.com/design/spec/components/snackbars-toasts.html#snackbars-toasts-specs
|
||||
// https://material.google.com/components/snackbars-toasts.html#snackbars-toasts-specs
|
||||
const double _kSnackBarPadding = 24.0;
|
||||
const double _kSingleLineVerticalPadding = 14.0;
|
||||
const double _kMultiLineVerticalTopPadding = 24.0;
|
||||
@ -42,7 +42,7 @@ const Curve _snackBarFadeCurve = const Interval(0.72, 1.0, curve: Curves.fastOut
|
||||
/// See also:
|
||||
///
|
||||
/// * [SnackBar]
|
||||
/// * <https://www.google.com/design/spec/components/snackbars-toasts.html>
|
||||
/// * <https://material.google.com/components/snackbars-toasts.html>
|
||||
class SnackBarAction extends StatefulWidget {
|
||||
/// Creates an action for a [SnackBar].
|
||||
///
|
||||
@ -99,7 +99,7 @@ class _SnackBarActionState extends State<SnackBarAction> {
|
||||
///
|
||||
/// * [Scaffold.of] and [ScaffoldState.showSnackBar]
|
||||
/// * [SnackBarAction]
|
||||
/// * <https://www.google.com/design/spec/components/snackbars-toasts.html>
|
||||
/// * <https://material.google.com/components/snackbars-toasts.html>
|
||||
class SnackBar extends StatelessWidget {
|
||||
/// Creates a snack bar.
|
||||
///
|
||||
|
@ -31,7 +31,7 @@ import 'toggleable.dart';
|
||||
/// * [CheckBox]
|
||||
/// * [Radio]
|
||||
/// * [Slider]
|
||||
/// * <https://www.google.com/design/spec/components/selection-controls.html#selection-controls-switch>
|
||||
/// * <https://material.google.com/components/selection-controls.html#selection-controls-switch>
|
||||
class Switch extends StatefulWidget {
|
||||
/// Creates a material design switch.
|
||||
///
|
||||
|
@ -23,7 +23,7 @@ import 'theme.dart';
|
||||
|
||||
typedef void _TabLayoutChanged(Size size, List<double> widths);
|
||||
|
||||
// See https://www.google.com/design/spec/components/tabs.html#tabs-specs
|
||||
// See https://material.google.com/components/tabs.html#tabs-specs
|
||||
const double _kTabHeight = 46.0;
|
||||
const double _kTextAndIconTabHeight = 72.0;
|
||||
const double _kTabIndicatorHeight = 2.0;
|
||||
@ -720,7 +720,7 @@ class _TabIndicatorTween extends Tween<Rect> {
|
||||
/// * [TabBarSelection]
|
||||
/// * [TabBarView]
|
||||
/// * [AppBar.tabBar]
|
||||
/// * <https://www.google.com/design/spec/components/tabs.html>
|
||||
/// * <https://material.google.com/components/tabs.html>
|
||||
class TabBar<T> extends Scrollable implements AppBarBottomWidget {
|
||||
/// Creates a widget that displays a horizontal row of tabs, one per label.
|
||||
///
|
||||
@ -1075,7 +1075,7 @@ class _TabBarState<T> extends ScrollableState<TabBar<T>> implements TabBarSelect
|
||||
///
|
||||
/// * [TabBarSelection]
|
||||
/// * [TabBar]
|
||||
/// * <https://www.google.com/design/spec/components/tabs.html>
|
||||
/// * <https://material.google.com/components/tabs.html>
|
||||
class TabBarView<T> extends PageableList {
|
||||
/// Creates a widget that displays the contents of a tab.
|
||||
///
|
||||
|
@ -64,7 +64,7 @@ class ThemeData {
|
||||
/// ([accentColorBrightness]), so that the right contrasting text
|
||||
/// color will be used over the accent color.
|
||||
///
|
||||
/// See <https://www.google.com/design/spec/style/color.html> for
|
||||
/// See <https://material.google.com/style/color.html> for
|
||||
/// more discussion on how to pick the right colors.
|
||||
factory ThemeData({
|
||||
Brightness brightness,
|
||||
|
@ -726,7 +726,7 @@ class _TimePickerDialogState extends State<_TimePickerDialog> {
|
||||
/// See also:
|
||||
///
|
||||
/// * [showDatePicker]
|
||||
/// * <https://www.google.com/design/spec/components/pickers.html#pickers-time-pickers>
|
||||
/// * <https://material.google.com/components/pickers.html#pickers-time-pickers>
|
||||
Future<TimeOfDay> showTimePicker({
|
||||
BuildContext context,
|
||||
TimeOfDay initialTime
|
||||
|
@ -32,7 +32,7 @@ const Duration _kShowDuration = const Duration(milliseconds: 1500);
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * <https://www.google.com/design/spec/components/tooltips.html>
|
||||
/// * <https://material.google.com/components/tooltips.html>
|
||||
class Tooltip extends StatefulWidget {
|
||||
/// Creates a tooltip.
|
||||
///
|
||||
|
@ -25,7 +25,7 @@ import 'colors.dart';
|
||||
/// * [Typography]
|
||||
/// * [Theme]
|
||||
/// * [ThemeData]
|
||||
/// * <http://www.google.com/design/spec/style/typography.html>
|
||||
/// * <http://material.google.com/style/typography.html>
|
||||
class TextTheme {
|
||||
/// Create a text theme that uses the given values.
|
||||
///
|
||||
@ -267,7 +267,7 @@ class TextTheme {
|
||||
///
|
||||
/// * [Theme]
|
||||
/// * [ThemeData]
|
||||
/// * <http://www.google.com/design/spec/style/typography.html>
|
||||
/// * <http://material.google.com/style/typography.html>
|
||||
class Typography {
|
||||
Typography._();
|
||||
|
||||
|
@ -23,7 +23,7 @@ import 'debug.dart';
|
||||
///
|
||||
/// * [Drawer]
|
||||
/// * [DrawerHeader], for a drawer header that doesn't show user acounts
|
||||
/// * <https://www.google.com/design/spec/patterns/navigation-drawer.html>
|
||||
/// * <https://material.google.com/patterns/navigation-drawer.html>
|
||||
class UserAccountsDrawerHeader extends StatefulWidget {
|
||||
/// Creates a material design drawer header.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user