making style Widget dynamic for elevated button

Hadoop Hadoop - Jul 22 - - Dev Community

I am trying to create a dynamic elevated button widget.

`class CustomeElevatedBtn extends StatelessWidget {
const CustomeElevatedBtn(
{required this.child_, required this.onPressed_, required this.style_});

final Widget child_;
final VoidCallback onPressed_;
final ??? style_;

@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: onPressed_,
child: child_,
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25),
),
padding: EdgeInsets.symmetric(horizontal: 16),
textStyle: TextStyle(fontSize: 14),
backgroundColor: Colors.orangeAccent,
foregroundColor: Colors.white),
);
}
}`


I want to make the
style widget dynamic, I mean ElevatedButton.styleFrom Widget also dynamic but I am unable to do so. How can I do it?

.
Terabox Video Player