/
main.dart
65 lines (59 loc) · 1.65 KB
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import 'package:flutter/material.dart';
void main(){
runApp(new MyCardApp());
}
class MyCardApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "BirthDay Card",
home: new BirthDayCard(),
);
}
}
class BirthDayCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Stack(
children: <Widget>[
new Container(
decoration: new BoxDecoration(
image: new DecorationImage(
image: new AssetImage('assets/images/custom_birthday_card.jpg',),
fit: BoxFit.cover
)
),
),
new Positioned(
child: new Container(
padding: const EdgeInsets.all(16.0),
child: new Text("Happy Birthday Sabdar",
style: new TextStyle(
fontFamily: 'Roboto',
decoration: TextDecoration.none,
fontSize: 25.0,
fontWeight: FontWeight.bold,
color: Colors.white
),
)
),
left: 0.0,
top: 16.0,
),
new Positioned(
child: new Container(
child: new Text("From \nSabdar",
style: new TextStyle(
fontFamily: 'Roboto',
decoration: TextDecoration.none,
fontSize: 30.0,
fontWeight: FontWeight.bold,
color: Colors.white,
),),
),
right: 10.0,
bottom: 16.0,
)],
);
}
}