Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created March 28, 2020 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijayinyoutube/a8f4e0a8b457c2218a2ba06cae369feb to your computer and use it in GitHub Desktop.
Save vijayinyoutube/a8f4e0a8b457c2218a2ba06cae369feb 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,
home: MyPage(),
);
}
}
class MyPage extends StatefulWidget {
@override
_MyPageState createState() => _MyPageState();
}
class _MyPageState extends State<MyPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Wrap(
direction: Axis.horizontal,
spacing: 10,
runSpacing: 10,
children: <Widget>[
Row(children: <Widget>[
new Text("\n\nCards.,",
style: TextStyle(color: Colors.pink, fontSize: 25)),
]),
GestureDetector(
child: new Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
elevation: 10,
color: Colors.lightBlue,
child: Container(
width: 150,
height: 60,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const ListTile(
leading: Icon(Icons.home, size: 40),
title: Text("Home Card"),
)
],
)),
),
),
new Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
elevation: 10,
color: Colors.red,
child: Container(
width: 150,
height: 60,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const ListTile(
leading: Icon(Icons.message, size: 40),
title: Text("Message Card"),
)
],
)),
),
new Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
elevation: 10,
color: Colors.orangeAccent,
child: Container(
width: 150,
height: 60,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const ListTile(
leading: Icon(Icons.phone, size: 40),
title: Text("Phone Card"),
)
],
)),
),
],
),
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment