Advertisement
joaopaulofcc

Untitled

Sep 26th, 2020
1,143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.83 KB | None | 0 0
  1. import "package:flutter/material.dart";
  2.  
  3. void main() => runApp(MyApp());
  4.  
  5. class MyApp extends StatelessWidget {
  6.  
  7.   @override
  8.   Widget build(BuildContext context) {
  9.  
  10.     return MaterialApp(title : "Flutter Playground",
  11.       home : Scaffold(
  12.         body : Column(children : [
  13.           Spacer(),
  14.           Center(child : Opacity(opacity: .25, child : Text("Faded") )),
  15.           Spacer(),
  16.           Center(child : Theme (
  17.             data : ThemeData( accentColor : Colors.red ),
  18.             child : Container(
  19.               color : Theme.of(context).accentColor,
  20.               child : Text(
  21.                 "Text with a background color",
  22.                 style : Theme.of(context).textTheme.title,
  23.               )
  24.             )
  25.           )),
  26.           Spacer(),
  27.           Center(child : DecoratedBox(
  28.             decoration : BoxDecoration(
  29.               gradient : LinearGradient(
  30.                 begin : Alignment.topCenter,
  31.                 end : Alignment.bottomCenter,
  32.                 colors : [ Color(0xFF000000), Color(0xFFFF0000) ],
  33.                 tileMode : TileMode.repeated
  34.               )
  35.             ),
  36.             child : Container(width : 100, height : 100,
  37.               child : Text("Hello",
  38.                 style : TextStyle(color : Colors.white)
  39.               )
  40.             )
  41.           )),
  42.           Spacer(),
  43.           Center(child : Container(
  44.             color : Colors.yellow,
  45.             child : Transform(
  46.               alignment : Alignment.bottomLeft,
  47.               transform : Matrix4.skewY(0.4)..rotateZ(-3 / 12.0),
  48.               child : Container(
  49.                 padding : const EdgeInsets.all(12.0),
  50.                 color : Colors.red,
  51.                 child : Text("Eat at Joe's!")
  52.               )
  53.             )
  54.           )),
  55.           Spacer()
  56.         ])
  57.       )
  58.     );
  59.  
  60.   }
  61.  
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement