-
Notifications
You must be signed in to change notification settings - Fork 0
/
idapp2.dart
132 lines (125 loc) · 4.01 KB
/
idapp2.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import 'dart:html';
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
home: SkillupCard(),
));
class SkillupCard extends StatefulWidget {
@override
State<SkillupCard> createState() => _SkillupCardState();
}
class _SkillupCardState extends State<SkillupCard> {
int skillupLevel = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
// ENTIRE BACKGROUND COLOR STATED HERE
backgroundColor: Colors.grey[900],
// UP BAR WIDGET
appBar: AppBar(
title: Text('Skillup ID Card'),
centerTitle: true,
backgroundColor: Colors.grey[800],
elevation: 0.0,
),
// ACTION COUNTER BUTTON
floatingActionButton: FloatingActionButton(
onPressed: () {
setState(() {
skillupLevel += 1;
});
},
child: Icon(Icons.add),
backgroundColor: Colors.grey[800],
),
bottomNavigationBar: BottomNavigationBar(
// To fix the whiteness and invisibility, use type:BottomNavigationBarType.fixed
type: BottomNavigationBarType.fixed,
backgroundColor: Colors.grey[700],
selectedItemColor: Colors.amber,
unselectedItemColor: Colors.grey[400],
items: [
BottomNavigationBarItem(icon: Icon(Icons.account_circle_outlined), label: 'My Account'),
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
BottomNavigationBarItem(icon: Icon(Icons.menu_book_sharp), label: 'Learning'),
BottomNavigationBarItem(icon: Icon(Icons.phone), label: 'Call')
]),
body: Padding(
padding: EdgeInsets.fromLTRB(30.0, 40.0, 30.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// TO DROP A CIRCLE IMAGE FOR THE PASSPORT
Center(
child: CircleAvatar(
backgroundImage: AssetImage('asset/Passport1.png'),
radius: 50.0,
),
),
// PLACING A DIVIDER BETWEEN THE IMAGE AND NAME
Divider(
height: 90.0,
color: Colors.white,
),
Text(
'NAME',
style: TextStyle(
color: Colors.grey,
letterSpacing: 2.0,
),
),
// HEIGHT BETWEEN TWO WIDGET FOR VERTICAL DISTANCE
SizedBox(height: 10.0),
Text(
'Williams Gozie',
style: TextStyle(
color: Colors.amberAccent[200],
letterSpacing: 2.0,
fontSize: 28.0,
fontWeight: FontWeight.bold,
),
),
// HEIGHT BETWEEN TWO WIDGET FOR VERTICAL DISTANCE
SizedBox(height: 30.0),
Text(
'CURRENT SKILLUP LEVEL',
style: TextStyle(
color: Colors.grey,
letterSpacing: 2.0,
),
),
// // HEIGHT BETWEEN TWO WIDGET FOR VERTICAL DISTANCE
SizedBox(height: 10.0),
Text(
'$skillupLevel',
style: TextStyle(
color: Colors.amberAccent[200],
letterSpacing: 2.0,
fontSize: 28.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 30.0),
Row(
children: <Widget>[
Icon(
Icons.email,
color: Colors.grey[400],
),
// WIDTH BETWEEN TWO WIDGET FOR HORINZONTAL DISTANCE
SizedBox(width: 10.0),
Text(
style: TextStyle(
color: Colors.grey[400],
fontSize: 18.0,
letterSpacing: 1.0,
),
)
],
),
],
),
),
);
}
}