File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 2.0.2 (10-11-2023)
2+
3+ ## Release Highlights
4+ Performance and Bug Fixes.
5+
6+ ### Changes
7+ - [x] fix: Reversed animation and onTap as seperate concepts in InkWell widget
8+
9+ ### Closes
10+ - [x] closes #45
11+
112# 2.0.1 (09-11-2023)
213
314## Release Highlights
Original file line number Diff line number Diff line change @@ -130,9 +130,7 @@ class ScreenWidget extends StatelessWidget {
130130 buttonHeight: 60 ,
131131 buttonWidth: 100 ,
132132 enableAnimation: true ,
133- onPressed: () {
134- debugPrint ("Hello Neubrutalism" );
135- },
133+ onPressed: () => debugPrint ("hello" ),
136134 text: Text (
137135 "Start" ,
138136 style: GoogleFonts .robotoCondensed (
Original file line number Diff line number Diff line change @@ -138,15 +138,21 @@ class NeuButtonState extends State<NeuButton>
138138 Widget build (BuildContext context) {
139139 return InkWell (
140140 onTap: () {
141+ var doOnPressedAction = () => {
142+ if (widget.onPressed != null ) {widget.onPressed !()}
143+ };
144+
141145 if (widget.enableAnimation) {
146+ // do the on pressed action after the
147+ // first part of animation
142148 _controller.forward ().then ((value) {
143- if (widget.onPressed != null ) {
144- widget.onPressed !();
145- _controller.reverse ();
146- }
149+ doOnPressedAction ();
150+ _controller.reverse ();
147151 });
148- } else if (widget.onPressed != null ) {
149- widget.onPressed !();
152+ } else {
153+ // do on pressed action without any
154+ // animation
155+ doOnPressedAction ();
150156 }
151157 },
152158 child: AnimatedBuilder (
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ description: A Flutter package that provides a set of Neubrutalism-style UI
55maintainer : Deepraj Baidya <@deepraj02>
66repository : https://github.com/deepraj02/neubrutalism_ui.git
77issue_tracker : https://github.com/deepraj02/neubrutalism_ui/issues/
8- version : 2.0.1
8+ version : 2.0.2
99
1010environment :
1111 sdk : " >=2.19.0 <4.0.0"
You can’t perform that action at this time.
0 commit comments