v3.2.0widget_with_codeview
一個並排顯示原始碼的元件。
67喜歡 1420近 30 天下載120Pub 分數
AndroidiOSWebmacOSWindowsLinux
一個並排顯示原始碼的元件。
以下為英文專案原文快照,最新內容請造訪 GitHub。
A widget with side-by-side source code view. Extracted from the flutter-catalog open-source app.
First make sure to add the source file to the app's assets by editing pubspec.yaml:
dependencies:
flutter:
sdk: flutter
widget_with_codeview:
flutter:
assets:
# Include a single source code file:
- lib/my_awesome_source_code.dart
# Include all files under a subfoler by adding trailing "/":
- lib/my_awesome_source_code_subdir/
- ...
Then wrap the widget from that source file by a WidgetWithCodeView:
WidgetWithCodeView(
child: MyAwesomeWidget(), // ⚡️ If null, will only show the source code view.
filePath: 'lib/my_awesome_source_code.dart',
/// [codeLinkPrefix] is optional. When it's specified, two more buttons
/// (open-code-in-browser, copy-code-link) will be added in the code view.
codeLinkPrefix: 'https://github.com/<my_username>/<my_project>/blob/master/',
),
You can also choose to only show the code by not setting the child argument.
See example/lib/main.dart for a concrete example.
依賴清單 8 項
{"sdk":"flutter"}^0.7.0^7.0.0^8.0.1^0.5.2^1.2.0^6.3.2{"sdk":"flutter"}先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗