Skip to content

Commit

Permalink
Merge pull request #4 from SplashByte/dev
Browse files Browse the repository at this point in the history
version 0.3.0
  • Loading branch information
maeddin authored Mar 18, 2022
2 parents 15532b1 + 1599d8c commit 18825bc
Show file tree
Hide file tree
Showing 17 changed files with 340 additions and 186 deletions.
27 changes: 17 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
## [0.2.1] - (2021-04-02)
## 0.3.0 (2022-03-18)

- Several minor Fixes
- Performance improvements
- BREAKING: Changes default value of `padding` to `EdgeInsets.zero`
- BREAKING: Changes default color to `Theme.of(context).colorScheme.secondary`

## 0.2.1 (2021-04-02)

- Minor Changes/Fixes
- Changes default values of CircularWidgetLoading
- Changes default values of `CircularWidgetLoading`

## [0.2.0] - (2021-03-04)
## 0.2.0 (2021-03-04)

- Migrates to null safety

## [0.1.2] - (2021-03-02)
## 0.1.2 (2021-03-02)

- Fixes key handling if animatedSize is false
- Fixes key handling if `animatedSize` is false
- Removes warnings in code
- Improves performance

## [0.1.1] - (2021-03-02)
## 0.1.1 (2021-03-02)

- Fixes key handling in CircularWidgetLoading
- Fixes key handling in `CircularWidgetLoading`
- Adds some comments in the code
- Adds GIF in README.md

## [0.1.0] - (2021-03-02)
## 0.1.0 (2021-03-02)

- Initial release
- WiperLoading
- CircularWidgetLoading
- `WiperLoading`
- `CircularWidgetLoading`
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<a href="https://pub.dev/packages/widget_loading"><img src="https://img.shields.io/pub/v/widget_loading.svg?style=flat?logo=dart" alt="pub.dev"></a>
<a href="https://github.com/SplashByte/widget_loading"><img src="https://img.shields.io/static/v1?label=platform&message=flutter&color=1ebbfd" alt="github"></a>
[![likes](https://badges.bar/widget_loading/likes)](https://pub.dev/packages/widget_loading/score)
[![popularity](https://badges.bar/widget_loading/popularity)](https://pub.dev/packages/widget_loading/score)
[![pub points](https://badges.bar/widget_loading/pub%20points)](https://pub.dev/packages/widget_loading/score)
<a href="https://github.com/SplashByte/widget_loading/blob/main/LICENSE"><img src="https://img.shields.io/github/license/SplashByte/widget_loading.svg" alt="license"></a>

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>9.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -127,7 +127,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
37 changes: 27 additions & 10 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,43 @@ class _ExampleState extends State<Example> {
),
counterCard(Curves.easeInOutCirc),
counterCard(Curves.easeInOutCirc,
builder: (width, height) =>
Container(width: width, height: height, decoration: BoxDecoration(color: Colors.purple, borderRadius: BorderRadius.circular(5.0))),
builder: (width, height) => Container(
width: width,
height: height,
decoration: BoxDecoration(
color: Colors.purple,
borderRadius: BorderRadius.circular(5.0))),
wiperWidth: 50),
counterCard(
Curves.linear,
builder: (width, height) =>
Container(width: width, height: height, decoration: BoxDecoration(color: Colors.purple, borderRadius: BorderRadius.circular(5.0))),
builder: (width, height) => Container(
width: width,
height: height,
decoration: BoxDecoration(
color: Colors.purple,
borderRadius: BorderRadius.circular(5.0))),
wiperWidth: 10,
deformingFactor: 0.2,
direction: WiperDirection.up,
),
counterCard(Curves.easeInOutCirc, padding: EdgeInsets.symmetric(horizontal: 15.0, vertical: 30.0)),
counterCard(Curves.easeInOutCirc,
padding: EdgeInsets.symmetric(
horizontal: 15.0, vertical: 30.0)),
counterCard(Curves.easeOutSine,
builder: (width, height) => Container(
width: width,
height: height,
decoration: BoxDecoration(color: Colors.red, shape: BoxShape.circle),
decoration: BoxDecoration(
color: Colors.red, shape: BoxShape.circle),
),
wiperWidth: 20),
counterCard(Curves.easeOutSine,
builder: (width, height) =>
Container(width: width, height: height, decoration: BoxDecoration(color: Colors.purple, borderRadius: BorderRadius.circular(5.0))),
builder: (width, height) => Container(
width: width,
height: height,
decoration: BoxDecoration(
color: Colors.purple,
borderRadius: BorderRadius.circular(5.0))),
wiperWidth: 20,
direction: WiperDirection.left),
counterCardCircle(Curves.linear),
Expand Down Expand Up @@ -171,7 +186,8 @@ class _ExampleState extends State<Example> {
);

Widget counterCardCircle(Curve curve, {WiperBuilder? builder}) => InkWell(
onTap: () => Navigator.of(context).push(MaterialPageRoute(builder: (c) => LoadingScaffold())),
onTap: () => Navigator.of(context)
.push(MaterialPageRoute(builder: (c) => LoadingScaffold())),
child: Card(
elevation: 5.0,
child: CircularWidgetLoading(
Expand All @@ -180,7 +196,8 @@ class _ExampleState extends State<Example> {
rollingFactor: 0.8,
loading: loading,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 15.0, vertical: 50.0),
padding: const EdgeInsets.symmetric(
horizontal: 15.0, vertical: 50.0),
child: ListTile(
leading: Text(
'Counter',
Expand Down
27 changes: 17 additions & 10 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,14 +21,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:
Expand Down Expand Up @@ -73,14 +73,21 @@ 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.3"
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:
Expand All @@ -99,7 +106,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -134,7 +141,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19"
version: "0.4.8"
typed_data:
dependency: transitive
description:
Expand All @@ -148,14 +155,14 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
widget_loading:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "0.2.1"
version: "0.3.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.17.0"
8 changes: 4 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: example
description: Example Project for the package widget_loading.

publish_to: 'none'

version: 1.0.0+1

environment:
sdk: ">=2.12.0-259.16.beta <3.0.0"
sdk: ">=2.15.0 <3.0.0"

dependencies:
flutter:
sdk: flutter

widget_loading:
path: ../

cupertino_icons: ^1.0.0
path: '..'

dev_dependencies:
flutter_test:
Expand Down
6 changes: 4 additions & 2 deletions lib/src/utils/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ extension Derivation on CurvedAnimation {
case AnimationStatus.forward:
double value = max(this.parent.value - dif, 0.0);
if (value == this.parent.value) return 0.0;
return (this.value - this.curve.transform(value)) / (this.parent.value - value);
return (this.value - this.curve.transform(value)) /
(this.parent.value - value);
case AnimationStatus.reverse:
double value = min(this.parent.value + dif, 1.0);
if (value == this.parent.value) return 0.0;
return (this.value - this.curve.transform(value)) / (value - this.parent.value);
return (this.value - this.curve.transform(value)) /
(value - this.parent.value);
case AnimationStatus.dismissed:
case AnimationStatus.completed:
break;
Expand Down
Loading

0 comments on commit 18825bc

Please sign in to comment.