Skip to content

Commit ee802be

Browse files
committed
Added new package: auto_animated, updated license
1 parent 3079977 commit ee802be

File tree

75 files changed

+2055
-19
lines changed

Some content is hidden

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

75 files changed

+2055
-19
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ Common plugins for flutter framework
44

55
## Available plugins
66

7-
| Plugin | Version | Source code |
8-
|---|---|---|
9-
| [native_pdf_renderer][native_pdf_renderer_pub] | ![pub package][native_pdf_renderer_badge] | [`packages/native_pdf_renderer`][native_pdf_renderer_code] |
10-
| [native_pdf_view][native_pdf_view_pub] | ![pub package][native_pdf_view_badge] | [`packages/native_pdf_view`][native_pdf_view_code] |
11-
| [native_color][native_color_pub] | ![pub package][native_color_badge] | [`packages/native_color`][native_color_code] |
7+
| Plugin | Source code |
8+
|---|---|
9+
| [![pub package][native_pdf_renderer_badge]][native_pdf_renderer_pub] | [`packages/native_pdf_renderer`][native_pdf_renderer_code] |
10+
| [![pub package][native_pdf_view_badge]][native_pdf_view_pub] | [`packages/native_pdf_view`][native_pdf_view_code] |
11+
| [![pub package][native_color_badge]][native_color_pub] | [`packages/native_color`][native_color_code] |
12+
| [![pub package][auto_animated_badge]][auto_animated_pub] | [`packages/auto_animated`][auto_animated_code] |
1213

1314

1415
[native_pdf_renderer_pub]: https://pub.dartlang.org/packages/native_pdf_renderer
@@ -21,4 +22,8 @@ Common plugins for flutter framework
2122

2223
[native_color_pub]: https://pub.dartlang.org/packages/native_color
2324
[native_color_code]: https://github.com/rbcprolabs/flutter_plugins/tree/master/packages/native_color
24-
[native_color_badge]: https://img.shields.io/pub/v/native_color.svg
25+
[native_color_badge]: https://img.shields.io/pub/v/native_color.svg
26+
27+
[auto_animated_pub]: https://pub.dartlang.org/packages/auto_animated
28+
[auto_animated_code]: https://github.com/rbcprolabs/flutter_plugins/tree/master/packages/auto_animated
29+
[auto_animated_badge]: https://img.shields.io/pub/v/auto_animated.svg

packages/auto_animated/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
.dart_tool/
3+
4+
.packages
5+
.pub/
6+
7+
build/

packages/auto_animated/.metadata

Lines changed: 10 additions & 0 deletions
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: 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f
8+
channel: stable
9+
10+
project_type: plugin
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.0.0
2+
3+
* Initial release.

packages/auto_animated/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 RBC, Serge Shkurko
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.

packages/auto_animated/README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Auto animated
2+
3+
Auto animated list
4+
5+
## Screenshots
6+
<p float="left">
7+
<img src='./example/media/horizontal.gif' width="30%">
8+
<img src='./example/media/vertical.gif' width="30%" hspace="4%">
9+
<img src='./example/media/combined.gif' width="30%">
10+
</p>
11+
12+
## Getting Started
13+
In your flutter project add the dependency:
14+
15+
[![pub package](https://img.shields.io/pub/v/auto_animated.svg)](https://pub.dartlang.org/packages/auto_animated)
16+
17+
```dart
18+
dependencies:
19+
...
20+
auto_animated: any
21+
```
22+
For help getting started with Flutter, view the online [documentation](https://flutter.io/).
23+
24+
## Usage example
25+
### **It very simple!**
26+
27+
```dart
28+
AutoAnimatedList(
29+
// Start animation after (default zero)
30+
delay: Duration(seconds: 1),
31+
// Show each item through
32+
showItemInterval: Duration(milliseconds: 500),
33+
// Animation duration
34+
showItemDuration: Duration(seconds: 1),
35+
// Other properties correspond to the `AnimatedList` widget
36+
scrollDirection: Axis.horizontal,
37+
itemsCount: 10,
38+
itemBuilder: _buildAnimatedItem,
39+
)
40+
41+
// Build item
42+
Widget _buildAnimatedItem(
43+
BuildContext context,
44+
int index,
45+
Animation<double> animation,
46+
) =>
47+
// Wrap with fade transition
48+
FadeTransition(
49+
opacity: Tween<double>(
50+
begin: 0,
51+
end: 1,
52+
).animate(animation),
53+
// And slide transition
54+
child: SlideTransition(
55+
position: Tween<Offset>(
56+
begin: Offset(0, -0.1),
57+
end: Offset.zero,
58+
).animate(animation),
59+
// Paste you Widget
60+
child: YouWidgetHere(),
61+
),
62+
)
63+
```
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
.dart_tool/
26+
.flutter-plugins
27+
.packages
28+
.pub-cache/
29+
.pub/
30+
/build/
31+
32+
# Android related
33+
**/android/**/gradle-wrapper.jar
34+
**/android/.gradle
35+
**/android/captures/
36+
**/android/gradlew
37+
**/android/gradlew.bat
38+
**/android/local.properties
39+
**/android/**/GeneratedPluginRegistrant.java
40+
41+
# iOS/XCode related
42+
**/ios/**/*.mode1v3
43+
**/ios/**/*.mode2v3
44+
**/ios/**/*.moved-aside
45+
**/ios/**/*.pbxuser
46+
**/ios/**/*.perspectivev3
47+
**/ios/**/*sync/
48+
**/ios/**/.sconsign.dblite
49+
**/ios/**/.tags*
50+
**/ios/**/.vagrant/
51+
**/ios/**/DerivedData/
52+
**/ios/**/Icon?
53+
**/ios/**/Pods/
54+
**/ios/**/.symlinks/
55+
**/ios/**/profile
56+
**/ios/**/xcuserdata
57+
**/ios/.generated/
58+
**/ios/Flutter/App.framework
59+
**/ios/Flutter/Flutter.framework
60+
**/ios/Flutter/Generated.xcconfig
61+
**/ios/Flutter/app.flx
62+
**/ios/Flutter/app.zip
63+
**/ios/Flutter/flutter_assets/
64+
**/ios/Flutter/flutter_export_environment.sh
65+
**/ios/ServiceDefinitions.json
66+
**/ios/Runner/GeneratedPluginRegistrant.*
67+
68+
# Exceptions to above rules.
69+
!**/ios/**/default.mode1v3
70+
!**/ios/**/default.mode2v3
71+
!**/ios/**/default.pbxuser
72+
!**/ios/**/default.perspectivev3
73+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
Lines changed: 10 additions & 0 deletions
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: 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f
8+
channel: stable
9+
10+
project_type: app
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Example of usage `auto_animated`
2+
3+
```dart
4+
import 'package:flutter/material.dart';
5+
6+
import 'package:auto_animated/auto_animated.dart';
7+
8+
void main() => runApp(MyApp());
9+
10+
class MyApp extends StatelessWidget {
11+
@override
12+
Widget build(BuildContext context) => MaterialApp(
13+
home: Scaffold(
14+
backgroundColor: Colors.grey[100],
15+
appBar: AppBar(
16+
title: Text('Auto animated example'),
17+
),
18+
body: Column(
19+
children: <Widget>[
20+
SizedBox(
21+
height: 200,
22+
child: AutoAnimatedList(
23+
showItemInterval: Duration(milliseconds: 500),
24+
showItemDuration: Duration(seconds: 1),
25+
padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 24),
26+
scrollDirection: Axis.horizontal,
27+
itemsCount: 10,
28+
itemBuilder: _buildAnimatedItem,
29+
),
30+
),
31+
],
32+
),
33+
),
34+
);
35+
36+
/// Wrap Ui item with animation & padding
37+
Widget _buildAnimatedItem(
38+
BuildContext context,
39+
int index,
40+
Animation<double> animation,
41+
) =>
42+
FadeTransition(
43+
opacity: Tween<double>(
44+
begin: 0,
45+
end: 1,
46+
).animate(animation),
47+
child: SlideTransition(
48+
position: Tween<Offset>(
49+
begin: Offset(0, -0.1),
50+
end: Offset.zero,
51+
).animate(animation),
52+
child: Padding(
53+
padding: EdgeInsets.only(right: 32),
54+
child: _buildCard(index.toString()),
55+
),
56+
),
57+
);
58+
59+
/// UI item for showing
60+
Widget _buildCard(String text) => Builder(
61+
builder: (context) => Container(
62+
width: 140,
63+
child: ClipRRect(
64+
borderRadius: BorderRadius.circular(4),
65+
child: Material(
66+
color: Colors.lime,
67+
child: Center(
68+
child: Text(
69+
text,
70+
style: Theme.of(context)
71+
.textTheme
72+
.display1
73+
.copyWith(color: Colors.black),
74+
),
75+
),
76+
),
77+
),
78+
),
79+
);
80+
}
81+
```
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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 plugin: 'kotlin-android'
26+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27+
28+
android {
29+
compileSdkVersion 28
30+
31+
sourceSets {
32+
main.java.srcDirs += 'src/main/kotlin'
33+
}
34+
35+
lintOptions {
36+
disable 'InvalidPackage'
37+
}
38+
39+
defaultConfig {
40+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41+
applicationId "com.example.auto_animated_example"
42+
minSdkVersion 16
43+
targetSdkVersion 28
44+
versionCode flutterVersionCode.toInteger()
45+
versionName flutterVersionName
46+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
47+
}
48+
49+
buildTypes {
50+
release {
51+
// TODO: Add your own signing config for the release build.
52+
// Signing with the debug keys for now, so `flutter run --release` works.
53+
signingConfig signingConfigs.debug
54+
}
55+
}
56+
}
57+
58+
flutter {
59+
source '../..'
60+
}
61+
62+
dependencies {
63+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64+
testImplementation 'junit:junit:4.12'
65+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
66+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
67+
}

0 commit comments

Comments
 (0)