Skip to content

Commit b944dbd

Browse files
authored
Merge pull request svga#81 from yrom/refactor-painter
Refactor svga painter
2 parents 47653f2 + d97e339 commit b944dbd

File tree

16 files changed

+589
-364
lines changed

16 files changed

+589
-364
lines changed

.vscode/launch.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
"request": "launch",
1010
"type": "dart",
1111
"program": "example/lib/main.dart"
12+
},
13+
{
14+
"name": "Flutter profile",
15+
"request": "launch",
16+
"type": "dart",
17+
"program": "example/lib/main.dart",
18+
"args": ["--profile"]
1219
}
1320
]
1421
}

analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include: package:flutter_lints/flutter.yaml

example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
2525
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626

2727
android {
28-
compileSdkVersion 28
28+
compileSdkVersion 31
2929

3030
lintOptions {
3131
disable 'InvalidPackage'
@@ -35,7 +35,7 @@ android {
3535
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3636
applicationId "com.opensource.svgaplayer_flutter_example"
3737
minSdkVersion 16
38-
targetSdkVersion 28
38+
targetSdkVersion 31
3939
versionCode flutterVersionCode.toInteger()
4040
versionName flutterVersionName
4141
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

example/android/app/src/main/AndroidManifest.xml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
additional functionality it is fine to subclass or reimplement
88
FlutterApplication and put your custom class here. -->
99
<application
10-
android:name="io.flutter.app.FlutterApplication"
1110
android:label="svgaplayer_flutter_example"
1211
android:icon="@mipmap/ic_launcher">
1312
<activity
@@ -16,18 +15,25 @@
1615
android:theme="@style/LaunchTheme"
1716
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1817
android:hardwareAccelerated="true"
18+
android:exported="true"
1919
android:windowSoftInputMode="adjustResize">
20-
<!-- This keeps the window background of the activity showing
21-
until Flutter renders its first frame. It can be removed if
22-
there is no splash screen (such as the default splash screen
23-
defined in @style/LaunchTheme). -->
2420
<meta-data
25-
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
26-
android:value="true" />
21+
android:name="io.flutter.embedding.android.SplashScreenDrawable"
22+
android:resource="@drawable/launch_background" />
23+
24+
<!-- Theme to apply as soon as Flutter begins rendering frames -->
25+
<meta-data
26+
android:name="io.flutter.embedding.android.NormalTheme"
27+
android:resource="@android:style/Theme.Black.NoTitleBar"
28+
/>
2729
<intent-filter>
2830
<action android:name="android.intent.action.MAIN"/>
2931
<category android:name="android.intent.category.LAUNCHER"/>
3032
</intent-filter>
3133
</activity>
34+
35+
<meta-data
36+
android:name="flutterEmbedding"
37+
android:value="2" />
3238
</application>
3339
</manifest>
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
package com.opensource.svgaplayer_flutter_example;
22

33
import android.os.Bundle;
4-
import io.flutter.app.FlutterActivity;
5-
import io.flutter.plugins.GeneratedPluginRegistrant;
4+
5+
import io.flutter.embedding.android.FlutterActivity;
66

77
public class MainActivity extends FlutterActivity {
8-
@Override
9-
protected void onCreate(Bundle savedInstanceState) {
10-
super.onCreate(savedInstanceState);
11-
GeneratedPluginRegistrant.registerWith(this);
12-
}
138
}

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
}
66

77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.2.1'
8+
classpath 'com.android.tools.build:gradle:7.0.4'
99
}
1010
}
1111

example/android/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
22
android.enableR8=true
3+
android.useAndroidX=true

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip

0 commit comments

Comments
 (0)