Skip to content

Commit 9948b61

Browse files
committed
Edited animated button width
1 parent 08840f8 commit 9948b61

1 file changed

Lines changed: 15 additions & 24 deletions

File tree

lib/components/buttons/animated_piwigo_button.dart

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,22 @@ class AnimatedPiwigoButton extends StatelessWidget {
2323
return AnimatedOpacity(
2424
duration: const Duration(milliseconds: 150),
2525
opacity: disabled ? 0.5 : 1,
26-
child: Container(
26+
child: RoundedLoadingButton(
27+
controller: controller,
28+
duration: const Duration(milliseconds: 500),
29+
completionDuration: const Duration(milliseconds: 300),
30+
// resetDuration: const Duration(seconds: 1),
31+
resetAfterDuration: false,
32+
animateOnTap: false,
33+
color: color,
34+
elevation: 0.0,
35+
borderRadius: 10.0,
2736
height: 56.0,
28-
constraints: BoxConstraints(
29-
maxWidth: Settings.modalMaxWidth,
30-
),
31-
child: LayoutBuilder(builder: (context, constraints) {
32-
return RoundedLoadingButton(
33-
controller: controller,
34-
duration: const Duration(milliseconds: 500),
35-
completionDuration: const Duration(milliseconds: 300),
36-
// resetDuration: const Duration(seconds: 1),
37-
resetAfterDuration: false,
38-
animateOnTap: false,
39-
color: color,
40-
elevation: 0.0,
41-
borderRadius: 10.0,
42-
height: 56.0,
43-
width: constraints.maxWidth,
44-
onPressed:
45-
controller.currentState == ButtonState.loading || disabled
46-
? () {}
47-
: onPressed,
48-
child: child ?? const SizedBox(),
49-
);
50-
}),
37+
width: Settings.modalMaxWidth,
38+
onPressed: controller.currentState == ButtonState.loading || disabled
39+
? () {}
40+
: onPressed,
41+
child: child ?? const SizedBox(),
5142
),
5243
);
5344
}

0 commit comments

Comments
 (0)