Created
January 14, 2020 14:52
-
-
Save ryanhossain9797/9936c571bafe4900482e66fcb2f6d50d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| // This widget is the root of your application. | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'Flutter Demo', | |
| theme: ThemeData.dark(), | |
| home: MyHomePage(), | |
| ); | |
| } | |
| } | |
| class MyHomePage extends StatefulWidget { | |
| MyHomePage({Key key}) : super(key: key); | |
| @override | |
| _MyHomePageState createState() => _MyHomePageState(); | |
| } | |
| class _MyHomePageState extends State<MyHomePage> { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text("Demo"), | |
| ), | |
| body: Container( | |
| child: Padding( | |
| padding: const EdgeInsets.all(20.0), | |
| child: CardWidget(), | |
| ), | |
| ) | |
| ); | |
| } | |
| } | |
| class CardWidget extends StatelessWidget { | |
| const CardWidget({ | |
| Key key, | |
| }) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return DecoratedBox( | |
| decoration: BoxDecoration(borderRadius: BorderRadius.circular(10),color: Colors.grey[800]), | |
| child: Padding( | |
| padding: const EdgeInsets.all(10.0), | |
| child: Column( | |
| mainAxisSize: MainAxisSize.min, | |
| crossAxisAlignment: CrossAxisAlignment.stretch, | |
| children: <Widget>[ | |
| Text("Lorem ipsum dolor sit amet", style: TextStyle(fontSize: 50),), | |
| Text("Lorem ipsum dolor sit amet", style: TextStyle(fontSize: 50),), | |
| Text("Lorem ipsum dolor sit amet", style: TextStyle(fontSize: 50),), | |
| ], | |
| ), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment