Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- void main() {
- runApp(new MaterialApp(
- title: "Coba container",
- home: new Home(),
- ));
- }
- class Home extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return new Scaffold(
- body: new Container(
- child: new Text("Saya anaknya container", style: new TextStyle( color: Colors.white, fontSize: 20.0),),
- // color: Colors.yellowAccent,
- width: 300.0,
- height: 300.0,
- padding: const EdgeInsets.all(50.0),
- margin: const EdgeInsets.all(20.0),
- alignment: Alignment.center,
- decoration: new BoxDecoration(
- color: Colors.purpleAccent,
- boxShadow: [
- const BoxShadow(
- color: const Color(0xFF000000),
- offset: Offset.zero,
- blurRadius: 5.0),
- ],
- gradient: new LinearGradient(
- colors: [Colors.purpleAccent, Colors.deepPurpleAccent],
- )),
- ));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement