Skip to content

Instantly share code, notes, and snippets.

@kennedisimbolo
Created November 29, 2020 15:01
Show Gist options
  • Save kennedisimbolo/9a3b9ad72a9e0740bfc4d7b21eb61de1 to your computer and use it in GitHub Desktop.
Save kennedisimbolo/9a3b9ad72a9e0740bfc4d7b21eb61de1 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Parsing ',
home: Scaffold(
appBar: AppBar(
title: Text('Flexible dan Stack'),
),
body: Stack(
children: <Widget>[
Column(
children: [
Flexible(
flex: 1,
child: Row(
children: [
Flexible(
flex: 1,
child: Container(color: Colors.white),
),
Flexible(
flex: 1,
child: Container(color: Colors.black),
),
],
)),
Flexible(
flex: 1,
child: Row(
children: [
Flexible(
flex: 1,
child: Container(color: Colors.black),
),
Flexible(
flex: 1,
child: Container(color: Colors.white),
),
],
)),
],
),
Container(
padding:EdgeInsets.all(10),
child:ListView(children:[
Text('Nama : Tigor Purba'),
Text('TTL : Sibolga, 05 November 1998'),
Text('Kelas : 5MIA2'),
Text('Jurusan : Manajemen Informatika'),
Text('Semester: 5'),
Text('Golongan Darah : O'),
],)),
Align(
alignment:Alignment(0,0.8),
child:
RaisedButton(
onPressed: () {},
child: Text("Tombol "),
),
),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment