Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

please answer for flutter programming image text in transcribed
screenshot image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions