Skip to content

Commit 67d397e

Browse files
committed
initial commit
0 parents  commit 67d397e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2105
-0
lines changed

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
.dart_tool/
3+
4+
.packages
5+
.pub/
6+
7+
build/
8+
ios/.generated/
9+
ios/Flutter/Generated.xcconfig
10+
ios/Runner/GeneratedPluginRegistrant.*
11+
*.iml
12+
.idea

.metadata

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713
8+
channel: stable
9+
10+
project_type: package

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## [0.0.2] - 02/03/2021.
2+
3+
* first issues with internal resources not cleaned.
4+
5+
## [0.0.1] - 02/03/2021.
6+
7+
* initial release.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Jimmy Aumard
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# rive_loading
2+
3+
[![pub package](https://img.shields.io/pub/v/rive_loading.svg)](https://pub.dartlang.org/packages/rive_loading)
4+
5+
Loading widget based on a Rive animation, allow you to create custom loading widgets or dialogs
6+
7+
## Usage
8+
9+
```dart
10+
RiveLoading(
11+
name: 'animation.riv',
12+
startAnimation: 'intro',
13+
loopAnimation: 'circle',
14+
endAnimation: 'end',
15+
);
16+
```
17+
18+
`name`: path and name of the Rive animation
19+
20+
`until`: callback that return a future to process your initialization
21+
22+
`isLoading`: alternative to `until` if you want to manage loading state with a boolean
23+
24+
`loopAnimation`: animation name to run in loop
25+
26+
`endAnimation`: animation name to run once `until` is complete or `isLoading` false
27+
28+
`startAnimation`: animation name to run once as start
29+
30+
`height`: force the height of the Rive animation, by default it take the all place available
31+
32+
`width`: force the width of the Rive animation, by default it take the all place available
33+
34+
`alignment`: alignment of the Rive animation, center by default
35+
36+
`onSuccess` callback called when the animation is finished and `isLoading` is false or `until` is complete
37+
38+
`onError` callback called `until` has failed
39+
40+
## Available mode
41+
42+
### Only one animation
43+
Basically you have one animation to show and then just need to stay at last frame. In order to do that only specify the `startAnimation`
44+
45+
### Start and loop animation
46+
Your animation have an intro and a loop state, in order to do that only specify the `startAnimation` and `loopAnimation`
47+
48+
### End and loop animation
49+
Your animation have a finish and a loop state, in order to do that only specify the `endAnimation` and `loopAnimation`
50+
51+
### Start and end animation
52+
Your animation have an intro and a finish that should stay on the last frame, in order to do that only `startAnimation` and `endAnimation`
53+
54+
### Start, end and loop animation
55+
Your animation have an intro, a finish and a loop state, in order to do that specify the `startAnimation`, `endAnimation` and `loopAnimation`

example/.gitignore

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# Visual Studio Code related
19+
.vscode/
20+
21+
# Flutter/Dart/Pub related
22+
**/doc/api/
23+
.dart_tool/
24+
.flutter-plugins
25+
.packages
26+
.pub-cache/
27+
.pub/
28+
/build/
29+
30+
# Android related
31+
**/android/**/gradle-wrapper.jar
32+
**/android/.gradle
33+
**/android/captures/
34+
**/android/gradlew
35+
**/android/gradlew.bat
36+
**/android/local.properties
37+
**/android/**/GeneratedPluginRegistrant.java
38+
39+
# iOS/XCode related
40+
**/ios/**/*.mode1v3
41+
**/ios/**/*.mode2v3
42+
**/ios/**/*.moved-aside
43+
**/ios/**/*.pbxuser
44+
**/ios/**/*.perspectivev3
45+
**/ios/**/*sync/
46+
**/ios/**/.sconsign.dblite
47+
**/ios/**/.tags*
48+
**/ios/**/.vagrant/
49+
**/ios/**/DerivedData/
50+
**/ios/**/Icon?
51+
**/ios/**/Pods/
52+
**/ios/**/.symlinks/
53+
**/ios/**/profile
54+
**/ios/**/xcuserdata
55+
**/ios/.generated/
56+
**/ios/Flutter/App.framework
57+
**/ios/Flutter/Flutter.framework
58+
**/ios/Flutter/Generated.xcconfig
59+
**/ios/Flutter/app.flx
60+
**/ios/Flutter/app.zip
61+
**/ios/Flutter/flutter_assets/
62+
**/ios/ServiceDefinitions.json
63+
**/ios/Runner/GeneratedPluginRegistrant.*
64+
65+
# Exceptions to above rules.
66+
!**/ios/**/default.mode1v3
67+
!**/ios/**/default.mode2v3
68+
!**/ios/**/default.pbxuser
69+
!**/ios/**/default.perspectivev3
70+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

example/.metadata

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713
8+
channel: stable
9+
10+
project_type: app

example/README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# example
2+
3+
```dart
4+
5+
FlareLoading(
6+
name: 'loading.flr',
7+
loopAnimation: 'Loading',
8+
endAnimation: 'Complete',
9+
isLoading: _isLoading,//boolean based loading
10+
onFinished: () {
11+
print('Finished');
12+
},
13+
),
14+
```
15+
16+
```dart
17+
18+
FlareLoading(
19+
name: 'loading.flr',
20+
loopAnimation: 'Loading',
21+
endAnimation: 'Complete',
22+
until: () => Future.delayed(Duration(seconds: 5)),//Future based loading
23+
onFinished: () {
24+
print('Finished');
25+
},
26+
),
27+
```

example/android/app/build.gradle

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
def localProperties = new Properties()
2+
def localPropertiesFile = rootProject.file('local.properties')
3+
if (localPropertiesFile.exists()) {
4+
localPropertiesFile.withReader('UTF-8') { reader ->
5+
localProperties.load(reader)
6+
}
7+
}
8+
9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
14+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15+
if (flutterVersionCode == null) {
16+
flutterVersionCode = '1'
17+
}
18+
19+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20+
if (flutterVersionName == null) {
21+
flutterVersionName = '1.0'
22+
}
23+
24+
apply plugin: 'com.android.application'
25+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26+
27+
android {
28+
compileSdkVersion 28
29+
30+
lintOptions {
31+
disable 'InvalidPackage'
32+
}
33+
34+
defaultConfig {
35+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36+
applicationId "com.jaumard.example"
37+
minSdkVersion 16
38+
targetSdkVersion 28
39+
versionCode flutterVersionCode.toInteger()
40+
versionName flutterVersionName
41+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42+
}
43+
44+
buildTypes {
45+
release {
46+
// TODO: Add your own signing config for the release build.
47+
// Signing with the debug keys for now, so `flutter run --release` works.
48+
signingConfig signingConfigs.debug
49+
}
50+
}
51+
}
52+
53+
flutter {
54+
source '../..'
55+
}
56+
57+
dependencies {
58+
testImplementation 'junit:junit:4.12'
59+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
60+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
61+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.jaumard.example">
3+
<!-- Flutter needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.jaumard.example">
3+
4+
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
5+
calls FlutterMain.startInitialization(this); in its onCreate method.
6+
In most cases you can leave this as-is, but you if you want to provide
7+
additional functionality it is fine to subclass or reimplement
8+
FlutterApplication and put your custom class here. -->
9+
<application
10+
android:name="io.flutter.app.FlutterApplication"
11+
android:label="example"
12+
android:icon="@mipmap/ic_launcher">
13+
<activity
14+
android:name=".MainActivity"
15+
android:launchMode="singleTop"
16+
android:theme="@style/LaunchTheme"
17+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
18+
android:hardwareAccelerated="true"
19+
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). -->
24+
<meta-data
25+
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
26+
android:value="true" />
27+
<intent-filter>
28+
<action android:name="android.intent.action.MAIN" />
29+
<category android:name="android.intent.category.LAUNCHER" />
30+
</intent-filter>
31+
</activity>
32+
</application>
33+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.jaumard.example;
2+
3+
import android.os.Bundle;
4+
import io.flutter.app.FlutterActivity;
5+
import io.flutter.plugins.GeneratedPluginRegistrant;
6+
7+
public class MainActivity extends FlutterActivity {
8+
@Override
9+
protected void onCreate(Bundle savedInstanceState) {
10+
super.onCreate(savedInstanceState);
11+
GeneratedPluginRegistrant.registerWith(this);
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?><!-- Modify this file to customize your launch splash screen -->
2+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:drawable="@android:color/white" />
4+
5+
<!-- You can insert your own image assets here -->
6+
<!-- <item>
7+
<bitmap
8+
android:gravity="center"
9+
android:src="@mipmap/launch_image" />
10+
</item> -->
11+
</layer-list>
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
Flutter draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.jaumard.example">
3+
<!-- Flutter needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
</manifest>

0 commit comments

Comments
 (0)