Skip to content

Commit

Permalink
update to use dart 3
Browse files Browse the repository at this point in the history
  • Loading branch information
GIfatahTH committed May 12, 2023
1 parent c113466 commit f1c01b3
Show file tree
Hide file tree
Showing 17 changed files with 62 additions and 102 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [3.3.0]
* Update to be compatible with dart 3


## [3.2.0]
* Update to use states_rebuilder new version

Expand Down
30 changes: 15 additions & 15 deletions example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled.

version:
revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
channel: stable

project_type: app
Expand All @@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
- platform: android
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
- platform: ios
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
- platform: linux
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
- platform: macos
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
- platform: web
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
- platform: windows
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8

# User provided section

Expand Down
17 changes: 0 additions & 17 deletions example/android/.project

This file was deleted.

2 changes: 0 additions & 2 deletions example/android/.settings/org.eclipse.buildship.core.prefs

This file was deleted.

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

android {
namespace "com.example.example"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

Expand All @@ -46,7 +47,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.example"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
Expand Down
3 changes: 1 addition & 2 deletions example/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
5 changes: 2 additions & 3 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.example">
<application
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="example"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
Expand Down
3 changes: 1 addition & 2 deletions example/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
6 changes: 3 additions & 3 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
3 changes: 1 addition & 2 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 changes: 3 additions & 3 deletions example/ios/Flutter/flutter_export_environment.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/mnt/4264D0233849F01A/flutter"
export "FLUTTER_APPLICATION_PATH=/run/media/gafatahru/Flutter/repository/animator/example"
export "FLUTTER_ROOT=/Volumes/development/flutter"
export "FLUTTER_APPLICATION_PATH=/Volumes/development/development/libraries/animator/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
2 changes: 0 additions & 2 deletions example/lib/basic_animatio_3/animated_size.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ class MyStatefulWidget extends StatefulWidget {
}

class _MyStatefulWidgetState extends State<MyStatefulWidget> {
double _size = 50.0;
bool _large = false;

void _updateSize() {
setState(() {
_size = _large ? 250.0 : 100.0;
_large = !_large;
});
}
Expand Down
12 changes: 12 additions & 0 deletions example/macos/RunnerTests/RunnerTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import FlutterMacOS
import Cocoa
import XCTest

class RunnerTests: XCTestCase {

func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}

}
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
cupertino_icons: any

dev_dependencies:
flutter_test:
Expand Down
30 changes: 0 additions & 30 deletions example/test/widget_test.dart

This file was deleted.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: animator
description: A Flutter library that makes animation easer. It allows for separation of animation setup from the User Interface.
version: 3.2.0
version: 3.3.0
homepage: https://github.com/GIfatahTH/animator
environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
34 changes: 16 additions & 18 deletions test/animate_widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -523,32 +523,30 @@ void main() {
model.notify();
await tester.pump();
expect('$outVal',
'BoxDecoration(border: Border.all(BorderSide(Color(0xff000000), 0.0, BorderStyle.none)))');
'BoxDecoration(border: Border.all(BorderSide(width: 0.0, style: none)))');
await tester.pump(Duration(milliseconds: 200));
expect('$outVal',
'BoxDecoration(border: Border.all(BorderSide(Color(0xff000000), 0.2, BorderStyle.solid)))');
'BoxDecoration(border: Border.all(BorderSide(width: 0.2)))');
await tester.pump(Duration(milliseconds: 300));
expect('$outVal',
'BoxDecoration(border: Border.all(BorderSide(Color(0xff000000), 0.5, BorderStyle.solid)))');
'BoxDecoration(border: Border.all(BorderSide(width: 0.5)))');
await tester.pump(Duration(milliseconds: 500));
expect('$outVal',
'BoxDecoration(border: Border.all(BorderSide(Color(0xff000000), 1.0, BorderStyle.solid)))');
expect('$outVal', 'BoxDecoration(border: Border.all(BorderSide))');
//

inVal = BoxDecoration(border: Border.all(width: 2));
model.notify();
await tester.pump();
expect('$outVal',
'BoxDecoration(border: Border.all(BorderSide(Color(0xff000000), 1.0, BorderStyle.solid)))');
expect('$outVal', 'BoxDecoration(border: Border.all(BorderSide))');
await tester.pump(Duration(milliseconds: 200));
expect('$outVal',
'BoxDecoration(border: Border.all(BorderSide(Color(0xff000000), 1.2, BorderStyle.solid)))');
'BoxDecoration(border: Border.all(BorderSide(width: 1.2)))');
await tester.pump(Duration(milliseconds: 300));
expect('$outVal',
'BoxDecoration(border: Border.all(BorderSide(Color(0xff000000), 1.5, BorderStyle.solid)))');
'BoxDecoration(border: Border.all(BorderSide(width: 1.5)))');
await tester.pump(Duration(milliseconds: 500));
expect('$outVal',
'BoxDecoration(border: Border.all(BorderSide(Color(0xff000000), 2.0, BorderStyle.solid)))');
'BoxDecoration(border: Border.all(BorderSide(width: 2.0)))');
},
);

Expand Down Expand Up @@ -773,31 +771,31 @@ void main() {
inVal = ThemeData.dark();
model.notify();
await tester.pump();
expect('${outVal?.accentColor}', 'Color(0xff2196f3)');
expect('${outVal?.colorScheme.secondary}', 'Color(0xff2196f3)');
await tester.pump(Duration(milliseconds: 200));
expect('${outVal?.accentColor}', 'Color(0xff2eabee)');
expect('${outVal?.colorScheme.secondary}', 'Color(0xff2eabee)');

await tester.pump(Duration(milliseconds: 300));
expect('${outVal?.accentColor}', 'Color(0xff42cae6)');
expect('${outVal?.colorScheme.secondary}', 'Color(0xff42cae6)');

await tester.pump(Duration(milliseconds: 500));
expect('${outVal?.accentColor}', 'Color(0xff64ffda)');
expect('${outVal?.colorScheme.secondary}', 'Color(0xff64ffda)');

//
inVal = ThemeData.light();
model.notify();
await tester.pump();

expect('${outVal?.accentColor}', 'Color(0xff64ffda)');
expect('${outVal?.colorScheme.secondary}', 'Color(0xff64ffda)');

await tester.pump(Duration(milliseconds: 200));
expect('${outVal?.accentColor}', 'Color(0xff56eadf)');
expect('${outVal?.colorScheme.secondary}', 'Color(0xff56eadf)');

await tester.pump(Duration(milliseconds: 300));
expect('${outVal?.accentColor}', 'Color(0xff42cae6)');
expect('${outVal?.colorScheme.secondary}', 'Color(0xff42cae6)');

await tester.pump(Duration(milliseconds: 500));
expect('${outVal?.accentColor}', 'Color(0xff2196f3)');
expect('${outVal?.colorScheme.secondary}', 'Color(0xff2196f3)');
},
);

Expand Down

0 comments on commit f1c01b3

Please sign in to comment.