We need some basic widgets for creating our first flutter app. Widgets describe what their view should look like given their current configuration and state. When a widget’s state changes, the widget rebuilds its description. Here we dicuss some basic widgets for creating the flutter application.

1. Text Class Widget : –

Text class is like a label in android and iOS. For use this we need to create text class object and assign the propertis and text into them. The Text widget displays a string of text with single style. The string might break across multiple lines or might all be displayed on the same line depending on the layout constraints.

class ListViewPractice extends StatelessWidget {
  Widget build(BuildContext context) {
    return new Container(
      child: new Text( "data1 one", textAlign:  TextAlign.end, 
      textDirection: TextDirection.rtl,
      textScaleFactor: 2.0,
      overflow: TextOverflow. clip,
      style: new TextStyle(
         color: Colors.red[500],
         fontSize: 30.0,
         wordSpacing: 15.0,
         letterSpacing: 2.0,
         fontWeight: FontWeight.bold,
         decoration: TextDecoration.underline,
         decorationColor: Colors.green,
         decorationStyle: TextDecorationStyle.solid),
         softWrap:  true,
      )
    );
  }
}

2. IconButton class : –

An icon button is a picture printed on a Material widget that reacts to touches by filling with color (ink).

class ListViewPractice extends StatelessWidget {
   @override
  Widget build(BuildContext context) {
    return new Scaffold(
      body: new Center(
        child: new Container(
          width: 60.0,
          height: 60.0,
          color: Colors.red,
          child: new IconButton(
            highlightColor: Colors.blue,
            alignment: Alignment.center,
            splashColor: Colors.green,
            disabledColor: Colors.purple,
            padding: new EdgeInsets.all(0.0),
            icon: new Icon(Icons.add_a_photo), onPressed: ()=>{},),
        ),
      ),
    );
  }
}

void setState() {
  print("Button Press");
}

Download Demo From Here 

Related Post

Data Type And Storage And Keywords To store data inside the computer we need to first identify the type of data elements we need in our program. There are several different types of dat...
Decision Control Statement C has three major decision making instructions— the if statement, the if-else statement, and the switch statement. The if Statement It is used to ex...
E-Mail Format Formal Email / Letter Format A formal email is in general sent to someone you don’t know well or to someone who’s in authority. Examples of someone w...
Control Flow Statements | Swift tutorial Control Flow : Swift tutorial Swift Provides diffrent type of controll flow statements like: Loops Statements : Loops are used for perform the...
Firebase Push notification | Swift tutorial Push Notification by firebase in IOS.For Firebase Push notification we need to have paid apple developer account. You need to Enroll into the App...
Setting Class Path for Java Setting Class Path for Java In this tutorial we are study how we can set the java JDK class path. Java is an open source software, it is is freely...
Author

Write A Comment