Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d759197d
Unverified
Commit
d759197d
authored
Jun 06, 2019
by
LongCatIsLooong
Committed by
GitHub
Jun 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add scrollbars to Gallery (#33634)
parent
23174c34
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
553 additions
and
525 deletions
+553
-525
colors_demo.dart
examples/flutter_gallery/lib/demo/colors_demo.dart
+5
-3
cupertino_alert_demo.dart
...tter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart
+125
-123
cupertino_navigation_demo.dart
...gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
+6
-4
cupertino_text_field_demo.dart
...gallery/lib/demo/cupertino/cupertino_text_field_demo.dart
+20
-18
backdrop_demo.dart
...ples/flutter_gallery/lib/demo/material/backdrop_demo.dart
+35
-33
bottom_app_bar_demo.dart
...lutter_gallery/lib/demo/material/bottom_app_bar_demo.dart
+23
-21
cards_demo.dart
examples/flutter_gallery/lib/demo/material/cards_demo.dart
+23
-21
chip_demo.dart
examples/flutter_gallery/lib/demo/material/chip_demo.dart
+1
-1
data_table_demo.dart
...es/flutter_gallery/lib/demo/material/data_table_demo.dart
+58
-56
elevation_demo.dart
...les/flutter_gallery/lib/demo/material/elevation_demo.dart
+1
-3
expansion_tile_list_demo.dart
...r_gallery/lib/demo/material/expansion_tile_list_demo.dart
+18
-16
full_screen_dialog_demo.dart
...er_gallery/lib/demo/material/full_screen_dialog_demo.dart
+82
-80
icons_demo.dart
examples/flutter_gallery/lib/demo/material/icons_demo.dart
+9
-7
leave_behind_demo.dart
.../flutter_gallery/lib/demo/material/leave_behind_demo.dart
+12
-10
overscroll_demo.dart
...es/flutter_gallery/lib/demo/material/overscroll_demo.dart
+14
-12
text_form_field_demo.dart
...utter_gallery/lib/demo/material/text_form_field_demo.dart
+105
-103
typography_demo.dart
examples/flutter_gallery/lib/demo/typography_demo.dart
+1
-1
video_demo.dart
examples/flutter_gallery/lib/demo/video_demo.dart
+15
-13
No files found.
examples/flutter_gallery/lib/demo/colors_demo.dart
View file @
d759197d
...
...
@@ -115,9 +115,11 @@ class PaletteTabView extends StatelessWidget {
}).
toList
());
}
return
ListView
(
return
Scrollbar
(
child:
ListView
(
itemExtent:
kColorItemHeight
,
children:
colorItems
,
)
);
}
}
...
...
examples/flutter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart
View file @
d759197d
...
...
@@ -54,7 +54,8 @@ class _CupertinoAlertDemoState extends State<CupertinoAlertDemo> {
child:
Builder
(
builder:
(
BuildContext
context
)
{
final
List
<
Widget
>
stackChildren
=
<
Widget
>[
ListView
(
CupertinoScrollbar
(
child:
ListView
(
// Add more padding to the normal safe area.
padding:
const
EdgeInsets
.
symmetric
(
vertical:
24.0
,
horizontal:
72.0
)
+
MediaQuery
.
of
(
context
).
padding
,
...
...
@@ -185,6 +186,7 @@ class _CupertinoAlertDemoState extends State<CupertinoAlertDemo> {
),
],
),
),
];
if
(
lastSelectedValue
!=
null
)
{
...
...
examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
View file @
d759197d
...
...
@@ -430,11 +430,13 @@ class CupertinoDemoTab2 extends StatelessWidget {
navigationBar:
CupertinoNavigationBar
(
trailing:
trailingButtons
,
),
child:
CupertinoScrollbar
(
child:
ListView
(
children:
<
Widget
>[
Tab2Header
(),
]..
addAll
(
buildTab2Conversation
()),
),
),
);
}
}
...
...
examples/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart
View file @
d759197d
...
...
@@ -166,6 +166,7 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
previousPageTitle:
'Cupertino'
,
middle:
Text
(
'Text Fields'
),
),
child:
CupertinoScrollbar
(
child:
ListView
(
children:
<
Widget
>[
Padding
(
...
...
@@ -187,6 +188,7 @@ class _CupertinoTextFieldDemoState extends State<CupertinoTextFieldDemo> {
],
),
),
),
);
}
}
examples/flutter_gallery/lib/demo/material/backdrop_demo.dart
View file @
d759197d
...
...
@@ -102,7 +102,8 @@ class CategoryView extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
final
ThemeData
theme
=
Theme
.
of
(
context
);
return
ListView
(
return
Scrollbar
(
child:
ListView
(
key:
PageStorageKey
<
Category
>(
category
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
16.0
,
...
...
@@ -139,6 +140,7 @@ class CategoryView extends StatelessWidget {
],
);
}).
toList
(),
)
);
}
}
...
...
examples/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart
View file @
d759197d
...
...
@@ -156,7 +156,8 @@ class _BottomAppBarDemoState extends State<BottomAppBarDemo> {
),
],
),
body:
ListView
(
body:
Scrollbar
(
child:
ListView
(
padding:
const
EdgeInsets
.
only
(
bottom:
88.0
),
children:
<
Widget
>[
const
_Heading
(
'FAB Shape'
),
...
...
@@ -185,6 +186,7 @@ class _BottomAppBarDemoState extends State<BottomAppBarDemo> {
_ColorsItem
(
kBabColors
,
_babColor
,
_onBabColorChanged
),
],
),
),
floatingActionButton:
_fabShape
.
value
,
floatingActionButtonLocation:
_fabLocation
.
value
,
bottomNavigationBar:
_DemoBottomAppBar
(
...
...
examples/flutter_gallery/lib/demo/material/cards_demo.dart
View file @
d759197d
...
...
@@ -388,7 +388,8 @@ class _CardsDemoState extends State<CardsDemo> {
),
],
),
body:
ListView
(
body:
Scrollbar
(
child:
ListView
(
padding:
const
EdgeInsets
.
only
(
top:
8.0
,
left:
8.0
,
right:
8.0
),
children:
destinations
.
map
<
Widget
>((
TravelDestination
destination
)
{
Widget
child
;
...
...
@@ -410,6 +411,7 @@ class _CardsDemoState extends State<CardsDemo> {
);
}).
toList
(),
),
),
);
}
}
examples/flutter_gallery/lib/demo/material/chip_demo.dart
View file @
d759197d
...
...
@@ -324,7 +324,7 @@ class _ChipDemoState extends State<ChipDemo> {
borderRadius:
BorderRadius
.
circular
(
10.0
),
))
:
theme
.
chipTheme
,
child:
ListView
(
children:
tiles
),
child:
Scrollbar
(
child:
ListView
(
children:
tiles
)
),
),
floatingActionButton:
FloatingActionButton
(
onPressed:
()
=>
setState
(
_reset
),
...
...
examples/flutter_gallery/lib/demo/material/data_table_demo.dart
View file @
d759197d
...
...
@@ -172,7 +172,8 @@ class _DataTableDemoState extends State<DataTableDemo> {
MaterialDemoDocumentationButton
(
DataTableDemo
.
routeName
),
],
),
body:
ListView
(
body:
Scrollbar
(
child:
ListView
(
padding:
const
EdgeInsets
.
all
(
20.0
),
children:
<
Widget
>[
PaginatedDataTable
(
...
...
@@ -229,6 +230,7 @@ class _DataTableDemoState extends State<DataTableDemo> {
),
],
),
),
);
}
}
examples/flutter_gallery/lib/demo/material/elevation_demo.dart
View file @
d759197d
...
...
@@ -57,9 +57,7 @@ class _ElevationDemoState extends State<ElevationDemo> {
),
],
),
body:
ListView
(
children:
buildCards
(),
),
body:
Scrollbar
(
child:
ListView
(
children:
buildCards
())),
);
}
}
examples/flutter_gallery/lib/demo/material/expansion_tile_list_demo.dart
View file @
d759197d
...
...
@@ -16,7 +16,8 @@ class ExpansionTileListDemo extends StatelessWidget {
title:
const
Text
(
'Expand/collapse list control'
),
actions:
<
Widget
>[
MaterialDemoDocumentationButton
(
routeName
)],
),
body:
ListView
(
body:
Scrollbar
(
child:
ListView
(
children:
<
Widget
>[
const
ListTile
(
title:
Text
(
'Top'
)),
ExpansionTile
(
...
...
@@ -33,6 +34,7 @@ class ExpansionTileListDemo extends StatelessWidget {
const
ListTile
(
title:
Text
(
'Bottom'
)),
],
),
),
);
}
}
examples/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart
View file @
d759197d
...
...
@@ -162,6 +162,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
),
body:
Form
(
onWillPop:
_onWillPop
,
child:
Scrollbar
(
child:
ListView
(
padding:
const
EdgeInsets
.
all
(
16.0
),
children:
<
Widget
>[
...
...
@@ -261,6 +262,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
.
toList
(),
),
),
),
);
}
}
examples/flutter_gallery/lib/demo/material/icons_demo.dart
View file @
d759197d
...
...
@@ -58,6 +58,7 @@ class IconsDemoState extends State<IconsDemo> {
child:
SafeArea
(
top:
false
,
bottom:
false
,
child:
Scrollbar
(
child:
ListView
(
padding:
const
EdgeInsets
.
all
(
24.0
),
children:
<
Widget
>[
...
...
@@ -68,6 +69,7 @@ class IconsDemoState extends State<IconsDemo> {
),
),
),
),
);
}
}
...
...
examples/flutter_gallery/lib/demo/material/leave_behind_demo.dart
View file @
d759197d
...
...
@@ -130,7 +130,8 @@ class LeaveBehindDemoState extends State<LeaveBehindDemo> {
),
);
}
else
{
body
=
ListView
(
body
=
Scrollbar
(
child:
ListView
(
children:
leaveBehindItems
.
map
<
Widget
>((
LeaveBehindItem
item
)
{
return
_LeaveBehindListItem
(
confirmDismiss:
_confirmDismiss
,
...
...
@@ -140,6 +141,7 @@ class LeaveBehindDemoState extends State<LeaveBehindDemo> {
dismissDirection:
_dismissDirection
,
);
}).
toList
(),
),
);
}
...
...
examples/flutter_gallery/lib/demo/material/overscroll_demo.dart
View file @
d759197d
...
...
@@ -62,6 +62,7 @@ class OverscrollDemoState extends State<OverscrollDemo> {
body:
RefreshIndicator
(
key:
_refreshIndicatorKey
,
onRefresh:
_handleRefresh
,
child:
Scrollbar
(
child:
ListView
.
builder
(
padding:
kMaterialListPadding
,
itemCount:
_items
.
length
,
...
...
@@ -76,6 +77,7 @@ class OverscrollDemoState extends State<OverscrollDemo> {
},
),
),
),
);
}
}
examples/flutter_gallery/lib/demo/material/text_form_field_demo.dart
View file @
d759197d
...
...
@@ -182,6 +182,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
key:
_formKey
,
autovalidate:
_autovalidate
,
onWillPop:
_warnUserAboutInvalidData
,
child:
Scrollbar
(
child:
SingleChildScrollView
(
dragStartBehavior:
DragStartBehavior
.
down
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16.0
),
...
...
@@ -296,6 +297,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
),
),
),
),
);
}
}
...
...
examples/flutter_gallery/lib/demo/typography_demo.dart
View file @
d759197d
...
...
@@ -73,7 +73,7 @@ class TypographyDemo extends StatelessWidget {
body:
SafeArea
(
top:
false
,
bottom:
false
,
child:
ListView
(
children:
styleItems
),
child:
Scrollbar
(
child:
ListView
(
children:
styleItems
)
),
),
);
}
...
...
examples/flutter_gallery/lib/demo/video_demo.dart
View file @
d759197d
...
...
@@ -405,6 +405,7 @@ class _VideoDemoState extends State<VideoDemo> with SingleTickerProviderStateMix
),
body:
isSupported
?
ConnectivityOverlay
(
child:
Scrollbar
(
child:
ListView
(
children:
<
Widget
>[
VideoCard
(
...
...
@@ -419,6 +420,7 @@ class _VideoDemoState extends State<VideoDemo> with SingleTickerProviderStateMix
),
],
),
),
connectedCompleter:
connectedCompleter
,
scaffoldKey:
scaffoldKey
,
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment