Create a StatelessWidget called CustomButton in Flutter that takes two parameters: buttonText and onPressed. The button should display the buttonText and trigger the onPressed function when clicked. Style the button with a background color, padding, and rounded corners.
Requirements:
Example Code Usage:
dart
Copy code
CustomButton( buttonText: 'Press Me', onPressed: () { print('Button pressed'); }, );
Description:
Build a StatefulWidget in Flutter named CounterApp that displays a counter value and two buttons: Increment and Decrement. The Increment button should increase the counter value, while the Decrement button should decrease it. Ensure that the counter value updates on the screen as the buttons are pressed.
Requirements:
Example Code Usage:
dart
Copy code
CounterApp();
These questions focus on understanding the StatelessWidget for displaying static content and StatefulWidget for managing state changes in Flutter.