Skip to content

Commit

Permalink
Minor Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aliyigitbireroglu committed Nov 5, 2019
1 parent a725424 commit 2e21928
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 19 deletions.
4 changes: 3 additions & 1 deletion peek_and_pop/CHANGELOG.md
Expand Up @@ -5,6 +5,8 @@

* Improved performance.

* [1.0.2+1] Support for latest dependencies.

## [1.0.1] - 03.09.2019

* Minor changes.
Expand Down Expand Up @@ -133,4 +135,4 @@ the relevant installation instructions.

## [0.0.1] - 05.08.2019

* Initial release.
* Initial release.
4 changes: 3 additions & 1 deletion peek_and_pop/example/CHANGELOG.md
Expand Up @@ -5,6 +5,8 @@

* Improved performance.

* [1.0.2+1] Support for latest dependencies.

## [1.0.1] - 03.09.2019

* Minor changes.
Expand Down Expand Up @@ -133,4 +135,4 @@ the relevant installation instructions.

## [0.0.1] - 05.08.2019

* Initial release.
* Initial release.
2 changes: 1 addition & 1 deletion peek_and_pop/example/pubspec.lock
Expand Up @@ -28,7 +28,7 @@ packages:
name: bloc
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.0"
version: "2.0.0"
boolean_selector:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions peek_and_pop/example/pubspec.yaml
@@ -1,6 +1,6 @@
name: example
description: Example Project for peek_and_pop.
version: 1.0.2
version: 1.0.2+1
author: Ali Yigit Bireroglu <aliyigitbireroglu@gmail.com>
repository: https://github.com/aliyigitbireroglu/flutter-peek-and-pop
homepage: https://www.cosmossoftware.coffee
Expand All @@ -24,4 +24,4 @@ flutter:
uses-material-design: true

assets:
- assets/
- assets/
4 changes: 2 additions & 2 deletions peek_and_pop/lib/misc.dart
Expand Up @@ -47,7 +47,7 @@ TransformBloc transformBloc = TransformBloc();
///Use this function to scale down a widget as the Peek & Pop process proceeds.
Widget scaleDownWrapper(Widget child, double scaleDownCoefficient) {
return StreamBuilder(
stream: transformBloc.state,
stream: transformBloc,
builder: (BuildContext context, AsyncSnapshot<double> snapshot) {
return Transform.scale(
scale: snapshot.hasData ? (1.0 - (snapshot.data * scaleDownCoefficient)) : 1.0,
Expand All @@ -60,7 +60,7 @@ Widget scaleDownWrapper(Widget child, double scaleDownCoefficient) {
///Use this function to scale up a widget as the Peek & Pop process proceeds.
Widget scaleUpWrapper(Widget child, double scaleUpCoefficient) {
return StreamBuilder(
stream: transformBloc.state,
stream: transformBloc,
builder: (BuildContext context, AsyncSnapshot<double> snapshot) {
return Transform.scale(
scale: snapshot.hasData ? (1.0 + (snapshot.data * scaleUpCoefficient)) : 1.0,
Expand Down
6 changes: 3 additions & 3 deletions peek_and_pop/lib/peek_and_pop_child.dart
Expand Up @@ -350,7 +350,7 @@ class PeekAndPopChildState extends State<PeekAndPopChild> with SingleTickerProvi
willPeek = true;
_peekAndPopController.stage = Stage.WillPeek;
//print(_peekAndPopController.stage);
transformBloc.dispatch(1.0);
transformBloc.add(1.0);

int currentFramecount = 0;

Expand Down Expand Up @@ -591,7 +591,7 @@ class PeekAndPopChildState extends State<PeekAndPopChild> with SingleTickerProvi
_peekAndPopController.sigma,
);
double alpha = sigma / _peekAndPopController.sigma;
if (sigma != 0.0) transformBloc.dispatch(alpha);
if (sigma != 0.0) transformBloc.add(alpha);

return BackdropFilter(
filter: ImageFilter.blur(
Expand Down Expand Up @@ -639,7 +639,7 @@ class PeekAndPopChildState extends State<PeekAndPopChild> with SingleTickerProvi
double opacity = _peekAndPopController.stage == Stage.WillCancel || _peekAndPopController.stage == Stage.IsCancelled
? animationController.value
: 1.0;
if (opacity != 1.0) transformBloc.dispatch(opacity);
if (opacity != 1.0) transformBloc.add(opacity);

return Opacity(
opacity: opacity,
Expand Down
4 changes: 2 additions & 2 deletions peek_and_pop/lib/peek_and_pop_controller.dart
Expand Up @@ -443,7 +443,7 @@ class PeekAndPopControllerState extends State<PeekAndPopController> with TickerP

if (peekAndPopChild != null) peekAndPopChild.updateBlurTrackerNotifier();

transformBloc.dispatch(0.0);
transformBloc.add(0.0);
break;
default:
break;
Expand Down Expand Up @@ -982,7 +982,7 @@ class PeekAndPopControllerState extends State<PeekAndPopController> with TickerP
if (onClosePeekAndPop != null) onClosePeekAndPop(this);
}

transformBloc.dispatch(0.0);
transformBloc.add(0.0);

Navigator.of(context).pop();
}
Expand Down
4 changes: 3 additions & 1 deletion peek_and_pop/pretty_example/CHANGELOG.md
Expand Up @@ -5,6 +5,8 @@

* Improved performance.

* [1.0.2+1] Support for latest dependencies.

## [1.0.1] - 03.09.2019

* Minor changes.
Expand Down Expand Up @@ -133,4 +135,4 @@ the relevant installation instructions.

## [0.0.1] - 05.08.2019

* Initial release.
* Initial release.
4 changes: 2 additions & 2 deletions peek_and_pop/pretty_example/pubspec.yaml
@@ -1,6 +1,6 @@
name: pretty_example
description: Pretty Example Project for peek_and_pop.
version: 1.0.2
version: 1.0.2+1
author: Ali Yigit Bireroglu <aliyigitbireroglu@gmail.com>
repository: https://github.com/aliyigitbireroglu/flutter-peek-and-pop
homepage: https://www.cosmossoftware.coffee
Expand All @@ -24,4 +24,4 @@ flutter:
uses-material-design: true

assets:
- assets/
- assets/
2 changes: 1 addition & 1 deletion peek_and_pop/pubspec.lock
Expand Up @@ -28,7 +28,7 @@ packages:
name: bloc
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.0"
version: "2.0.0"
boolean_selector:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions peek_and_pop/pubspec.yaml
@@ -1,6 +1,6 @@
name: peek_and_pop
description: Peek & Pop implementation for Flutter based on the iOS functionality of the same name.
version: 1.0.2
version: 1.0.2+1
author: Ali Yigit Bireroglu <aliyigitbireroglu@gmail.com>
repository: https://github.com/aliyigitbireroglu/flutter-peek-and-pop
homepage: https://www.cosmossoftware.coffee
Expand All @@ -13,10 +13,10 @@ dependencies:
sdk: flutter
snap: ^1.0.4
transparent_image: ^1.0.0
bloc: ^0.15.0
bloc: ^2.0.0

dev_dependencies:
flutter_test:
sdk: flutter

flutter:
flutter:

0 comments on commit 2e21928

Please sign in to comment.