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
8328b56e
Unverified
Commit
8328b56e
authored
Nov 02, 2020
by
Abdullah Deshmukh
Committed by
GitHub
Nov 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AdoptAWidget: Dismissible (#69535)
parent
ee5c080d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
dismissible.dart
packages/flutter/lib/src/widgets/dismissible.dart
+35
-0
No files found.
packages/flutter/lib/src/widgets/dismissible.dart
View file @
8328b56e
...
...
@@ -62,6 +62,41 @@ enum DismissDirection {
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=iEMgjrfuc58}
///
/// {@tool dartpad --template=stateful_widget_scaffold}
///
/// This sample shows how you can use the [Dismissible] widget to
/// remove list items using swipe gestures.
///
/// ```dart
/// List<int> items = List<int>.generate(100, (index) => index);
///
/// Widget build(BuildContext context) {
/// return ListView.builder(
/// itemCount: items.length,
/// padding: const EdgeInsets.symmetric(vertical: 16),
/// itemBuilder: (BuildContext context, int index) {
/// return Dismissible(
/// child: ListTile(
/// title: Text(
/// 'Item ${items[index]}',
/// ),
/// ),
/// background: Container(
/// color: Colors.green,
/// ),
/// key: ValueKey(items[index]),
/// onDismissed: (DismissDirection direction) {
/// setState(() {
/// items.remove(index);
/// });
/// },
/// );
/// },
/// );
/// }
/// ```
/// {@end-tool}
///
/// Backgrounds can be used to implement the "leave-behind" idiom. If a background
/// is specified it is stacked behind the Dismissible's child and is exposed when
/// the child moves.
...
...
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