Skip to content

Instantly share code, notes, and snippets.

@DaniyarGilimov
Created July 8, 2019 16:33
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 DaniyarGilimov/bf75c3a28d0fe9fc3b404a01210fbddf to your computer and use it in GitHub Desktop.
Save DaniyarGilimov/bf75c3a28d0fe9fc3b404a01210fbddf to your computer and use it in GitHub Desktop.
Place to display the cards
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