Last active
November 13, 2021 21:50
-
-
Save imaNNeo/8ebf4931e2b7dfcfbc513a8abd878236 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(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter4fun', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
), | |
home: const HomePage(), | |
); | |
} | |
} | |
class HomePage extends StatelessWidget { | |
const HomePage({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
backgroundColor: Colors.blueGrey, | |
body: GridView.count( | |
crossAxisCount: 2, | |
childAspectRatio: 1.7, | |
padding: const EdgeInsets.all(16), | |
crossAxisSpacing: 16, | |
mainAxisSpacing: 16, | |
children: const [ | |
Card(), | |
Card(), | |
Card(), | |
Card(), | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment