mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
web: dartfmt all files
This commit is contained in:
@@ -41,9 +41,9 @@ void main(List<String> args) {
|
|||||||
_tocTemplate(
|
_tocTemplate(
|
||||||
fileMap.entries.map(
|
fileMap.entries.map(
|
||||||
(entry) => _Demo(
|
(entry) => _Demo(
|
||||||
entry.key,
|
entry.key,
|
||||||
entry.value,
|
entry.value,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
flush: true);
|
flush: true);
|
||||||
|
|||||||
@@ -134,19 +134,19 @@ class ContactsDemoState extends State<ContactsDemo> {
|
|||||||
},
|
},
|
||||||
itemBuilder: (BuildContext context) =>
|
itemBuilder: (BuildContext context) =>
|
||||||
<PopupMenuItem<AppBarBehavior>>[
|
<PopupMenuItem<AppBarBehavior>>[
|
||||||
const PopupMenuItem<AppBarBehavior>(
|
const PopupMenuItem<AppBarBehavior>(
|
||||||
value: AppBarBehavior.normal,
|
value: AppBarBehavior.normal,
|
||||||
child: Text('App bar scrolls away')),
|
child: Text('App bar scrolls away')),
|
||||||
const PopupMenuItem<AppBarBehavior>(
|
const PopupMenuItem<AppBarBehavior>(
|
||||||
value: AppBarBehavior.pinned,
|
value: AppBarBehavior.pinned,
|
||||||
child: Text('App bar stays put')),
|
child: Text('App bar stays put')),
|
||||||
const PopupMenuItem<AppBarBehavior>(
|
const PopupMenuItem<AppBarBehavior>(
|
||||||
value: AppBarBehavior.floating,
|
value: AppBarBehavior.floating,
|
||||||
child: Text('App bar floats')),
|
child: Text('App bar floats')),
|
||||||
const PopupMenuItem<AppBarBehavior>(
|
const PopupMenuItem<AppBarBehavior>(
|
||||||
value: AppBarBehavior.snapping,
|
value: AppBarBehavior.snapping,
|
||||||
child: Text('App bar snaps')),
|
child: Text('App bar snaps')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
flexibleSpace: FlexibleSpaceBar(
|
flexibleSpace: FlexibleSpaceBar(
|
||||||
|
|||||||
@@ -220,15 +220,15 @@ class _BottomNavigationDemoState extends State<BottomNavigationDemo>
|
|||||||
},
|
},
|
||||||
itemBuilder: (BuildContext context) =>
|
itemBuilder: (BuildContext context) =>
|
||||||
<PopupMenuItem<BottomNavigationBarType>>[
|
<PopupMenuItem<BottomNavigationBarType>>[
|
||||||
const PopupMenuItem<BottomNavigationBarType>(
|
const PopupMenuItem<BottomNavigationBarType>(
|
||||||
value: BottomNavigationBarType.fixed,
|
value: BottomNavigationBarType.fixed,
|
||||||
child: Text('Fixed'),
|
child: Text('Fixed'),
|
||||||
),
|
),
|
||||||
const PopupMenuItem<BottomNavigationBarType>(
|
const PopupMenuItem<BottomNavigationBarType>(
|
||||||
value: BottomNavigationBarType.shifting,
|
value: BottomNavigationBarType.shifting,
|
||||||
child: Text('Shifting'),
|
child: Text('Shifting'),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -348,19 +348,19 @@ class GridListDemoState extends State<GridListDemo> {
|
|||||||
onSelected: changeTileStyle,
|
onSelected: changeTileStyle,
|
||||||
itemBuilder: (BuildContext context) =>
|
itemBuilder: (BuildContext context) =>
|
||||||
<PopupMenuItem<GridDemoTileStyle>>[
|
<PopupMenuItem<GridDemoTileStyle>>[
|
||||||
const PopupMenuItem<GridDemoTileStyle>(
|
const PopupMenuItem<GridDemoTileStyle>(
|
||||||
value: GridDemoTileStyle.imageOnly,
|
value: GridDemoTileStyle.imageOnly,
|
||||||
child: Text('Image only'),
|
child: Text('Image only'),
|
||||||
),
|
),
|
||||||
const PopupMenuItem<GridDemoTileStyle>(
|
const PopupMenuItem<GridDemoTileStyle>(
|
||||||
value: GridDemoTileStyle.oneLine,
|
value: GridDemoTileStyle.oneLine,
|
||||||
child: Text('One line'),
|
child: Text('One line'),
|
||||||
),
|
),
|
||||||
const PopupMenuItem<GridDemoTileStyle>(
|
const PopupMenuItem<GridDemoTileStyle>(
|
||||||
value: GridDemoTileStyle.twoLine,
|
value: GridDemoTileStyle.twoLine,
|
||||||
child: Text('Two line'),
|
child: Text('Two line'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -68,13 +68,13 @@ class MenuDemoState extends State<MenuDemo> {
|
|||||||
PopupMenuButton<String>(
|
PopupMenuButton<String>(
|
||||||
onSelected: showMenuSelection,
|
onSelected: showMenuSelection,
|
||||||
itemBuilder: (BuildContext context) => <PopupMenuItem<String>>[
|
itemBuilder: (BuildContext context) => <PopupMenuItem<String>>[
|
||||||
const PopupMenuItem<String>(
|
const PopupMenuItem<String>(
|
||||||
value: 'Toolbar menu', child: Text('Toolbar menu')),
|
value: 'Toolbar menu', child: Text('Toolbar menu')),
|
||||||
const PopupMenuItem<String>(
|
const PopupMenuItem<String>(
|
||||||
value: 'Right here', child: Text('Right here')),
|
value: 'Right here', child: Text('Right here')),
|
||||||
const PopupMenuItem<String>(
|
const PopupMenuItem<String>(
|
||||||
value: 'Hooray!', child: Text('Hooray!')),
|
value: 'Hooray!', child: Text('Hooray!')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -139,15 +139,14 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo>
|
|||||||
onSelected: changeDemoStyle,
|
onSelected: changeDemoStyle,
|
||||||
itemBuilder: (BuildContext context) =>
|
itemBuilder: (BuildContext context) =>
|
||||||
<PopupMenuItem<TabsDemoStyle>>[
|
<PopupMenuItem<TabsDemoStyle>>[
|
||||||
const PopupMenuItem<TabsDemoStyle>(
|
const PopupMenuItem<TabsDemoStyle>(
|
||||||
value: TabsDemoStyle.iconsAndText,
|
value: TabsDemoStyle.iconsAndText,
|
||||||
child: Text('Icons and text')),
|
child: Text('Icons and text')),
|
||||||
const PopupMenuItem<TabsDemoStyle>(
|
const PopupMenuItem<TabsDemoStyle>(
|
||||||
value: TabsDemoStyle.iconsOnly,
|
value: TabsDemoStyle.iconsOnly, child: Text('Icons only')),
|
||||||
child: Text('Icons only')),
|
const PopupMenuItem<TabsDemoStyle>(
|
||||||
const PopupMenuItem<TabsDemoStyle>(
|
value: TabsDemoStyle.textOnly, child: Text('Text only')),
|
||||||
value: TabsDemoStyle.textOnly, child: Text('Text only')),
|
],
|
||||||
],
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
bottom: TabBar(
|
bottom: TabBar(
|
||||||
|
|||||||
@@ -379,11 +379,11 @@ class _RecipePageState extends State<RecipePage> {
|
|||||||
onSelected: (String item) {},
|
onSelected: (String item) {},
|
||||||
itemBuilder: (BuildContext context) =>
|
itemBuilder: (BuildContext context) =>
|
||||||
<PopupMenuItem<String>>[
|
<PopupMenuItem<String>>[
|
||||||
_buildMenuItem(Icons.share, 'Tweet recipe'),
|
_buildMenuItem(Icons.share, 'Tweet recipe'),
|
||||||
_buildMenuItem(Icons.email, 'Email recipe'),
|
_buildMenuItem(Icons.email, 'Email recipe'),
|
||||||
_buildMenuItem(Icons.message, 'Message recipe'),
|
_buildMenuItem(Icons.message, 'Message recipe'),
|
||||||
_buildMenuItem(Icons.people, 'Share on Facebook'),
|
_buildMenuItem(Icons.people, 'Share on Facebook'),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
flexibleSpace: const FlexibleSpaceBar(
|
flexibleSpace: const FlexibleSpaceBar(
|
||||||
|
|||||||
@@ -475,9 +475,9 @@ class _StoreStreamListenerState<S, ViewModel>
|
|||||||
? StreamBuilder<ViewModel>(
|
? StreamBuilder<ViewModel>(
|
||||||
stream: stream,
|
stream: stream,
|
||||||
builder: (context, snapshot) => widget.builder(
|
builder: (context, snapshot) => widget.builder(
|
||||||
context,
|
context,
|
||||||
snapshot.hasData ? snapshot.data : latestValue,
|
snapshot.hasData ? snapshot.data : latestValue,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: widget.builder(context, latestValue);
|
: widget.builder(context, latestValue);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user