diff --git a/README.md b/README.md index 37dce15..bd33b98 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,5 @@ Add this to your pusbec.yaml dependencies: ```shinayser_essentials_flutter: git: url: https://github.com/shinayser/ShinayserEssentialsFlutter.git - ref: 1.17.1 + ref: 1.17.2 ``` diff --git a/lib/animation/showdown.dart b/lib/animation/showdown.dart index 40e9ea6..151d724 100644 --- a/lib/animation/showdown.dart +++ b/lib/animation/showdown.dart @@ -42,6 +42,16 @@ class ShowDown extends StatefulWidget { }) : this.offset = 0.2, super(key: key); + ///Creates a ShowUp with a offset = 0.1 (1/10 the child's height) + ShowDown.tenth({ + @required this.child, + this.delay, + this.duration, + this.animation, + Key key, + }) : this.offset = 0.1, + super(key: key); + @override _ShowDownState createState() => _ShowDownState(); } diff --git a/lib/animation/showup.dart b/lib/animation/showup.dart index 5496be7..86b76fa 100644 --- a/lib/animation/showup.dart +++ b/lib/animation/showup.dart @@ -42,6 +42,16 @@ class ShowUp extends StatefulWidget { }) : this.offset = 0.2, super(key: key); + ///Creates a ShowUp with a offset = 0.1 (1/10 the child's height) + ShowUp.tenth({ + @required this.child, + this.delay, + this.duration, + this.animation, + Key key, + }) : this.offset = 0.1, + super(key: key); + @override _ShowUpState createState() => _ShowUpState(); } @@ -55,10 +65,13 @@ class _ShowUpState extends State with SingleTickerProviderStateMixin { super.initState(); if (widget.animation == null) { - _animController = AnimationController(vsync: this, duration: Duration(milliseconds: widget.duration ?? 500)); + _animController = AnimationController( + vsync: this, + duration: Duration(milliseconds: widget.duration ?? 500)); } - final curve = CurvedAnimation(curve: Curves.ease, parent: _animController ?? widget.animation); + final curve = CurvedAnimation( + curve: Curves.ease, parent: _animController ?? widget.animation); _animOffset = Tween( begin: Offset(0.0, widget.offset ?? 1.0), end: Offset.zero, diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 2edcafa..37a723f 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -36,7 +36,7 @@ Color hexToColor(String code) { return Color(int.parse(code, radix: 16) + 0xFF000000); } -String capitalize(String text) => text[0].toUpperCase() + text.substring(1); +//String capitalize(String text) => text[0].toUpperCase() + text.substring(1); Duration parseDuration(String string) { int hours = 0; diff --git a/lib/widgets/lazy_stream_builder.dart b/lib/widgets/lazy_stream_builder.dart index 030b0a3..0bed5e4 100644 --- a/lib/widgets/lazy_stream_builder.dart +++ b/lib/widgets/lazy_stream_builder.dart @@ -14,7 +14,9 @@ class LazyStreamBuilder extends StreamBuilder { key: key, stream: stream, builder: builder, - initialData: (stream is BehaviorSubject) ? ((stream as BehaviorSubject).value) : null, + initialData: (stream is BehaviorSubject) + ? ((stream as BehaviorSubject).value) + : null, ); final Widget onWaiting; diff --git a/lib/widgets/pair_widget.dart b/lib/widgets/pair_widget.dart index 2e63dcd..77b64ad 100644 --- a/lib/widgets/pair_widget.dart +++ b/lib/widgets/pair_widget.dart @@ -5,6 +5,7 @@ class PairWidget extends StatelessWidget { final Widget child2; final double spacing; final Axis direction; + final CrossAxisAlignment crossAxisAlignment; const PairWidget({ Key key, @@ -12,6 +13,7 @@ class PairWidget extends StatelessWidget { this.child1, this.child2, this.spacing = 4, + this.crossAxisAlignment = CrossAxisAlignment.center, }) : super(key: key); const PairWidget.horizontal({ @@ -19,6 +21,7 @@ class PairWidget extends StatelessWidget { this.child1, this.child2, this.spacing = 4, + this.crossAxisAlignment = CrossAxisAlignment.center, }) : this.direction = Axis.horizontal, super(key: key); @@ -27,6 +30,7 @@ class PairWidget extends StatelessWidget { this.child1, this.child2, this.spacing = 4, + this.crossAxisAlignment = CrossAxisAlignment.center, }) : this.direction = Axis.vertical, super(key: key); @@ -35,13 +39,13 @@ class PairWidget extends StatelessWidget { if (direction == Axis.horizontal) { return Row( mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: crossAxisAlignment, children: _children(), ); } else { return Column( mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: crossAxisAlignment, children: _children(), ); } diff --git a/pubspec.lock b/pubspec.lock index 0c223fd..37ebb11 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -122,7 +122,7 @@ packages: name: rxdart url: "https://pub.dartlang.org" source: hosted - version: "0.23.0-dev.3" + version: "0.23.1" sky_engine: dependency: transitive description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 40893da..dd1f076 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: shinayser_essentials_flutter description: A new Flutter project. -version: 1.17.1 +version: 1.17.2 author: homepage: @@ -12,7 +12,7 @@ dependencies: sdk: flutter quiver: '>=2.0.0 <3.0.0' - rxdart: ^0.23.0-dev.3 + rxdart: ^0.23.1 dev_dependencies: flutter_test: