Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Gradle and Flutter #15

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -225,6 +225,7 @@ Blob.animatedRandom(
size:200,
edgesCount:5,
minGrowth:4,
animationCurve:Curves.easeInOutCubic,
duration: Duration(milliseconds:500),
),

2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="demo"
android:icon="@mipmap/ic_launcher">
<activity
8 changes: 4 additions & 4 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.6.10'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
1 change: 1 addition & 0 deletions example/lib/examples/animated/annimated_loop.dart
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ class AnimatedLoopExample extends StatelessWidget {
loop: true,
edgesCount: 6,
minGrowth: 7,
animationCurve: Curves.easeInOutCubic,
duration: Duration(milliseconds: 1500),
styles: BlobStyles(color: Color(0xffB33771)),
),
35 changes: 21 additions & 14 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.6.1"
version: "2.8.2"
blobs:
dependency: "direct main"
description:
@@ -28,14 +28,14 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.1"
clock:
dependency: transitive
description:
@@ -49,7 +49,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
crypto:
dependency: transitive
description:
@@ -70,7 +70,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
ffi:
dependency: transitive
description:
@@ -122,21 +122,28 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.7.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
path_provider:
dependency: transitive
description:
@@ -180,12 +187,12 @@ packages:
source: hosted
version: "1.11.0"
platform:
dependency: transitive
dependency: "direct main"
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
@@ -211,7 +218,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
@@ -246,7 +253,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
version: "0.4.9"
typed_data:
dependency: transitive
description:
@@ -260,7 +267,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.2"
win32:
dependency: transitive
description:
@@ -276,5 +283,5 @@ packages:
source: hosted
version: "0.2.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=1.20.0"
1 change: 1 addition & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ environment:
sdk: '>=2.12.0 <3.0.0'

dependencies:
platform: ^3.1.0
flutter:
sdk: flutter
blobs:
5 changes: 3 additions & 2 deletions lib/src/services/blob_animator.dart
Original file line number Diff line number Diff line change
@@ -5,13 +5,14 @@ class BlobAnimator {
AnimationController animationController;
List<List<Tween>> tweens = [];
List<List<Animation>> anims = [];
final Curve? animationCurve;

BlobAnimator({required this.pathPoints, required this.animationController});
BlobAnimator({required this.pathPoints, required this.animationController, this.animationCurve = Curves.linear});

init(Function(List<Offset>) callback) {
Animation<double> animation = CurvedAnimation(
parent: animationController,
curve: Curves.linear,
curve: animationCurve!,
);
pathPoints.asMap().forEach((i, p) {
tweens.insert(i, []);
5 changes: 4 additions & 1 deletion lib/src/widgets/animated_blob.dart
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ class AnimatedBlob extends StatefulWidget {
final Duration? duration;
final BlobData? fromBlobData;
final BlobData toBlobData;
final Curve? animationCurve;

const AnimatedBlob({
this.size = 200,
@@ -26,6 +27,7 @@ class AnimatedBlob extends StatefulWidget {
this.id,
this.duration,
this.child,
this.animationCurve
});

@override
@@ -51,7 +53,8 @@ class _AnimatedBlobState extends State<AnimatedBlob>
AnimationController(duration: widget.duration, vsync: this);
animator = BlobAnimator(
animationController: _animationController,
pathPoints: widget.toBlobData.points!.destPoints!);
pathPoints: widget.toBlobData.points!.destPoints!,
animationCurve: widget.animationCurve);
animator.init((o) {
setState(() {
data = BlobGenerator(
10 changes: 8 additions & 2 deletions lib/src/widgets/blob.dart
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ class Blob extends StatefulWidget {
final Duration? duration;
final bool loop;
final bool isAnimated;
final Curve? animationCurve;

static int count = 0;

@@ -34,7 +35,8 @@ class Blob extends StatefulWidget {
}) : loop = false,
id = null,
duration = null,
isAnimated = false;
isAnimated = false,
animationCurve = null;
Blob.animatedRandom({
required this.size,
this.edgesCount = BlobConfig.edgesCount,
@@ -47,6 +49,7 @@ class Blob extends StatefulWidget {
this.loop = false,
this.controller,
this.child,
this.animationCurve = Curves.easeInOutCubic,
}) : isAnimated = true,
id = null;

@@ -61,7 +64,8 @@ class Blob extends StatefulWidget {
edgesCount = null,
minGrowth = null,
duration = null,
isAnimated = false;
isAnimated = false,
animationCurve = null;

Blob.animatedFromID({
required this.id,
@@ -74,6 +78,7 @@ class Blob extends StatefulWidget {
this.loop = false,
this.controller,
this.child,
this.animationCurve = Curves.easeInOutCubic,
}) : isAnimated = true,
edgesCount = null,
minGrowth = null;
@@ -136,6 +141,7 @@ class _BlobState extends State<Blob> {
debug: widget.debug,
duration: widget.duration,
child: widget.child,
animationCurve: widget.animationCurve,
);
}

Loading
Oops, something went wrong.