I want to make custom button on flutter. here is some code:
// class LoadingButton.dart
MaterialButton(
padding: EdgeInsets.all(Spacing().value(2)),
textColor: Colors.white,
disabledColor: Colors.grey[100],
...props
);
How can I add props dynamically without stating constructor one by one?
I've tried using ...props but it wont add to the props.
Thanks
There is no such thing in Dart. Only copy-pasting all properties will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With