Skip to content

Commit

Permalink
## 6.0.0
Browse files Browse the repository at this point in the history
* Breaking change: The type of rebuild is changed from Stream<LoadingMoreBase<T>>  to Stream<Iterable<T>> in LoadingMoreBase<T>.
* Add a new method 'wrapData', you can modify the list here.
  • Loading branch information
zmtzawqlp committed Sep 19, 2023
1 parent 5f3d387 commit 9afe699
Show file tree
Hide file tree
Showing 23 changed files with 205 additions and 579 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/checker.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/pub_publish.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish

on:
release:
types: [ published ]
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Publish
uses: k-paxian/dart-package-publisher@master
with:
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
flutter: true
skipTests: true
26 changes: 26 additions & 0 deletions .github/workflows/publishable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publishable

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- "**.md"
- "**.yaml"
- "**.yml"

jobs:
publish-dry-run:
name: Publish dry-run with packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: k-paxian/dart-package-publisher@master
with:
credentialJson: 'MockCredentialJson'
flutter: true
dryRunOnly: true
skipTests: true
79 changes: 79 additions & 0 deletions .github/workflows/runnable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Runnable (stable)

on:
push:
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- "**.md"

jobs:
analyze:
name: Analyze on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11.x'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Log Dart/Flutter versions
run: |
dart --version
flutter --version
- name: Prepare dependencies
run: flutter pub get
- name: Analyse the repo
run: flutter analyze lib example/lib
- name: Run tests
run: flutter test
- name: Generate docs
run: |
dart pub global activate dartdoc
dart pub global run dartdoc .
test_iOS:
needs: analyze
name: Test iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11.x'
- uses: subosito/[email protected]
with:
channel: stable
- run: dart --version
- run: flutter --version
- run: flutter pub get
- run: cd example; flutter build ios --no-codesign

test_android:
needs: analyze
name: Test Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11.x'
- uses: subosito/[email protected]
with:
channel: stable
- run: dart --version
- run: flutter --version
- run: flutter pub get
- run: sudo echo "y" | sudo $ANDROID_HOME/tools/bin/sdkmanager "ndk;21.4.7075529"
- run: cd example; flutter build apk --debug
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 6.0.0

* Breaking change: The type of rebuild is changed from Stream<LoadingMoreBase<T>> to Stream<Iterable<T>> in LoadingMoreBase<T>.
* Add a new method 'wrapData', you can modify the list here.

## 5.0.3

* Fix StreamBuilder not return latest list.
Expand Down
2 changes: 1 addition & 1 deletion example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_ios","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/path_provider_ios-2.0.11/","native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_ios-6.0.17/","native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/path_provider_android-2.0.17/","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_android-6.0.17/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-2.0.6/","native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-3.0.1/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-2.1.7/","native_build":false,"dependencies":[]},{"name":"url_launcher_linux","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-3.0.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-2.1.1/","native_build":false,"dependencies":[]},{"name":"url_launcher_windows","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-3.0.1/","native_build":true,"dependencies":[]}],"web":[{"name":"url_launcher_web","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-2.0.13/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2023-02-13 14:18:55.091169","version":"3.0.5"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/path_provider_foundation-2.3.1/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_ios-6.1.5/","native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/path_provider_android-2.2.0/","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_android-6.1.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/path_provider_foundation-2.3.1/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-3.0.7/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"url_launcher_linux","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-3.0.6/","native_build":true,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"url_launcher_windows","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-3.0.8/","native_build":true,"dependencies":[]}],"web":[{"name":"url_launcher_web","path":"/Users/zmt/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-2.0.20/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2023-09-19 10:58:04.502296","version":"3.13.4"}
3 changes: 2 additions & 1 deletion example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ build/
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
Podfile.lock
Podfile.lock
pubspec.lock
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
13 changes: 8 additions & 5 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -164,7 +164,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -230,10 +230,12 @@
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down Expand Up @@ -261,6 +263,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -348,7 +351,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -433,7 +436,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -482,7 +485,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
7 changes: 6 additions & 1 deletion example/lib/data/tu_chong_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TuChongRepository extends LoadingMoreBase<TuChongItem> {
}

@override
Future<bool> loadData([bool isloadMoreAction = false]) async {
Future<bool> loadData([bool isLoadMoreAction = false]) async {
String url = '';
if (isEmpty) {
url = 'https://api.tuchong.com/feed-app';
Expand Down Expand Up @@ -84,4 +84,9 @@ class TuChongRepository extends LoadingMoreBase<TuChongItem> {
}
return isSuccess;
}

// @override
// Iterable<TuChongItem> wrapData(Iterable<TuChongItem> source) {
// return source.where((TuChongItem element) => element.imageCount == 1);
// }
}
1 change: 0 additions & 1 deletion example/lib/widget/item_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ Widget buildWaterfallFlowItem(BuildContext c, TuChongItem item, int index,
),
);
if (!konwSized) {
//todo: not work in web
loadingWidget = AspectRatio(
aspectRatio: 1.0,
child: loadingWidget,
Expand Down
Loading

0 comments on commit 9afe699

Please sign in to comment.