Question: please answer for flutter programming screenshot Task 1. Create a Flutter app. Your app should have four widgets: Mybop, MxHomePage Lightbulb and LiehtButton. Among these,
Task 1. Create a Flutter app. Your app should have four widgets: Mybop, MxHomePage Lightbulb and LiehtButton. Among these, MwApp and MyHomePage are already there in the example project you start with. You need to modify MyHomePage a bit, as explained below. Each of these four widgets should be stateless widgets with build functions. Mydep has a MaterialApp that contains MyHomePage as its home child (this is already there). MyHomePage has a Scaffold, receives a title in its constructor and uses it in its appBar (this is already there). The value of this title is "Lab 2". However, we want MxHomePage to be a stateless widget, unlike the sample code. In the body of the Scaffold, it should have a Center with a column widget that holds the Light Bulb and LehtButton widgets as its children (Center and Column are already there). We do not want a floatingActionButter, so remove it. LiebtBulb and LightButton, are also stateless widgets. They do not receive anything in their constructors, yet. LightBulb has a container, which has green color (Colors.green) and a padding of 5 (new Edeelnsets, all(5.0)). The Container has a Text as its child. The Text has OFF as its data LightButtoo has a Container, which has red color and a padding of 5. The Container has a MaterialButton as a child, which has blue color, black textColor, and null as the oppressed handler. The MaterialButton has a Text as a child, which says "Turn light on". The app should look like the screenshot below. OFF Turn light on
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
