Flutter Frame Layout | RRTutors

Flutter Frame Layout | Stack Widget

Flutter uses Stack widgets to control child widgets at a layer. Child widgets can completely or partially cover the base widgets.


Stack control positions its children relative to the edges of its box. This class is useful if you just want to overlap multiple child widgets.


class StackWidget extends StatelessWidget {

 // This widget is the root of your application.


 Widget build(BuildContext context) {

   return MaterialApp(

     title: 'Flutter Tutorial',

     theme: ThemeData(

       primarySwatch: Colors.blue,


     home: Scaffold(

       body: SafeArea(child:


         child: Stack(

           alignment: const Alignment(0, 0),

           children: <Widget>[




               decoration: BoxDecoration(

                 color: Colors.white,


               child: Text('GLobal Warming',style: TextStyle(fontSize: 20),),