mirror of
https://github.com/flutter/samples.git
synced 2026-03-22 04:17:50 +00:00
[Gallery] Implement Material Data table demo (#262)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -26,6 +26,7 @@ import 'package:gallery/demos/material/bottom_sheet_demo.dart';
|
||||
import 'package:gallery/demos/material/button_demo.dart';
|
||||
import 'package:gallery/demos/material/cards_demo.dart';
|
||||
import 'package:gallery/demos/material/chip_demo.dart';
|
||||
import 'package:gallery/demos/material/data_table_demo.dart';
|
||||
import 'package:gallery/demos/material/dialog_demo.dart';
|
||||
import 'package:gallery/demos/material/grid_list_demo.dart';
|
||||
import 'package:gallery/demos/material/list_demo.dart';
|
||||
@@ -88,8 +89,7 @@ List<GalleryDemo> materialDemos(BuildContext context) {
|
||||
GalleryDemoConfiguration(
|
||||
title: localizations.demoBannerTitle,
|
||||
description: localizations.demoBannerDescription,
|
||||
documentationUrl:
|
||||
'https://api.flutter.dev/flutter/material/MaterialBanner-class.html',
|
||||
documentationUrl: '$_docsBaseUrl/material/MaterialBanner-class.html',
|
||||
buildRoute: (_) => BannerDemo(),
|
||||
code: CodeSegments.bannerDemo,
|
||||
),
|
||||
@@ -164,32 +164,28 @@ List<GalleryDemo> materialDemos(BuildContext context) {
|
||||
GalleryDemoConfiguration(
|
||||
title: localizations.demoFlatButtonTitle,
|
||||
description: localizations.demoFlatButtonDescription,
|
||||
documentationUrl:
|
||||
'https://docs.flutter.io/flutter/material/FlatButton-class.html',
|
||||
documentationUrl: '$_docsBaseUrl/material/FlatButton-class.html',
|
||||
buildRoute: (_) => ButtonDemo(type: ButtonDemoType.flat),
|
||||
code: CodeSegments.buttonDemoFlat,
|
||||
),
|
||||
GalleryDemoConfiguration(
|
||||
title: localizations.demoRaisedButtonTitle,
|
||||
description: localizations.demoRaisedButtonDescription,
|
||||
documentationUrl:
|
||||
'https://docs.flutter.io/flutter/material/RaisedButton-class.html',
|
||||
documentationUrl: '$_docsBaseUrl/material/RaisedButton-class.html',
|
||||
buildRoute: (_) => ButtonDemo(type: ButtonDemoType.raised),
|
||||
code: CodeSegments.buttonDemoRaised,
|
||||
),
|
||||
GalleryDemoConfiguration(
|
||||
title: localizations.demoOutlineButtonTitle,
|
||||
description: localizations.demoOutlineButtonDescription,
|
||||
documentationUrl:
|
||||
'https://docs.flutter.io/flutter/material/OutlineButton-class.html',
|
||||
documentationUrl: '$_docsBaseUrl/material/OutlineButton-class.html',
|
||||
buildRoute: (_) => ButtonDemo(type: ButtonDemoType.outline),
|
||||
code: CodeSegments.buttonDemoOutline,
|
||||
),
|
||||
GalleryDemoConfiguration(
|
||||
title: localizations.demoToggleButtonTitle,
|
||||
description: localizations.demoToggleButtonDescription,
|
||||
documentationUrl:
|
||||
'https://docs.flutter.io/flutter/material/ToggleButtons-class.html',
|
||||
documentationUrl: '$_docsBaseUrl/material/ToggleButtons-class.html',
|
||||
buildRoute: (_) => ButtonDemo(type: ButtonDemoType.toggle),
|
||||
code: CodeSegments.buttonDemoToggle,
|
||||
),
|
||||
@@ -197,7 +193,7 @@ List<GalleryDemo> materialDemos(BuildContext context) {
|
||||
title: localizations.demoFloatingButtonTitle,
|
||||
description: localizations.demoFloatingButtonDescription,
|
||||
documentationUrl:
|
||||
'https://docs.flutter.io/flutter/material/FloatingActionButton-class.html',
|
||||
'$_docsBaseUrl/material/FloatingActionButton-class.html',
|
||||
buildRoute: (_) => ButtonDemo(type: ButtonDemoType.floating),
|
||||
code: CodeSegments.buttonDemoFloating,
|
||||
),
|
||||
@@ -211,8 +207,7 @@ List<GalleryDemo> materialDemos(BuildContext context) {
|
||||
GalleryDemoConfiguration(
|
||||
title: GalleryLocalizations.of(context).demoCardTitle,
|
||||
description: GalleryLocalizations.of(context).demoCardDescription,
|
||||
documentationUrl:
|
||||
'https://api.flutter.dev/flutter/material/Card-class.html',
|
||||
documentationUrl: '$_docsBaseUrl/material/Card-class.html',
|
||||
buildRoute: (context) => CardsDemo(),
|
||||
code: CodeSegments.cardsDemo,
|
||||
),
|
||||
@@ -253,6 +248,20 @@ List<GalleryDemo> materialDemos(BuildContext context) {
|
||||
),
|
||||
],
|
||||
),
|
||||
GalleryDemo(
|
||||
title: localizations.demoDataTableTitle,
|
||||
icon: GalleryIcons.dataTable,
|
||||
subtitle: localizations.demoDataTableSubtitle,
|
||||
configurations: [
|
||||
GalleryDemoConfiguration(
|
||||
title: localizations.demoDataTableTitle,
|
||||
description: localizations.demoDataTableDescription,
|
||||
documentationUrl: '$_docsBaseUrl/material/DataTable-class.html',
|
||||
buildRoute: (_) => DataTableDemo(),
|
||||
code: CodeSegments.dataTableDemo,
|
||||
),
|
||||
],
|
||||
),
|
||||
GalleryDemo(
|
||||
title: localizations.demoDialogTitle,
|
||||
icon: GalleryIcons.dialogs,
|
||||
|
||||
551
gallery/gallery/lib/demos/material/data_table_demo.dart
Normal file
551
gallery/gallery/lib/demos/material/data_table_demo.dart
Normal file
@@ -0,0 +1,551 @@
|
||||
// Copyright 2019 The Flutter team. 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/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:gallery/data/gallery_options.dart';
|
||||
import 'package:gallery/l10n/gallery_localizations.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
// BEGIN dataTableDemo
|
||||
|
||||
class DataTableDemo extends StatefulWidget {
|
||||
@override
|
||||
_DataTableDemoState createState() => _DataTableDemoState();
|
||||
}
|
||||
|
||||
class _DataTableDemoState extends State<DataTableDemo> {
|
||||
int _rowsPerPage = PaginatedDataTable.defaultRowsPerPage;
|
||||
int _sortColumnIndex;
|
||||
bool _sortAscending = true;
|
||||
_DessertDataSource _dessertsDataSource;
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
if (_dessertsDataSource == null) {
|
||||
_dessertsDataSource = _DessertDataSource(context);
|
||||
}
|
||||
}
|
||||
|
||||
void _sort<T>(
|
||||
Comparable<T> getField(_Dessert d), int columnIndex, bool ascending) {
|
||||
_dessertsDataSource._sort<T>(getField, ascending);
|
||||
setState(() {
|
||||
_sortColumnIndex = columnIndex;
|
||||
_sortAscending = ascending;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final localizations = GalleryLocalizations.of(context);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(localizations.demoDataTableTitle),
|
||||
),
|
||||
body: Scrollbar(
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
children: [
|
||||
PaginatedDataTable(
|
||||
header: Text(localizations.dataTableHeader),
|
||||
rowsPerPage: _rowsPerPage,
|
||||
onRowsPerPageChanged: (value) {
|
||||
setState(() {
|
||||
_rowsPerPage = value;
|
||||
});
|
||||
},
|
||||
sortColumnIndex: _sortColumnIndex,
|
||||
sortAscending: _sortAscending,
|
||||
onSelectAll: _dessertsDataSource._selectAll,
|
||||
columns: [
|
||||
DataColumn(
|
||||
label: Text(localizations.dataTableColumnDessert),
|
||||
onSort: (columnIndex, ascending) =>
|
||||
_sort<String>((d) => d.name, columnIndex, ascending),
|
||||
),
|
||||
DataColumn(
|
||||
label: Text(localizations.dataTableColumnCalories),
|
||||
numeric: true,
|
||||
onSort: (columnIndex, ascending) =>
|
||||
_sort<num>((d) => d.calories, columnIndex, ascending),
|
||||
),
|
||||
DataColumn(
|
||||
label: Text(localizations.dataTableColumnFat),
|
||||
numeric: true,
|
||||
onSort: (columnIndex, ascending) =>
|
||||
_sort<num>((d) => d.fat, columnIndex, ascending),
|
||||
),
|
||||
DataColumn(
|
||||
label: Text(localizations.dataTableColumnCarbs),
|
||||
numeric: true,
|
||||
onSort: (columnIndex, ascending) =>
|
||||
_sort<num>((d) => d.carbs, columnIndex, ascending),
|
||||
),
|
||||
DataColumn(
|
||||
label: Text(localizations.dataTableColumnProtein),
|
||||
numeric: true,
|
||||
onSort: (columnIndex, ascending) =>
|
||||
_sort<num>((d) => d.protein, columnIndex, ascending),
|
||||
),
|
||||
DataColumn(
|
||||
label: Text(localizations.dataTableColumnSodium),
|
||||
numeric: true,
|
||||
onSort: (columnIndex, ascending) =>
|
||||
_sort<num>((d) => d.sodium, columnIndex, ascending),
|
||||
),
|
||||
DataColumn(
|
||||
label: Text(localizations.dataTableColumnCalcium),
|
||||
numeric: true,
|
||||
onSort: (columnIndex, ascending) =>
|
||||
_sort<num>((d) => d.calcium, columnIndex, ascending),
|
||||
),
|
||||
DataColumn(
|
||||
label: Text(localizations.dataTableColumnIron),
|
||||
numeric: true,
|
||||
onSort: (columnIndex, ascending) =>
|
||||
_sort<num>((d) => d.iron, columnIndex, ascending),
|
||||
),
|
||||
],
|
||||
source: _dessertsDataSource,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _Dessert {
|
||||
_Dessert(this.name, this.calories, this.fat, this.carbs, this.protein,
|
||||
this.sodium, this.calcium, this.iron);
|
||||
final String name;
|
||||
final int calories;
|
||||
final double fat;
|
||||
final int carbs;
|
||||
final double protein;
|
||||
final int sodium;
|
||||
final int calcium;
|
||||
final int iron;
|
||||
|
||||
bool selected = false;
|
||||
}
|
||||
|
||||
class _DessertDataSource extends DataTableSource {
|
||||
_DessertDataSource(this.context) {
|
||||
final localizations = GalleryLocalizations.of(context);
|
||||
_desserts = <_Dessert>[
|
||||
_Dessert(
|
||||
localizations.dataTableRowFrozenYogurt,
|
||||
159,
|
||||
6.0,
|
||||
24,
|
||||
4.0,
|
||||
87,
|
||||
14,
|
||||
1,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowIceCreamSandwich,
|
||||
237,
|
||||
9.0,
|
||||
37,
|
||||
4.3,
|
||||
129,
|
||||
8,
|
||||
1,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowEclair,
|
||||
262,
|
||||
16.0,
|
||||
24,
|
||||
6.0,
|
||||
337,
|
||||
6,
|
||||
7,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowCupcake,
|
||||
305,
|
||||
3.7,
|
||||
67,
|
||||
4.3,
|
||||
413,
|
||||
3,
|
||||
8,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowGingerbread,
|
||||
356,
|
||||
16.0,
|
||||
49,
|
||||
3.9,
|
||||
327,
|
||||
7,
|
||||
16,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowJellyBean,
|
||||
375,
|
||||
0.0,
|
||||
94,
|
||||
0.0,
|
||||
50,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowLollipop,
|
||||
392,
|
||||
0.2,
|
||||
98,
|
||||
0.0,
|
||||
38,
|
||||
0,
|
||||
2,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowHoneycomb,
|
||||
408,
|
||||
3.2,
|
||||
87,
|
||||
6.5,
|
||||
562,
|
||||
0,
|
||||
45,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowDonut,
|
||||
452,
|
||||
25.0,
|
||||
51,
|
||||
4.9,
|
||||
326,
|
||||
2,
|
||||
22,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowApplePie,
|
||||
518,
|
||||
26.0,
|
||||
65,
|
||||
7.0,
|
||||
54,
|
||||
12,
|
||||
6,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithSugar(
|
||||
localizations.dataTableRowFrozenYogurt,
|
||||
),
|
||||
168,
|
||||
6.0,
|
||||
26,
|
||||
4.0,
|
||||
87,
|
||||
14,
|
||||
1,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithSugar(
|
||||
localizations.dataTableRowIceCreamSandwich,
|
||||
),
|
||||
246,
|
||||
9.0,
|
||||
39,
|
||||
4.3,
|
||||
129,
|
||||
8,
|
||||
1,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithSugar(
|
||||
localizations.dataTableRowEclair,
|
||||
),
|
||||
271,
|
||||
16.0,
|
||||
26,
|
||||
6.0,
|
||||
337,
|
||||
6,
|
||||
7,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithSugar(
|
||||
localizations.dataTableRowCupcake,
|
||||
),
|
||||
314,
|
||||
3.7,
|
||||
69,
|
||||
4.3,
|
||||
413,
|
||||
3,
|
||||
8,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithSugar(
|
||||
localizations.dataTableRowGingerbread,
|
||||
),
|
||||
345,
|
||||
16.0,
|
||||
51,
|
||||
3.9,
|
||||
327,
|
||||
7,
|
||||
16,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithSugar(
|
||||
localizations.dataTableRowJellyBean,
|
||||
),
|
||||
364,
|
||||
0.0,
|
||||
96,
|
||||
0.0,
|
||||
50,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithSugar(
|
||||
localizations.dataTableRowLollipop,
|
||||
),
|
||||
401,
|
||||
0.2,
|
||||
100,
|
||||
0.0,
|
||||
38,
|
||||
0,
|
||||
2,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithSugar(
|
||||
localizations.dataTableRowHoneycomb,
|
||||
),
|
||||
417,
|
||||
3.2,
|
||||
89,
|
||||
6.5,
|
||||
562,
|
||||
0,
|
||||
45,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithSugar(
|
||||
localizations.dataTableRowDonut,
|
||||
),
|
||||
461,
|
||||
25.0,
|
||||
53,
|
||||
4.9,
|
||||
326,
|
||||
2,
|
||||
22,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithSugar(
|
||||
localizations.dataTableRowApplePie,
|
||||
),
|
||||
527,
|
||||
26.0,
|
||||
67,
|
||||
7.0,
|
||||
54,
|
||||
12,
|
||||
6,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithHoney(
|
||||
localizations.dataTableRowFrozenYogurt,
|
||||
),
|
||||
223,
|
||||
6.0,
|
||||
36,
|
||||
4.0,
|
||||
87,
|
||||
14,
|
||||
1,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithHoney(
|
||||
localizations.dataTableRowIceCreamSandwich,
|
||||
),
|
||||
301,
|
||||
9.0,
|
||||
49,
|
||||
4.3,
|
||||
129,
|
||||
8,
|
||||
1,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithHoney(
|
||||
localizations.dataTableRowEclair,
|
||||
),
|
||||
326,
|
||||
16.0,
|
||||
36,
|
||||
6.0,
|
||||
337,
|
||||
6,
|
||||
7,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithHoney(
|
||||
localizations.dataTableRowCupcake,
|
||||
),
|
||||
369,
|
||||
3.7,
|
||||
79,
|
||||
4.3,
|
||||
413,
|
||||
3,
|
||||
8,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithHoney(
|
||||
localizations.dataTableRowGingerbread,
|
||||
),
|
||||
420,
|
||||
16.0,
|
||||
61,
|
||||
3.9,
|
||||
327,
|
||||
7,
|
||||
16,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithHoney(
|
||||
localizations.dataTableRowJellyBean,
|
||||
),
|
||||
439,
|
||||
0.0,
|
||||
106,
|
||||
0.0,
|
||||
50,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithHoney(
|
||||
localizations.dataTableRowLollipop,
|
||||
),
|
||||
456,
|
||||
0.2,
|
||||
110,
|
||||
0.0,
|
||||
38,
|
||||
0,
|
||||
2,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithHoney(
|
||||
localizations.dataTableRowHoneycomb,
|
||||
),
|
||||
472,
|
||||
3.2,
|
||||
99,
|
||||
6.5,
|
||||
562,
|
||||
0,
|
||||
45,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithHoney(
|
||||
localizations.dataTableRowDonut,
|
||||
),
|
||||
516,
|
||||
25.0,
|
||||
63,
|
||||
4.9,
|
||||
326,
|
||||
2,
|
||||
22,
|
||||
),
|
||||
_Dessert(
|
||||
localizations.dataTableRowWithHoney(
|
||||
localizations.dataTableRowApplePie,
|
||||
),
|
||||
582,
|
||||
26.0,
|
||||
77,
|
||||
7.0,
|
||||
54,
|
||||
12,
|
||||
6,
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
final BuildContext context;
|
||||
List<_Dessert> _desserts;
|
||||
|
||||
void _sort<T>(Comparable<T> getField(_Dessert d), bool ascending) {
|
||||
_desserts.sort((a, b) {
|
||||
final Comparable<T> aValue = getField(a);
|
||||
final Comparable<T> bValue = getField(b);
|
||||
return ascending
|
||||
? Comparable.compare(aValue, bValue)
|
||||
: Comparable.compare(bValue, aValue);
|
||||
});
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
int _selectedCount = 0;
|
||||
|
||||
@override
|
||||
DataRow getRow(int index) {
|
||||
final format = NumberFormat.decimalPercentPattern(
|
||||
locale: GalleryOptions.of(context).locale.toString(),
|
||||
decimalDigits: 0,
|
||||
);
|
||||
assert(index >= 0);
|
||||
if (index >= _desserts.length) return null;
|
||||
final _Dessert dessert = _desserts[index];
|
||||
return DataRow.byIndex(
|
||||
index: index,
|
||||
selected: dessert.selected,
|
||||
onSelectChanged: (value) {
|
||||
if (dessert.selected != value) {
|
||||
_selectedCount += value ? 1 : -1;
|
||||
assert(_selectedCount >= 0);
|
||||
dessert.selected = value;
|
||||
notifyListeners();
|
||||
}
|
||||
},
|
||||
cells: [
|
||||
DataCell(Text(dessert.name)),
|
||||
DataCell(Text('${dessert.calories}')),
|
||||
DataCell(Text(dessert.fat.toStringAsFixed(1))),
|
||||
DataCell(Text('${dessert.carbs}')),
|
||||
DataCell(Text(dessert.protein.toStringAsFixed(1))),
|
||||
DataCell(Text('${dessert.sodium}')),
|
||||
DataCell(Text('${format.format(dessert.calcium / 100)}')),
|
||||
DataCell(Text('${format.format(dessert.iron / 100)}')),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
int get rowCount => _desserts.length;
|
||||
|
||||
@override
|
||||
bool get isRowCountApproximate => false;
|
||||
|
||||
@override
|
||||
int get selectedRowCount => _selectedCount;
|
||||
|
||||
void _selectAll(bool checked) {
|
||||
for (final _Dessert dessert in _desserts) {
|
||||
dessert.selected = checked;
|
||||
}
|
||||
_selectedCount = checked ? _desserts.length : 0;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
// END
|
||||
@@ -1385,6 +1385,157 @@ class GalleryLocalizations {
|
||||
desc: r'Title for the profile tab in the bottom tab bar demo.');
|
||||
}
|
||||
|
||||
String get dataTableColumnCalcium {
|
||||
return Intl.message('Calcium (%)',
|
||||
locale: _localeName,
|
||||
name: 'dataTableColumnCalcium',
|
||||
desc: r'Column header for daily percentage of calcium.');
|
||||
}
|
||||
|
||||
String get dataTableColumnCalories {
|
||||
return Intl.message('Calories',
|
||||
locale: _localeName,
|
||||
name: 'dataTableColumnCalories',
|
||||
desc: r'Column header for number of calories.');
|
||||
}
|
||||
|
||||
String get dataTableColumnCarbs {
|
||||
return Intl.message('Carbs (g)',
|
||||
locale: _localeName,
|
||||
name: 'dataTableColumnCarbs',
|
||||
desc: r'Column header for number of grams of carbs.');
|
||||
}
|
||||
|
||||
String get dataTableColumnDessert {
|
||||
return Intl.message('Dessert (1 serving)',
|
||||
locale: _localeName,
|
||||
name: 'dataTableColumnDessert',
|
||||
desc: r'Column header for desserts.');
|
||||
}
|
||||
|
||||
String get dataTableColumnFat {
|
||||
return Intl.message('Fat (g)',
|
||||
locale: _localeName,
|
||||
name: 'dataTableColumnFat',
|
||||
desc: r'Column header for number of grams of fat.');
|
||||
}
|
||||
|
||||
String get dataTableColumnIron {
|
||||
return Intl.message('Iron (%)',
|
||||
locale: _localeName,
|
||||
name: 'dataTableColumnIron',
|
||||
desc: r'Column header for daily percentage of iron.');
|
||||
}
|
||||
|
||||
String get dataTableColumnProtein {
|
||||
return Intl.message('Protein (g)',
|
||||
locale: _localeName,
|
||||
name: 'dataTableColumnProtein',
|
||||
desc: r'Column header for number of grams of protein.');
|
||||
}
|
||||
|
||||
String get dataTableColumnSodium {
|
||||
return Intl.message('Sodium (mg)',
|
||||
locale: _localeName,
|
||||
name: 'dataTableColumnSodium',
|
||||
desc: r'Column header for number of milligrams of sodium.');
|
||||
}
|
||||
|
||||
String get dataTableHeader {
|
||||
return Intl.message('Nutrition',
|
||||
locale: _localeName,
|
||||
name: 'dataTableHeader',
|
||||
desc: r'Header for the data table component demo about nutrition.');
|
||||
}
|
||||
|
||||
String get dataTableRowApplePie {
|
||||
return Intl.message('Apple pie',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowApplePie',
|
||||
desc: r'Column row for Apple pie.');
|
||||
}
|
||||
|
||||
String get dataTableRowCupcake {
|
||||
return Intl.message('Cupcake',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowCupcake',
|
||||
desc: r'Column row for Cupcake.');
|
||||
}
|
||||
|
||||
String get dataTableRowDonut {
|
||||
return Intl.message('Donut',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowDonut',
|
||||
desc: r'Column row for Donut.');
|
||||
}
|
||||
|
||||
String get dataTableRowEclair {
|
||||
return Intl.message('Eclair',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowEclair',
|
||||
desc: r'Column row for Eclair.');
|
||||
}
|
||||
|
||||
String get dataTableRowFrozenYogurt {
|
||||
return Intl.message('Frozen yogurt',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowFrozenYogurt',
|
||||
desc: r'Column row for frozen yogurt.');
|
||||
}
|
||||
|
||||
String get dataTableRowGingerbread {
|
||||
return Intl.message('Gingerbread',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowGingerbread',
|
||||
desc: r'Column row for Gingerbread.');
|
||||
}
|
||||
|
||||
String get dataTableRowHoneycomb {
|
||||
return Intl.message('Honeycomb',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowHoneycomb',
|
||||
desc: r'Column row for Honeycomb.');
|
||||
}
|
||||
|
||||
String get dataTableRowIceCreamSandwich {
|
||||
return Intl.message('Ice cream sandwich',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowIceCreamSandwich',
|
||||
desc: r'Column row for Ice cream sandwich.');
|
||||
}
|
||||
|
||||
String get dataTableRowJellyBean {
|
||||
return Intl.message('Jelly bean',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowJellyBean',
|
||||
desc: r'Column row for Jelly bean.');
|
||||
}
|
||||
|
||||
String get dataTableRowLollipop {
|
||||
return Intl.message('Lollipop',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowLollipop',
|
||||
desc: r'Column row for Lollipop.');
|
||||
}
|
||||
|
||||
String dataTableRowWithHoney(Object value) {
|
||||
return Intl.message('$value with honey',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowWithHoney',
|
||||
desc:
|
||||
r'A dessert with honey on it. The parameter is some type of dessert.',
|
||||
args: <Object>[value]);
|
||||
}
|
||||
|
||||
String dataTableRowWithSugar(Object value) {
|
||||
return Intl.message('$value with sugar',
|
||||
locale: _localeName,
|
||||
name: 'dataTableRowWithSugar',
|
||||
desc:
|
||||
r'A dessert with sugar on it. The parameter is some type of dessert.',
|
||||
args: <Object>[value]);
|
||||
}
|
||||
|
||||
String get demoActionChipDescription {
|
||||
return Intl.message(
|
||||
'Action chips are a set of options which trigger an action related to primary content. Action chips should appear dynamically and contextually in a UI.',
|
||||
@@ -2083,6 +2234,28 @@ class GalleryLocalizations {
|
||||
desc: r'Title for the custom sliders component demo.');
|
||||
}
|
||||
|
||||
String get demoDataTableDescription {
|
||||
return Intl.message(
|
||||
'Data tables display information in a grid-like format of rows and columns. They organize information in a way that’s easy to scan, so that users can look for patterns and insights.',
|
||||
locale: _localeName,
|
||||
name: 'demoDataTableDescription',
|
||||
desc: r'Description for the material data table component demo.');
|
||||
}
|
||||
|
||||
String get demoDataTableSubtitle {
|
||||
return Intl.message('Rows and columns of information',
|
||||
locale: _localeName,
|
||||
name: 'demoDataTableSubtitle',
|
||||
desc: r'Subtitle for the material data table component demo.');
|
||||
}
|
||||
|
||||
String get demoDataTableTitle {
|
||||
return Intl.message('Data Tables',
|
||||
locale: _localeName,
|
||||
name: 'demoDataTableTitle',
|
||||
desc: r'Title for the material data table component demo.');
|
||||
}
|
||||
|
||||
String get demoDatePickerDescription {
|
||||
return Intl.message(
|
||||
'Shows a dialog containing a Material Design date picker.',
|
||||
|
||||
@@ -699,6 +699,112 @@
|
||||
"@demoInputChipDescription": {
|
||||
"description": "Description for the input chip component demo."
|
||||
},
|
||||
"demoDataTableTitle": "Data Tables",
|
||||
"@demoDataTableTitle": {
|
||||
"description": "Title for the material data table component demo."
|
||||
},
|
||||
"demoDataTableSubtitle": "Rows and columns of information",
|
||||
"@demoDataTableSubtitle": {
|
||||
"description": "Subtitle for the material data table component demo."
|
||||
},
|
||||
"demoDataTableDescription": "Data tables display information in a grid-like format of rows and columns. They organize information in a way that’s easy to scan, so that users can look for patterns and insights.",
|
||||
"@demoDataTableDescription": {
|
||||
"description": "Description for the material data table component demo."
|
||||
},
|
||||
"dataTableHeader": "Nutrition",
|
||||
"@dataTableHeader": {
|
||||
"description": "Header for the data table component demo about nutrition."
|
||||
},
|
||||
"dataTableColumnDessert": "Dessert (1 serving)",
|
||||
"@dataTableColumnDessert": {
|
||||
"description": "Column header for desserts."
|
||||
},
|
||||
"dataTableColumnCalories": "Calories",
|
||||
"@dataTableColumnCalories": {
|
||||
"description": "Column header for number of calories."
|
||||
},
|
||||
"dataTableColumnFat": "Fat (g)",
|
||||
"@dataTableColumnFat": {
|
||||
"description": "Column header for number of grams of fat."
|
||||
},
|
||||
"dataTableColumnCarbs": "Carbs (g)",
|
||||
"@dataTableColumnCarbs": {
|
||||
"description": "Column header for number of grams of carbs."
|
||||
},
|
||||
"dataTableColumnProtein": "Protein (g)",
|
||||
"@dataTableColumnProtein": {
|
||||
"description": "Column header for number of grams of protein."
|
||||
},
|
||||
"dataTableColumnSodium": "Sodium (mg)",
|
||||
"@dataTableColumnSodium": {
|
||||
"description": "Column header for number of milligrams of sodium."
|
||||
},
|
||||
"dataTableColumnCalcium": "Calcium (%)",
|
||||
"@dataTableColumnCalcium": {
|
||||
"description": "Column header for daily percentage of calcium."
|
||||
},
|
||||
"dataTableColumnIron": "Iron (%)",
|
||||
"@dataTableColumnIron": {
|
||||
"description": "Column header for daily percentage of iron."
|
||||
},
|
||||
"dataTableRowFrozenYogurt": "Frozen yogurt",
|
||||
"@dataTableRowFrozenYogurt": {
|
||||
"description": "Column row for frozen yogurt."
|
||||
},
|
||||
"dataTableRowIceCreamSandwich": "Ice cream sandwich",
|
||||
"@dataTableRowIceCreamSandwich": {
|
||||
"description": "Column row for Ice cream sandwich."
|
||||
},
|
||||
"dataTableRowEclair": "Eclair",
|
||||
"@dataTableRowEclair": {
|
||||
"description": "Column row for Eclair."
|
||||
},
|
||||
"dataTableRowCupcake": "Cupcake",
|
||||
"@dataTableRowCupcake": {
|
||||
"description": "Column row for Cupcake."
|
||||
},
|
||||
"dataTableRowGingerbread": "Gingerbread",
|
||||
"@dataTableRowGingerbread": {
|
||||
"description": "Column row for Gingerbread."
|
||||
},
|
||||
"dataTableRowJellyBean": "Jelly bean",
|
||||
"@dataTableRowJellyBean": {
|
||||
"description": "Column row for Jelly bean."
|
||||
},
|
||||
"dataTableRowLollipop": "Lollipop",
|
||||
"@dataTableRowLollipop": {
|
||||
"description": "Column row for Lollipop."
|
||||
},
|
||||
"dataTableRowHoneycomb": "Honeycomb",
|
||||
"@dataTableRowHoneycomb": {
|
||||
"description": "Column row for Honeycomb."
|
||||
},
|
||||
"dataTableRowDonut": "Donut",
|
||||
"@dataTableRowDonut": {
|
||||
"description": "Column row for Donut."
|
||||
},
|
||||
"dataTableRowApplePie": "Apple pie",
|
||||
"@dataTableRowApplePie": {
|
||||
"description": "Column row for Apple pie."
|
||||
},
|
||||
"dataTableRowWithSugar": "{value} with sugar",
|
||||
"@dataTableRowWithSugar": {
|
||||
"description": "A dessert with sugar on it. The parameter is some type of dessert.",
|
||||
"placeholders": {
|
||||
"value": {
|
||||
"example": "Apple pie"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataTableRowWithHoney": "{value} with honey",
|
||||
"@dataTableRowWithHoney": {
|
||||
"description": "A dessert with honey on it. The parameter is some type of dessert.",
|
||||
"placeholders": {
|
||||
"value": {
|
||||
"example": "Apple pie"
|
||||
}
|
||||
}
|
||||
},
|
||||
"demoDialogTitle": "Dialogs",
|
||||
"@demoDialogTitle": {
|
||||
"description": "Title for the material dialog component demo."
|
||||
|
||||
@@ -657,6 +657,102 @@
|
||||
name="demoInputChipDescription"
|
||||
description="Description for the input chip component demo."
|
||||
>Input chips represent a complex piece of information, such as an entity (person, place, or thing) or conversational text, in a compact form.</string>
|
||||
<string
|
||||
name="demoDataTableTitle"
|
||||
description="Title for the material data table component demo."
|
||||
>Data Tables</string>
|
||||
<string
|
||||
name="demoDataTableSubtitle"
|
||||
description="Subtitle for the material data table component demo."
|
||||
>Rows and columns of information</string>
|
||||
<string
|
||||
name="demoDataTableDescription"
|
||||
description="Description for the material data table component demo."
|
||||
>Data tables display information in a grid-like format of rows and columns. They organize information in a way that’s easy to scan, so that users can look for patterns and insights.</string>
|
||||
<string
|
||||
name="dataTableHeader"
|
||||
description="Header for the data table component demo about nutrition."
|
||||
>Nutrition</string>
|
||||
<string
|
||||
name="dataTableColumnDessert"
|
||||
description="Column header for desserts."
|
||||
>Dessert (1 serving)</string>
|
||||
<string
|
||||
name="dataTableColumnCalories"
|
||||
description="Column header for number of calories."
|
||||
>Calories</string>
|
||||
<string
|
||||
name="dataTableColumnFat"
|
||||
description="Column header for number of grams of fat."
|
||||
>Fat (g)</string>
|
||||
<string
|
||||
name="dataTableColumnCarbs"
|
||||
description="Column header for number of grams of carbs."
|
||||
>Carbs (g)</string>
|
||||
<string
|
||||
name="dataTableColumnProtein"
|
||||
description="Column header for number of grams of protein."
|
||||
>Protein (g)</string>
|
||||
<string
|
||||
name="dataTableColumnSodium"
|
||||
description="Column header for number of milligrams of sodium."
|
||||
>Sodium (mg)</string>
|
||||
<string
|
||||
name="dataTableColumnCalcium"
|
||||
description="Column header for daily percentage of calcium."
|
||||
>Calcium (%)</string>
|
||||
<string
|
||||
name="dataTableColumnIron"
|
||||
description="Column header for daily percentage of iron."
|
||||
>Iron (%)</string>
|
||||
<string
|
||||
name="dataTableRowFrozenYogurt"
|
||||
description="Column row for frozen yogurt."
|
||||
>Frozen yogurt</string>
|
||||
<string
|
||||
name="dataTableRowIceCreamSandwich"
|
||||
description="Column row for Ice cream sandwich."
|
||||
>Ice cream sandwich</string>
|
||||
<string
|
||||
name="dataTableRowEclair"
|
||||
description="Column row for Eclair."
|
||||
>Eclair</string>
|
||||
<string
|
||||
name="dataTableRowCupcake"
|
||||
description="Column row for Cupcake."
|
||||
>Cupcake</string>
|
||||
<string
|
||||
name="dataTableRowGingerbread"
|
||||
description="Column row for Gingerbread."
|
||||
>Gingerbread</string>
|
||||
<string
|
||||
name="dataTableRowJellyBean"
|
||||
description="Column row for Jelly bean."
|
||||
>Jelly bean</string>
|
||||
<string
|
||||
name="dataTableRowLollipop"
|
||||
description="Column row for Lollipop."
|
||||
>Lollipop</string>
|
||||
<string
|
||||
name="dataTableRowHoneycomb"
|
||||
description="Column row for Honeycomb."
|
||||
>Honeycomb</string>
|
||||
<string
|
||||
name="dataTableRowDonut"
|
||||
description="Column row for Donut."
|
||||
>Donut</string>
|
||||
<string
|
||||
name="dataTableRowApplePie"
|
||||
description="Column row for Apple pie."
|
||||
>Apple pie</string>
|
||||
<string
|
||||
name="dataTableRowWithSugar"
|
||||
description="A dessert with sugar on it. The parameter is some type of dessert."
|
||||
>{value} with sugar</string>
|
||||
<string
|
||||
name="dataTableRowWithHoney"
|
||||
description="A dessert with honey on it. The parameter is some type of dessert."
|
||||
>{value} with honey</string>
|
||||
<string
|
||||
name="demoDialogTitle"
|
||||
description="Title for the material dialog component demo."
|
||||
|
||||
@@ -37,6 +37,10 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
static m4(totalProperties) =>
|
||||
"${Intl.plural(totalProperties, zero: 'No Available Properties', one: '1 Available Properties', other: '${totalProperties} Available Properties')}";
|
||||
|
||||
static m29(value) => "${value} with honey";
|
||||
|
||||
static m30(value) => "${value} with sugar";
|
||||
|
||||
static m5(value) => "Item ${value}";
|
||||
|
||||
static m6(error) => "Failed to copy to clipboard: ${error}";
|
||||
@@ -367,6 +371,40 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"cupertinoTabBarHomeTab": MessageLookupByLibrary.simpleMessage("Home"),
|
||||
"cupertinoTabBarProfileTab":
|
||||
MessageLookupByLibrary.simpleMessage("Profile"),
|
||||
"dataTableColumnCalcium":
|
||||
MessageLookupByLibrary.simpleMessage("Calcium (%)"),
|
||||
"dataTableColumnCalories":
|
||||
MessageLookupByLibrary.simpleMessage("Calories"),
|
||||
"dataTableColumnCarbs":
|
||||
MessageLookupByLibrary.simpleMessage("Carbs (g)"),
|
||||
"dataTableColumnDessert":
|
||||
MessageLookupByLibrary.simpleMessage("Dessert (1 serving)"),
|
||||
"dataTableColumnFat": MessageLookupByLibrary.simpleMessage("Fat (g)"),
|
||||
"dataTableColumnIron": MessageLookupByLibrary.simpleMessage("Iron (%)"),
|
||||
"dataTableColumnProtein":
|
||||
MessageLookupByLibrary.simpleMessage("Protein (g)"),
|
||||
"dataTableColumnSodium":
|
||||
MessageLookupByLibrary.simpleMessage("Sodium (mg)"),
|
||||
"dataTableHeader": MessageLookupByLibrary.simpleMessage("Nutrition"),
|
||||
"dataTableRowApplePie":
|
||||
MessageLookupByLibrary.simpleMessage("Apple pie"),
|
||||
"dataTableRowCupcake": MessageLookupByLibrary.simpleMessage("Cupcake"),
|
||||
"dataTableRowDonut": MessageLookupByLibrary.simpleMessage("Donut"),
|
||||
"dataTableRowEclair": MessageLookupByLibrary.simpleMessage("Eclair"),
|
||||
"dataTableRowFrozenYogurt":
|
||||
MessageLookupByLibrary.simpleMessage("Frozen yogurt"),
|
||||
"dataTableRowGingerbread":
|
||||
MessageLookupByLibrary.simpleMessage("Gingerbread"),
|
||||
"dataTableRowHoneycomb":
|
||||
MessageLookupByLibrary.simpleMessage("Honeycomb"),
|
||||
"dataTableRowIceCreamSandwich":
|
||||
MessageLookupByLibrary.simpleMessage("Ice cream sandwich"),
|
||||
"dataTableRowJellyBean":
|
||||
MessageLookupByLibrary.simpleMessage("Jelly bean"),
|
||||
"dataTableRowLollipop":
|
||||
MessageLookupByLibrary.simpleMessage("Lollipop"),
|
||||
"dataTableRowWithHoney": m29,
|
||||
"dataTableRowWithSugar": m30,
|
||||
"demoActionChipDescription": MessageLookupByLibrary.simpleMessage(
|
||||
"Action chips are a set of options which trigger an action related to primary content. Action chips should appear dynamically and contextually in a UI."),
|
||||
"demoActionChipTitle":
|
||||
@@ -548,6 +586,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"Sliders reflect a range of values along a bar, from which users may select a single value or range of values. The sliders can be themed and customized."),
|
||||
"demoCustomSlidersTitle":
|
||||
MessageLookupByLibrary.simpleMessage("Custom Sliders"),
|
||||
"demoDataTableDescription": MessageLookupByLibrary.simpleMessage(
|
||||
"Data tables display information in a grid-like format of rows and columns. They organize information in a way that’s easy to scan, so that users can look for patterns and insights."),
|
||||
"demoDataTableSubtitle": MessageLookupByLibrary.simpleMessage(
|
||||
"Rows and columns of information"),
|
||||
"demoDataTableTitle":
|
||||
MessageLookupByLibrary.simpleMessage("Data Tables"),
|
||||
"demoDatePickerDescription": MessageLookupByLibrary.simpleMessage(
|
||||
"Shows a dialog containing a Material Design date picker."),
|
||||
"demoDatePickerTitle":
|
||||
|
||||
Reference in New Issue
Block a user