This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Add path_provider plugin #12
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
efd433f
Dart + Android part of plugin
szakarias b9ce5f5
ios
szakarias 82ad8c9
Merge branch 'master' of github.com:flutter/plugins into pathProvider
szakarias 93f1be8
Merge branch 'pathProvider' of github.com:szakarias/plugins into path…
szakarias 2aa332f
update License
szakarias d491f96
README and CHANGELOG
szakarias 08d2f10
small cleanups
szakarias 61a0d90
comments
szakarias dea913d
remove null check on ios and update bundle id
szakarias f9e78ea
Add handling of 'null' result
szakarias be94e10
comments
szakarias d73a790
remove newline
szakarias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
comments
- Loading branch information
commit be94e101040090315fa7f9a7b5a5c2ec8203b6a4
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,18 +45,16 @@ class _MyHomePageState extends State<MyHomePage> { | |
|
|
||
| Widget _buildDirectory( | ||
| BuildContext context, AsyncSnapshot<Directory> snapshot) { | ||
| Text text; | ||
|
|
||
| Text text = const Text(''); | ||
| if (snapshot.connectionState == ConnectionState.done) { | ||
| if (snapshot.hasError) { | ||
| text = new Text('Error: ${snapshot.error}'); | ||
| } else if (snapshot.hasData) { | ||
| text = new Text('path: ${snapshot.data.path}'); | ||
| text = new Text('path: ${snapshot.data.path}'); | ||
| } else { | ||
| text = new Text('path unavailable'); | ||
| text = const Text('path unavailable'); | ||
| } | ||
| } else { | ||
| text = new Text(''); | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
As an alternatively to the |
||
| return new Padding(padding: const EdgeInsets.all(16.0), child: text); | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps you can extract the Widget text;
if (snapshot.hasError)
text = ...
else if (snapshot.hasData)
text = ...
else
text = ...
return new Padding(padding:..., child: text); |
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd drop this empty line to make it more apparent that
textis defined by the followingif.