diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 044af7f..c76c1eb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,10 +3,14 @@ name: build # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the develop branch on: + workflow_dispatch: + push: - branches: [ develop, master ] + tags: + - "v[0-9]+.[0-9]+.[0-9]+*" + branches: [develop, main] pull_request: - branches: [ develop ] + branches: [develop] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -22,12 +26,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - name: Set up Flutter + uses: subosito/flutter-action@v2 with: - channel: 'stable' + channel: "stable" + architecture: x64 + cache: true # Download all Flutter packages - name: Download dependencies @@ -51,12 +58,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - name: Set up Flutter + uses: subosito/flutter-action@v2 with: - channel: 'stable' + channel: "stable" + architecture: x64 + cache: true # Download all Flutter packages - name: Download dependencies @@ -81,17 +91,21 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Ensure correct JAVA version is installed. - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v4 with: - java-version: '12.x' + distribution: "zulu" + java-version: "17" # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - name: Set up Flutter + uses: subosito/flutter-action@v2 with: - channel: 'stable' + channel: "stable" + architecture: x64 + cache: true # Download all Flutter packages - name: Download dependencies @@ -116,12 +130,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - name: Set up Flutter + uses: subosito/flutter-action@v2 with: - channel: 'stable' + channel: "stable" + architecture: x64 + cache: true # Download all Flutter packages - name: Download dependencies @@ -146,12 +163,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - name: Set up Flutter + uses: subosito/flutter-action@v2 with: - channel: 'stable' + channel: "stable" + architecture: x64 + cache: true # Enable platform support - name: Enable macOS @@ -181,12 +201,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - name: Set up Flutter + uses: subosito/flutter-action@v2 with: - channel: 'stable' + channel: "stable" + architecture: x64 + cache: true # Enable platform support - name: Enable Windows @@ -220,12 +243,15 @@ jobs: - run: sudo apt-get install -y ninja-build libgtk-3-dev libblkid-dev # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - name: Set up Flutter + uses: subosito/flutter-action@v2 with: - channel: 'stable' + channel: "stable" + architecture: x64 + cache: true # Enable platform support - name: Enable Linux @@ -260,12 +286,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - name: Set up Flutter + uses: subosito/flutter-action@v2 with: - channel: 'stable' + channel: "stable" + architecture: x64 + cache: true # Download all Flutter packages - name: Download dependencies @@ -288,12 +317,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - name: Set up Flutter + uses: subosito/flutter-action@v2 with: - channel: 'stable' + channel: "stable" + architecture: x64 + cache: true # Download all Flutter packages - name: Download dependencies @@ -305,9 +337,58 @@ jobs: run: flutter test --coverage working-directory: ${{env.source-directory}} - # Upload code coverage information - - uses: codecov/codecov-action@v1 + # # Upload code coverage information + # - uses: codecov/codecov-action@v4 + # with: + # file: ${{env.source-directory}}/coverage/lcov.info # optional + # name: OctoImage # optional + # fail_ci_if_error: true + + publish: + if: ${{ github.ref_type == 'tag' }} + name: Publish + permissions: + id-token: write + needs: + [ + format, + analyze, + tests, + build_android, + build_ios, + build_macOS, + build_windows, + build_linux, + build_web, + ] + # The type of runner that the job will run on + runs-on: ubuntu-latest + + env: + source-directory: . + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + + - name: Set up Dart + uses: dart-lang/setup-dart@v1 + + # Make sure the stable version of Flutter is available + - name: Set up Flutter + uses: subosito/flutter-action@v2 with: - file: ${{env.source-directory}}/coverage/lcov.info # optional - name: OctoImage # optional - fail_ci_if_error: true \ No newline at end of file + channel: "stable" + architecture: x64 + cache: true + + # Download all Flutter packages + - name: Download dependencies + run: flutter pub get + working-directory: ${{env.source-directory}} + + # Publish the package + - name: Publish package + run: dart pub publish -v -f + working-directory: ${{env.source-directory}} diff --git a/.gitignore b/.gitignore index 6520053..b22a564 100644 --- a/.gitignore +++ b/.gitignore @@ -8,10 +8,11 @@ .atom/ .buildlog/ .history -.project .svn/ -bin/ -coverage/ +devtools_options.yaml + +# Environment files +ios/Flutter/Dart-Defines.xcconfig # IntelliJ related *.iml @@ -19,31 +20,23 @@ coverage/ *.iws .idea/ -# Android Studio related -android/.classpath -android/.settings/ -example/android/.settings/ - # Visual Studio Code related -.vscode/ - -# Flutter repo-specific -/bin/cache/ -/bin/mingit/ -/dev/benchmarks/mega_gallery/ -/dev/bots/.recipe_deps -/dev/bots/android_tools/ -/dev/docs/doc/ -/dev/docs/lib/ -/dev/docs/pubspec.yaml -/packages/flutter/coverage/ -version +.classpath +.project +.settings/ +.vscode/* + +# packages file containing multi-root paths +.packages.generated # Flutter/Dart/Pub related **/doc/api/ .dart_tool/ .flutter-plugins +.flutter-plugins-dependencies +**/generated_plugin_registrant.dart .packages +.pub-preload-cache/ .pub-cache/ .pub/ build/ @@ -51,17 +44,17 @@ flutter_*.png linked_*.ds unlinked.ds unlinked_spec.ds -flutter_export_environment.sh -**/.flutter-plugins-dependencies # Android related **/android/**/gradle-wrapper.jar -**/android/.gradle +.gradle/ **/android/captures/ **/android/gradlew **/android/gradlew.bat **/android/local.properties **/android/**/GeneratedPluginRegistrant.java +**/android/key.properties +*.jks # iOS/XCode related **/ios/**/*.mode1v3 @@ -80,15 +73,50 @@ flutter_export_environment.sh **/ios/**/profile **/ios/**/xcuserdata **/ios/.generated/ +**/ios/Flutter/.last_build_id **/ios/Flutter/App.framework **/ios/Flutter/Flutter.framework +**/ios/Flutter/Flutter.podspec **/ios/Flutter/Generated.xcconfig +**/ios/Flutter/ephemeral **/ios/Flutter/app.flx **/ios/Flutter/app.zip **/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh **/ios/ServiceDefinitions.json **/ios/Runner/GeneratedPluginRegistrant.* -**/ios/Flutter/Flutter.podspec + +# macOS +**/Flutter/ephemeral/ +**/Pods/ +**/macos/Flutter/GeneratedPluginRegistrant.swift +**/macos/Flutter/ephemeral +**/xcuserdata/ + +# Windows +**/windows/flutter/generated_plugin_registrant.cc +**/windows/flutter/generated_plugin_registrant.h +**/windows/flutter/generated_plugins.cmake + +# Linux +**/linux/flutter/generated_plugin_registrant.cc +**/linux/flutter/generated_plugin_registrant.h +**/linux/flutter/generated_plugins.cmake + +# Coverage +coverage/ + +# Submodules +packages/**/pubspec.lock + +# Web related +lib/generated_plugin_registrant.dart + +# Symbols +app.*.symbols + +# Obfuscation related +app.*.map.json # Exceptions to above rules. !**/ios/**/default.mode1v3 @@ -96,3 +124,18 @@ flutter_export_environment.sh !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +!/dev/ci/**/Gemfile.lock +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.idea/codeStyles/ +!.idea/dictionaries/ +!.idea/runConfigurations/ + +# Generated files +**/generated +*.g.dart + +# Injection generated files +injectable.config.dart \ No newline at end of file diff --git a/example/lib/helpers/mock_image_provider.dart b/example/lib/helpers/mock_image_provider.dart index 1e3b0b0..28a085f 100644 --- a/example/lib/helpers/mock_image_provider.dart +++ b/example/lib/helpers/mock_image_provider.dart @@ -72,7 +72,7 @@ class MockImageProvider extends ImageProvider { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (other is MockImageProvider) { return useCase == other.useCase && _timeStamp == other._timeStamp; } diff --git a/example/pubspec.lock b/example/pubspec.lock deleted file mode 100644 index 6d6735d..0000000 --- a/example/pubspec.lock +++ /dev/null @@ -1,219 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - charcode: - dependency: transitive - description: - name: charcode - sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 - url: "https://pub.dev" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 - url: "https://pub.dev" - source: hosted - version: "1.0.4" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - http: - dependency: "direct main" - description: - name: http - sha256: "2ed163531e071c2c6b7c659635112f24cb64ecbebf6af46b550d536c0b1aa112" - url: "https://pub.dev" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - lints: - dependency: transitive - description: - name: lints - sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c - url: "https://pub.dev" - source: hosted - version: "1.0.1" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - meta: - dependency: transitive - description: - name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e - url: "https://pub.dev" - source: hosted - version: "1.10.0" - octo_image: - dependency: "direct main" - description: - path: ".." - relative: true - source: path - version: "2.0.0" - path: - dependency: transitive - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - web: - dependency: transitive - description: - name: web - sha256: "14f1f70c51119012600c5f1f60ca68efda5a9b6077748163c6af2893ec5df8fc" - url: "https://pub.dev" - source: hosted - version: "0.2.1-beta" -sdks: - dart: ">=3.2.0-157.0.dev <4.0.0" diff --git a/example/windows/flutter/generated_plugins.cmake b/example/windows/flutter/generated_plugins.cmake index 4d10c25..b93c4c3 100644 --- a/example/windows/flutter/generated_plugins.cmake +++ b/example/windows/flutter/generated_plugins.cmake @@ -5,6 +5,9 @@ list(APPEND FLUTTER_PLUGIN_LIST ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/lib/src/errors.dart b/lib/src/errors.dart index 9282fd4..4e75655 100644 --- a/lib/src/errors.dart +++ b/lib/src/errors.dart @@ -19,8 +19,8 @@ class OctoError { width: double.infinity, height: double.infinity, child: CircleAvatar( - child: text, backgroundColor: backgroundColor, + child: text, ), ); } diff --git a/lib/src/image/fade_widget.dart b/lib/src/image/fade_widget.dart index 858e42d..75d143c 100644 --- a/lib/src/image/fade_widget.dart +++ b/lib/src/image/fade_widget.dart @@ -30,11 +30,10 @@ class FadeWidget extends StatefulWidget { this.duration = const Duration(milliseconds: 800), this.direction = AnimationDirection.forward, this.curve = Curves.easeOut, - Key? key}) - : super(key: key); + super.key}); @override - _FadeWidgetState createState() => _FadeWidgetState(); + State createState() => _FadeWidgetState(); } class _FadeWidgetState extends State diff --git a/lib/src/image/image.dart b/lib/src/image/image.dart index 3515328..3775bf7 100644 --- a/lib/src/image/image.dart +++ b/lib/src/image/image.dart @@ -179,7 +179,7 @@ class OctoImage extends StatefulWidget { /// regardless of these parameters. These parameters are primarily intended /// to reduce the memory usage of [ImageCache]. OctoImage({ - Key? key, + super.key, required ImageProvider image, this.imageBuilder, this.placeholderBuilder, @@ -216,8 +216,7 @@ class OctoImage extends StatefulWidget { matchTextDirection = matchTextDirection ?? false, filterQuality = filterQuality ?? FilterQuality.low, placeholderFadeInDuration = placeholderFadeInDuration ?? Duration.zero, - gaplessPlayback = gaplessPlayback ?? false, - super(key: key); + gaplessPlayback = gaplessPlayback ?? false; /// Creates an OctoWidget that displays an image with a predefined [OctoSet]. /// The [image] is an ImageProvider and the OctoImage should work with any @@ -249,7 +248,7 @@ class OctoImage extends StatefulWidget { /// regardless of these parameters. These parameters are primarily intended /// to reduce the memory usage of [ImageCache]. OctoImage.fromSet({ - Key? key, + super.key, required ImageProvider image, required OctoSet octoSet, Duration? fadeOutDuration, @@ -287,11 +286,10 @@ class OctoImage extends StatefulWidget { matchTextDirection = matchTextDirection ?? false, filterQuality = filterQuality ?? FilterQuality.low, placeholderFadeInDuration = placeholderFadeInDuration ?? Duration.zero, - gaplessPlayback = gaplessPlayback ?? false, - super(key: key); + gaplessPlayback = gaplessPlayback ?? false; @override - _OctoImageState createState() => _OctoImageState(); + State createState() => _OctoImageState(); } class _OctoImageState extends State { diff --git a/lib/src/image/image_handler.dart b/lib/src/image/image_handler.dart index 1d85fe0..bf33401 100644 --- a/lib/src/image/image_handler.dart +++ b/lib/src/image/image_handler.dart @@ -203,15 +203,15 @@ class ImageHandler { alignment: Alignment.center, children: [ FadeWidget( - child: revealing, duration: fadeInDuration, curve: fadeInCurve, + child: revealing, ), FadeWidget( - child: disappearing, duration: fadeOutDuration, curve: fadeOutCurve, direction: AnimationDirection.reverse, + child: disappearing, ) ], ); @@ -230,9 +230,9 @@ class ImageHandler { if (frame == null) { if (placeholderFadeInDuration != Duration.zero) { return FadeWidget( - child: _placeholder(context), duration: placeholderFadeInDuration, curve: fadeInCurve, + child: _placeholder(context), ); } else { return _placeholder(context); @@ -271,9 +271,9 @@ class ImageHandler { if (placeholderFadeInDuration != Duration.zero) { return FadeWidget( - child: _progressIndicator(context, loadingProgress), duration: placeholderFadeInDuration, curve: fadeInCurve, + child: _progressIndicator(context, loadingProgress), ); } else { return _progressIndicator(context, loadingProgress); diff --git a/lib/src/placeholders.dart b/lib/src/placeholders.dart index f60b006..5b1f464 100644 --- a/lib/src/placeholders.dart +++ b/lib/src/placeholders.dart @@ -18,8 +18,8 @@ class OctoPlaceholder { width: double.infinity, height: double.infinity, child: CircleAvatar( - child: text, backgroundColor: backgroundColor, + child: text, ), ); } diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index eaa926d..0000000 --- a/pubspec.lock +++ /dev/null @@ -1,181 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 - url: "https://pub.dev" - source: hosted - version: "1.17.2" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 - url: "https://pub.dev" - source: hosted - version: "1.0.4" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - lints: - dependency: transitive - description: - name: lints - sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c - url: "https://pub.dev" - source: hosted - version: "1.0.1" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - meta: - dependency: transitive - description: - name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - path: - dependency: transitive - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 - url: "https://pub.dev" - source: hosted - version: "1.11.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" - url: "https://pub.dev" - source: hosted - version: "0.6.0" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - web: - dependency: transitive - description: - name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 - url: "https://pub.dev" - source: hosted - version: "0.1.4-beta" -sdks: - dart: ">=3.1.0-185.0.dev <4.0.0" - flutter: ">=3.7.0" diff --git a/pubspec.yaml b/pubspec.yaml index d7d5cb9..c14d4bd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,11 @@ name: octo_image description: A multifunctional Flutter image widget. Supports placeholders, error widgets and image transformers with fading. -version: 2.0.0 +version: 2.0.1 homepage: https://github.com/Baseflow/octo_image environment: - sdk: '>=2.12.0 <4.0.0' - flutter: '>=3.7.0' + sdk: '>=3.0.0 <4.0.0' + flutter: '>=3.10.0' dependencies: flutter: @@ -14,4 +14,4 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^1.0.4 + flutter_lints: ^4.0.0 diff --git a/test/helpers/mock_image_provider.dart b/test/helpers/mock_image_provider.dart index b52106a..d1e0f10 100644 --- a/test/helpers/mock_image_provider.dart +++ b/test/helpers/mock_image_provider.dart @@ -69,7 +69,7 @@ class MockImageProvider extends ImageProvider { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (other is MockImageProvider) { return useCase == other.useCase && _timeStamp == other._timeStamp; } diff --git a/test/octo_image_test.dart b/test/octo_image_test.dart index 21a0521..20a52c8 100644 --- a/test/octo_image_test.dart +++ b/test/octo_image_test.dart @@ -95,15 +95,14 @@ class MyWidget extends StatelessWidget { final OctoErrorBuilder? errorBuilder; MyWidget({ - Key? key, + super.key, required this.useCase, VoidCallback? onProgress, VoidCallback? onPlaceHolder, VoidCallback? onError, }) : progressBuilder = getProgress(onProgress), placeholderBuilder = getPlaceholder(onPlaceHolder), - errorBuilder = getErrorBuilder(onError), - super(key: key); + errorBuilder = getErrorBuilder(onError); static OctoProgressIndicatorBuilder? getProgress(VoidCallback? onProgress) { if (onProgress == null) return null;