Created
July 8, 2019 16:33
-
-
Save DaniyarGilimov/bf75c3a28d0fe9fc3b404a01210fbddf to your computer and use it in GitHub Desktop.
Place to display the cards
This file contains 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'; | |
import 'package:flutter/animation.dart'; | |
import 'package:animation_playground/classes/card.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo Card Game', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
), | |
home: MyHomePage(title: 'Flutter Demo Card Game Home Page'), | |
); | |
} | |
} | |
class MyHomePage extends StatefulWidget { | |
MyHomePage({Key key, this.title}) : super(key: key); | |
final String title; | |
@override | |
_MyHomePageState createState() => _MyHomePageState(); | |
} | |
class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin { | |
@override | |
void dispose() { | |
super.dispose(); | |
} | |
void initState() { | |
super.initState(); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: Stack( | |
children: <Widget>[ | |
CardItem( | |
color: Colors.blue, | |
value: 5, | |
), | |
CardItem( | |
color: Colors.deepOrange, | |
value: 8, | |
), | |
CardItem( | |
color: Colors.deepPurpleAccent, | |
value: 8, | |
) | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment