diff --git a/.gitignore b/.gitignore index e9dc58d..b31163c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,46 @@ + +# Miscellaneous +*.class +*.log +*.pyc +*.swp .DS_Store -.dart_tool/ +.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/ -.packages +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ .pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release -build/ +*.lock \ No newline at end of file diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml deleted file mode 100644 index 567a414..0000000 --- a/.idea/libraries/Dart_SDK.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Flutter_for_Android.xml b/.idea/libraries/Flutter_for_Android.xml deleted file mode 100644 index b56d06d..0000000 --- a/.idea/libraries/Flutter_for_Android.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index c6aaf90..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/.idea/runConfigurations/example_lib_main_dart.xml b/.idea/runConfigurations/example_lib_main_dart.xml deleted file mode 100644 index 5fd9159..0000000 --- a/.idea/runConfigurations/example_lib_main_dart.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 6a59a98..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/.gitignore b/example/.gitignore index 07488ba..7a36bb7 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -1,3 +1,4 @@ + # Miscellaneous *.class *.log @@ -8,6 +9,7 @@ .buildlog/ .history .svn/ +migrate_working_dir/ # IntelliJ related *.iml @@ -15,56 +17,29 @@ *.iws .idea/ -# Visual Studio Code related -.vscode/ +# 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 **/doc/api/ +**/ios/Flutter/.last_build_id .dart_tool/ .flutter-plugins -.packages +.flutter-plugins-dependencies .pub-cache/ .pub/ /build/ -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/example/android/.gitignore b/example/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index a0185f7..5ebda3e 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -34,7 +34,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.opensource.svgaplayer_flutter_example" - minSdkVersion 16 + minSdkVersion flutter.minSdkVersion targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/example/android/build.gradle b/example/android/build.gradle index 2797bde..b7a8dd2 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -24,6 +24,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/ios/.gitignore b/example/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/example/ios/Flutter/Flutter.podspec b/example/ios/Flutter/Flutter.podspec deleted file mode 100644 index 5ca3041..0000000 --- a/example/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'High-performance, high-fidelity mobile apps.' - s.description = <<-DESC -Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. - DESC - s.homepage = 'https://flutter.io' - s.license = { :type => 'MIT' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - s.vendored_frameworks = 'Flutter.framework' -end diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh deleted file mode 100755 index f883610..0000000 --- a/example/ios/Flutter/flutter_export_environment.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/Users/saiakirahui/flutter" -export "FLUTTER_APPLICATION_PATH=/Users/saiakirahui/Desktop/SVGAPlayer-Flutter/example" -export "FLUTTER_TARGET=/Users/saiakirahui/Desktop/SVGAPlayer-Flutter/example/lib/main.dart" -export "FLUTTER_BUILD_DIR=build" -export "SYMROOT=${SOURCE_ROOT}/../build/ios" -export "FLUTTER_BUILD_NAME=1.0.0" -export "FLUTTER_BUILD_NUMBER=1" -export "DART_DEFINES=flutter.inspector.structuredErrors%3Dtrue" -export "DART_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=true" -export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=/Users/saiakirahui/Desktop/SVGAPlayer-Flutter/example/.dart_tool/package_config.json" diff --git a/example/pubspec.lock b/example/pubspec.lock deleted file mode 100644 index c402a03..0000000 --- a/example/pubspec.lock +++ /dev/null @@ -1,231 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - archive: - dependency: transitive - description: - name: archive - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.1.2" - async: - dependency: transitive - description: - name: async - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.9.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.2.1" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.16.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.2" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.3.1" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.13.3" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.flutter-io.cn" - source: hosted - version: "4.0.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.12.12" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.5" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.8.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.8.2" - path_drawing: - dependency: transitive - description: - name: path_drawing - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.1" - path_parsing: - dependency: transitive - description: - name: path_parsing - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.1" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.11.0" - protobuf: - dependency: transitive - description: - name: protobuf - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.0.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.9.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.1" - svgaplayer_flutter: - dependency: "direct dev" - description: - path: ".." - relative: true - source: path - version: "2.1.2" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.4.12" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.3.0" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.2" -sdks: - dart: ">=2.17.0-0 <3.0.0" - flutter: ">=1.24.0-7.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 703a4a5..ced4a2c 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -9,9 +9,6 @@ dependencies: flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^0.1.2 dev_dependencies: flutter_test: diff --git a/lib/dynamic_entity.dart b/lib/dynamic_entity.dart index 6aeec78..445135a 100644 --- a/lib/dynamic_entity.dart +++ b/lib/dynamic_entity.dart @@ -1,6 +1,7 @@ import 'dart:ui' as ui show Image; -import 'package:http/http.dart'; + import 'package:flutter/painting.dart'; +import 'package:http/http.dart'; typedef SVGACustomDrawer = Function(Canvas canvas, int frameIndex); @@ -11,16 +12,15 @@ class SVGADynamicEntity { final Map dynamicDrawer = {}; void setHidden(bool value, String forKey) { - this.dynamicHidden[forKey] = value; + dynamicHidden[forKey] = value; } void setImage(ui.Image image, String forKey) { - this.dynamicImages[forKey] = image; + dynamicImages[forKey] = image; } Future setImageWithUrl(String url, String forKey) async { - this.dynamicImages[forKey] = - await decodeImageFromList((await get(Uri.parse(url))).bodyBytes); + dynamicImages[forKey] = await decodeImageFromList((await get(Uri.parse(url))).bodyBytes); } void setText(TextPainter textPainter, String forKey) { @@ -28,17 +28,17 @@ class SVGADynamicEntity { textPainter.textDirection = TextDirection.ltr; textPainter.layout(); } - this.dynamicText[forKey] = textPainter; + dynamicText[forKey] = textPainter; } void setDynamicDrawer(SVGACustomDrawer drawer, String forKey) { - this.dynamicDrawer[forKey] = drawer; + dynamicDrawer[forKey] = drawer; } void reset() { - this.dynamicHidden.clear(); - this.dynamicImages.clear(); - this.dynamicText.clear(); - this.dynamicDrawer.clear(); + dynamicHidden.clear(); + dynamicImages.clear(); + dynamicText.clear(); + dynamicDrawer.clear(); } } diff --git a/lib/painter.dart b/lib/painter.dart index 7773312..4e10d59 100644 --- a/lib/painter.dart +++ b/lib/painter.dart @@ -1,4 +1,4 @@ -part of svgaplayer_flutter_player; +part of 'player.dart'; class _SVGAPainter extends CustomPainter { final BoxFit fit; @@ -14,8 +14,7 @@ class _SVGAPainter extends CustomPainter { this.fit = BoxFit.contain, this.filterQuality = FilterQuality.low, this.clipRect = true, - }) : assert( - controller.videoItem != null, 'Invalid SVGAAnimationController!'), + }) : assert(controller.videoItem != null, 'Invalid SVGAAnimationController!'), super(repaint: controller); @override @@ -46,8 +45,7 @@ class _SVGAPainter extends CustomPainter { // scale viewbox size (source) to canvas size (destination) var sx = fittedSizes.destination.width / fittedSizes.source.width; var sy = fittedSizes.destination.height / fittedSizes.source.height; - final Size scaledHalfViewBoxSize = - Size(viewBoxRect.size.width * sx, viewBoxRect.size.height * sy) / 2.0; + final Size scaledHalfViewBoxSize = Size(viewBoxRect.size.width * sx, viewBoxRect.size.height * sy) / 2.0; final Size halfCanvasSize = canvasRect.size / 2.0; // center align final Offset shift = Offset( @@ -62,8 +60,7 @@ class _SVGAPainter extends CustomPainter { for (final sprite in videoItem.sprites) { final imageKey = sprite.imageKey; // var matteKey = sprite.matteKey; - if (imageKey.isEmpty || - videoItem.dynamicItem.dynamicHidden[imageKey] == true) { + if (imageKey.isEmpty || videoItem.dynamicItem.dynamicHidden[imageKey] == true) { continue; } final frameItem = sprite.frames[currentFrame]; @@ -94,10 +91,8 @@ class _SVGAPainter extends CustomPainter { canvas.save(); canvas.clipPath(buildDPath(frameItem.clipPath)); } - final frameRect = - Rect.fromLTRB(0, 0, frameItem.layout.width, frameItem.layout.height); - final frameAlpha = - frameItem.hasAlpha() ? (frameItem.alpha * 255).toInt() : 255; + final frameRect = Rect.fromLTRB(0, 0, frameItem.layout.width, frameItem.layout.height); + final frameAlpha = frameItem.hasAlpha() ? (frameItem.alpha * 255).toInt() : 255; drawBitmap(canvas, imageKey, frameRect, frameAlpha); drawShape(canvas, frameItem.shapes, frameAlpha); // draw dynamic @@ -115,8 +110,7 @@ class _SVGAPainter extends CustomPainter { } void drawBitmap(Canvas canvas, String imageKey, Rect frameRect, int alpha) { - final bitmap = videoItem.dynamicItem.dynamicImages[imageKey] ?? - videoItem.bitmapCache[imageKey]; + final bitmap = videoItem.dynamicItem.dynamicImages[imageKey] ?? videoItem.bitmapCache[imageKey]; if (bitmap == null) return; final bitmapPaint = Paint(); @@ -125,8 +119,7 @@ class _SVGAPainter extends CustomPainter { bitmapPaint.isAntiAlias = true; bitmapPaint.color = Color.fromARGB(alpha, 0, 0, 0); - Rect srcRect = - Rect.fromLTRB(0, 0, bitmap.width.toDouble(), bitmap.height.toDouble()); + Rect srcRect = Rect.fromLTRB(0, 0, bitmap.width.toDouble(), bitmap.height.toDouble()); Rect dstRect = frameRect; canvas.drawImageRect(bitmap, srcRect, dstRect, bitmapPaint); drawTextOnBitmap(canvas, imageKey, frameRect, alpha); @@ -211,11 +204,7 @@ class _SVGAPainter extends CustomPainter { default: } paint.strokeMiterLimit = shape.styles.miterLimit; - List lineDash = [ - shape.styles.lineDashI, - shape.styles.lineDashII, - shape.styles.lineDashIII - ]; + List lineDash = [shape.styles.lineDashI, shape.styles.lineDashII, shape.styles.lineDashIII]; if (lineDash[0] > 0 || lineDash[1] > 0) { canvas.drawPath( dashPath( @@ -260,8 +249,7 @@ class _SVGAPainter extends CustomPainter { final wv = args.width; final hv = args.height; final crv = args.cornerRadius; - final rrect = RRect.fromRectAndRadius( - Rect.fromLTWH(xv, yv, wv, hv), Radius.circular(crv)); + final rrect = RRect.fromRectAndRadius(Rect.fromLTWH(xv, yv, wv, hv), Radius.circular(crv)); if (!rrect.isEmpty) path.addRRect(rrect); } return path; @@ -347,10 +335,7 @@ class _SVGAPainter extends CustomPainter { currentPointY, ); } else if (firstLetter == "S") { - if (currentPointX1 != null && - currentPointY1 != null && - currentPointX2 != null && - currentPointY2 != null) { + if (currentPointX1 != null && currentPointY1 != null && currentPointX2 != null && currentPointY2 != null) { currentPointX1 = currentPointX - currentPointX2! + currentPointX; currentPointY1 = currentPointY - currentPointY2! + currentPointY; currentPointX2 = double.parse(args[0]); @@ -370,14 +355,10 @@ class _SVGAPainter extends CustomPainter { currentPointY1 = double.parse(args[1]); currentPointX = double.parse(args[2]); currentPointY = double.parse(args[3]); - path!.quadraticBezierTo( - currentPointX1!, currentPointY1!, currentPointX, currentPointY); + path!.quadraticBezierTo(currentPointX1!, currentPointY1!, currentPointX, currentPointY); } } else if (firstLetter == "s") { - if (currentPointX1 != null && - currentPointY1 != null && - currentPointX2 != null && - currentPointY2 != null) { + if (currentPointX1 != null && currentPointY1 != null && currentPointX2 != null && currentPointY2 != null) { currentPointX1 = currentPointX - currentPointX2! + currentPointX; currentPointY1 = currentPointY - currentPointY2! + currentPointY; currentPointX2 = currentPointX + double.parse(args[0]); @@ -409,8 +390,7 @@ class _SVGAPainter extends CustomPainter { currentPointY1 = double.parse(args[1]); currentPointX = double.parse(args[2]); currentPointY = double.parse(args[3]); - path!.quadraticBezierTo( - currentPointX1!, currentPointY1!, currentPointX, currentPointY); + path!.quadraticBezierTo(currentPointX1!, currentPointY1!, currentPointX, currentPointY); } else if (firstLetter == "q") { currentPointX1 = currentPointX + double.parse(args[0]); currentPointY1 = currentPointY + double.parse(args[1]); @@ -431,8 +411,7 @@ class _SVGAPainter extends CustomPainter { return path; } - void drawTextOnBitmap( - Canvas canvas, String imageKey, Rect frameRect, int frameAlpha) { + void drawTextOnBitmap(Canvas canvas, String imageKey, Rect frameRect, int frameAlpha) { var dynamicText = videoItem.dynamicItem.dynamicText; if (dynamicText.isEmpty) return; if (dynamicText[imageKey] == null) return; diff --git a/lib/simple_player.dart b/lib/simple_player.dart index 9bb28b7..a585c4d 100644 --- a/lib/simple_player.dart +++ b/lib/simple_player.dart @@ -1,11 +1,10 @@ -part of svgaplayer_flutter_player; +part of 'player.dart'; class SVGASimpleImage extends StatefulWidget { final String? resUrl; final String? assetsName; - const SVGASimpleImage({Key? key, this.resUrl, this.assetsName}) - : super(key: key); + const SVGASimpleImage({Key? key, this.resUrl, this.assetsName}) : super(key: key); @override State createState() { @@ -13,8 +12,7 @@ class SVGASimpleImage extends StatefulWidget { } } -class _SVGASimpleImageState extends State - with SingleTickerProviderStateMixin { +class _SVGASimpleImageState extends State with SingleTickerProviderStateMixin { SVGAAnimationController? animationController; @override @@ -71,8 +69,7 @@ class _SVGASimpleImageState extends State library: 'svga library', informationCollector: () => [ if (widget.resUrl != null) StringProperty('resUrl', widget.resUrl), - if (widget.assetsName != null) - StringProperty('assetsName', widget.assetsName), + if (widget.assetsName != null) StringProperty('assetsName', widget.assetsName), ], )); }); diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index 0703263..0000000 --- a/pubspec.lock +++ /dev/null @@ -1,231 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - archive: - dependency: "direct main" - description: - name: archive - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.1.2" - async: - dependency: transitive - description: - name: async - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.9.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.2.1" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.16.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.0.1" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.3.1" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - url: "https://pub.flutter-io.cn" - 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 - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.13.3" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.flutter-io.cn" - source: hosted - version: "4.0.0" - lints: - dependency: transitive - description: - name: lints - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.1" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.12.12" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.5" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.8.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.8.2" - path_drawing: - dependency: "direct main" - description: - name: path_drawing - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.1" - path_parsing: - dependency: transitive - description: - name: path_parsing - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.1" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.11.0" - protobuf: - dependency: "direct main" - description: - name: protobuf - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.0.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.9.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.4.12" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.3.0" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.2" -sdks: - dart: ">=2.17.0-0 <3.0.0" - flutter: ">=1.24.0-7.0" diff --git a/pubspec.yaml b/pubspec.yaml index 5eea011..d1bc546 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,17 +4,17 @@ version: 2.2.0 homepage: https://github.com/yyued/SVGAPlayer-Flutter environment: - sdk: ">=2.12.0 <3.0.0" + sdk: '>=3.0.6 <4.0.0' dependencies: flutter: sdk: flutter - protobuf: ^2.0.0 - http: ^0.13.3 + protobuf: ^3.1.0 path_drawing: ^1.0.0 - archive: ^3.1.2 + archive: ^3.4.10 + http: ^1.2.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^1.0.4 + flutter_lints: ^3.0.1 diff --git a/svgaplayer_flutter.iml b/svgaplayer_flutter.iml deleted file mode 100644 index 429df7d..0000000 --- a/svgaplayer_flutter.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file