Advertisement
AbiMulya

(Belajar Flutter) Conrainer

Oct 6th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.04 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() {
  4.   runApp(MyApp());
  5. }
  6.  
  7. class MyApp extends StatelessWidget {
  8.   // This widget is the root of your application.
  9.   @override
  10.   Widget build(BuildContext context) {
  11.     return MaterialApp(
  12.       home: Scaffold(
  13.         appBar: AppBar(
  14.           title: Text("Container"),
  15.         ),
  16.         body: Container(
  17.           color: Colors.red,
  18.           margin: EdgeInsets.fromLTRB(10, 15, 20, 25),
  19.           // margin: EdgeInsets.all(10),
  20.           padding: EdgeInsets.only(bottom: 20, top: 20),
  21.           // padding: EdgeInsets.all(10),
  22.           child: Container(
  23.             // color: Colors.blue,
  24.             // margin: EdgeInsets.all(10),
  25.             decoration: BoxDecoration(
  26.                 borderRadius: BorderRadius.circular(20),
  27.                 gradient: LinearGradient(
  28.                     begin: Alignment.topLeft,
  29.                     end: Alignment.bottomRight,
  30.                     colors: <Color>[Colors.amber, Colors.blue])),
  31.           ),
  32.         ),
  33.       ),
  34.     );
  35.   }
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement