Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- void main() {
- runApp(MyApp());
- }
- class MyApp extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- home: Scaffold(
- appBar: AppBar(
- title: Text("Latihan Stack dan Align"),
- ),
- body: Stack(
- children: <Widget>[
- Column(
- children: <Widget>[
- Flexible(
- flex: 1,
- child: Row(
- children: <Widget>[
- Flexible(
- flex: 1,
- child: Container(
- color: Colors.white,
- )),
- Flexible(
- flex: 1,
- child: Container(
- color: Colors.black12,
- ))
- ],
- ),
- ),
- Flexible(
- flex: 1,
- child: Row(
- children: <Widget>[
- Flexible(
- flex: 1,
- child: Container(
- color: Colors.black12,
- )),
- Flexible(
- flex: 1,
- child: Container(
- color: Colors.white,
- ))
- ],
- ),
- ),
- ],
- ),
- ListView(
- children: <Widget>[
- Column(
- children: <Widget>[
- Container(
- margin: EdgeInsets.all(10),
- child: Text(
- "Ini Adalah text yang ada di lapisan tengah dari Stack",
- style: TextStyle(fontSize: 30),
- ),
- ),
- Container(
- margin: EdgeInsets.all(10),
- child: Text(
- "Ini Adalah text yang ada di lapisan tengah dari Stack",
- style: TextStyle(fontSize: 30),
- ),
- ),
- Container(
- margin: EdgeInsets.all(10),
- child: Text(
- "Ini Adalah text yang ada di lapisan tengah dari Stack",
- style: TextStyle(fontSize: 30),
- ),
- ),
- Container(
- margin: EdgeInsets.all(10),
- child: Text(
- "Ini Adalah text yang ada di lapisan tengah dari Stack",
- style: TextStyle(fontSize: 30),
- ),
- ),
- Container(
- margin: EdgeInsets.all(10),
- child: Text(
- "Ini Adalah text yang ada di lapisan tengah dari Stack",
- style: TextStyle(fontSize: 30),
- ),
- ),
- Container(
- margin: EdgeInsets.all(10),
- child: Text(
- "Ini Adalah text yang ada di lapisan tengah dari Stack",
- style: TextStyle(fontSize: 30),
- ),
- ),
- ],
- )
- ],
- ),
- Align(
- alignment: Alignment(0, 0),
- // alignment: Alignment.bottomCenter,
- child: RaisedButton(
- child: Text("My Buton"),
- color: Colors.amber,
- onPressed: () {},
- ),
- )
- ],
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement