Flutter Week 2
Flutter Week 2
void main() {
runApp(MyApp());
}
@override
State<MyApp> createState() => _MyAppState();
}
));
}
}
output :
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Combined Layout Example')),
body: Center(
child: Column(
//mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Row(
//mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Container(color: Colors.red, width: 50, height: 50),
Container(color: Colors.green, width: 50, height: 50),
Container(color: Colors.blue, width: 50, height: 50),
],
),
SizedBox(height: 20),
Stack(
alignment: Alignment.center,
children: <Widget>[
Container(color: Colors.red, width: 200, height: 200),
Container(color: Colors.green, width: 150, height: 150),
Container(color: Colors.blue, width: 100, height: 100),
],
),
],
),
),
),
);
}
}
Balaji Lanka,CSE UI Design using Flutter