-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rxdart_flutter): add
rxdart_flutter
package (#759)
This pull request includes multiple changes to the project, primarily focusing on updating workflows, enhancing the `github_search` example, and adding a new `rxdart_flutter` package. Below is a summary of the most important changes: ### Workflow Updates: * Updated the `flutter-action` version to `v2.18.0` in `.github/workflows/flutter-example.yml` and `.github/workflows/rxdart-test.yml`. [[1]](diffhunk://#diff-46868a89bfc8745a14de252e4dd1e820aa24bf0e7b3b8d036541c4bf378bf27bL25-R25) [[2]](diffhunk://#diff-157a6170ab30a8278f85c37b4006d21588c1aa21ce44f5131085351215944156L21-R56) * Modified the matrix strategy in `.github/workflows/rxdart-test.yml` to use different Flutter versions and adjusted the setup steps accordingly. [[1]](diffhunk://#diff-157a6170ab30a8278f85c37b4006d21588c1aa21ce44f5131085351215944156L21-R56) [[2]](diffhunk://#diff-157a6170ab30a8278f85c37b4006d21588c1aa21ce44f5131085351215944156L55-R66) ### `github_search` Example Enhancements: * Added `rxdart_flutter` dependency in `pubspec.yaml` and updated `search_screen.dart` to use `ValueStreamBuilder` instead of `StreamBuilder`. [[1]](diffhunk://#diff-7c0b969291e6582b5f0eddbf7c45af79bc6c63994af819fee9f334c00ba7eb55R14-R15) [[2]](diffhunk://#diff-cf0d0844210ed730cd645a6844a593cae2e9b4633f4b77b5d12a8df9f2ed96e9R2) [[3]](diffhunk://#diff-cf0d0844210ed730cd645a6844a593cae2e9b4633f4b77b5d12a8df9f2ed96e9L47-R50) ### New `rxdart_flutter` Package: * Created a new package `rxdart_flutter` with initial setup files including `pubspec.yaml`, `CHANGELOG.md`, `LICENSE`, and `README.md`. [[1]](diffhunk://#diff-81910676c31299677f758bd0e24347356bdb0cc7e1dbc66982634e7d8809a01bR1-R55) [[2]](diffhunk://#diff-a4faf911bf12f76cfe3bca89108da18e42928856beac84021a4beb8e603e1f3aR1-R3) [[3]](diffhunk://#diff-b3f32bdb166212812679b58e14b6ff7254893f3a6dc6977983dbfdf7ece31c6dR1) [[4]](diffhunk://#diff-60d00e48ea72ead70cb1ac040d441fe586073187cec53d54a5a93c02793047c4R1-R39) * Added a `.gitignore` file to the `rxdart_flutter` package to exclude various files and directories. * Included `analysis_options.yaml` for linting rules and `rxdart_flutter.dart` to export the `ValueStreamBuilder` implementation. [[1]](diffhunk://#diff-53efe4340f2359fbf71e72ff03322034994eb982634b83e313f86a94528e03c9R1-R9) [[2]](diffhunk://#diff-30064bd77cba22a69e13f66825cb0c63aa681ec603169a9a3743305cad37fa77R1-R3) * Implemented `ValueStreamBuilder` in `src/value_stream_builder.dart` to provide a Flutter widget for building UI based on `ValueStream`.
- Loading branch information
Showing
17 changed files
with
455 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -18,31 +18,42 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
sdk: [ beta, stable, 2.17.0, 2.15.0, 2.12.0 ] | ||
# sdk: [ beta, stable, 2.17.0, 2.15.0, 2.12.0 ] | ||
flutter: [ beta, stable, 3.0.0, 2.8.0, 2.0.1 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Dart | ||
uses: dart-lang/[email protected] | ||
- name: Setup Stable/Beta Flutter/Dart | ||
if: ${{ matrix.flutter == 'stable' || matrix.flutter == 'beta' }} | ||
uses: subosito/[email protected] | ||
with: | ||
sdk: ${{ matrix.sdk }} | ||
channel: ${{ matrix.flutter }} | ||
|
||
- name: Setup Older Flutter/Dart | ||
if: ${{ matrix.flutter != 'stable' && matrix.flutter != 'beta' }} | ||
uses: subosito/[email protected] | ||
with: | ||
flutter-version: ${{ matrix.flutter }} | ||
|
||
- name: Install melos | ||
run: dart pub global activate melos | ||
|
||
- name: Print Dart version | ||
- name: Print Dart SDK version | ||
run: dart --version | ||
|
||
- name: Print Flutter SDK version | ||
run: flutter --version | ||
|
||
- name: Install dependencies | ||
run: melos run pub-get-no-private | ||
|
||
- name: Analyze | ||
if: ${{ matrix.sdk == 'stable' }} | ||
if: ${{ matrix.flutter == 'stable' }} | ||
run: melos run analyze-no-private | ||
|
||
- name: Format code | ||
if: ${{ matrix.sdk == 'stable' }} | ||
if: ${{ matrix.flutter == 'stable' }} | ||
run: melos run format-no-private | ||
|
||
- name: Active coverage | ||
|
@@ -52,4 +63,4 @@ jobs: | |
run: melos run test-rxdart | ||
|
||
- uses: codecov/[email protected] | ||
if: ${{ matrix.sdk == 'stable' }} | ||
if: ${{ matrix.flutter == 'stable' }} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
migrate_working_dir/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. | ||
/pubspec.lock | ||
**/doc/api/ | ||
.dart_tool/ | ||
.packages | ||
build/ |
This file contains 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: "2f708eb8396e362e280fac22cf171c2cb467343c" | ||
channel: "stable" | ||
|
||
project_type: package |
This file contains 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## 0.0.1 | ||
|
||
* TODO: Describe initial release. |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
TODO: Add your license here. |
This file contains 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!-- | ||
This README describes the package. If you publish this package to pub.dev, | ||
this README's contents appear on the landing page for your package. | ||
For information about how to write a good package README, see the guide for | ||
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). | ||
For general information about developing packages, see the Dart guide for | ||
[creating packages](https://dart.dev/guides/libraries/create-library-packages) | ||
and the Flutter guide for | ||
[developing packages and plugins](https://flutter.dev/developing-packages). | ||
--> | ||
|
||
TODO: Put a short description of the package here that helps potential users | ||
know whether this package might be useful for them. | ||
|
||
## Features | ||
|
||
TODO: List what your package can do. Maybe include images, gifs, or videos. | ||
|
||
## Getting started | ||
|
||
TODO: List prerequisites and provide or point to information on how to | ||
start using the package. | ||
|
||
## Usage | ||
|
||
TODO: Include short and useful examples for package users. Add longer examples | ||
to `/example` folder. | ||
|
||
```dart | ||
const like = 'sample'; | ||
``` | ||
|
||
## Additional information | ||
|
||
TODO: Tell users more about the package: where to find more information, how to | ||
contribute to the package, how to file issues, what response they can expect | ||
from the package authors, and more. |
This file contains 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
linter: | ||
rules: | ||
- prefer_final_locals | ||
- prefer_relative_imports | ||
- always_declare_return_types # https://github.com/dart-lang/lints#migrating-from-packagepedantic | ||
- prefer_single_quotes # https://github.com/dart-lang/lints#migrating-from-packagepedantic | ||
- unawaited_futures # https://github.com/dart-lang/lints#migrating-from-packagepedantic | ||
- unsafe_html # https://github.com/dart-lang/lints#migrating-from-packagepedantic |
This file contains 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
library rxdart_flutter; | ||
|
||
export 'src/value_stream_builder.dart'; |
Oops, something went wrong.