HomeiOS Developmentandroid - How ought to I take advantage of const within the...

android – How ought to I take advantage of const within the grammar under?


I am learning platters on my own. After I enter the code like under, it says to make use of const grammar just like the connected image, how can I add it with out errors?

enter picture description right here


class MyHomePage extends StatelessWidget {
  last String title; //
  MyHomePage({required this.title});

  @override
  Widget construct(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Textual content(
          title,
        ),
      ),
      physique: Middle(
        // little one: Picture.asset('pictures/tree.jpg'),
        little one: Textual content(
          'Whats up, Textual content Widget',
          type: TextStyle(
            fontSize: 25,
            coloration: Colours.purple,
          ),
        ),
      ),
    );
  }
}


Please give me reply bro…
I am begginner

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments