-
Notifications
You must be signed in to change notification settings - Fork 0
/
top.dart
135 lines (130 loc) · 4.88 KB
/
top.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
133
134
135
import 'package:flutter/material.dart';
import 'package:neo/components/neomorphism.dart';
import 'package:neo/data/datalist.dart';
class TopScreen extends StatefulWidget {
const TopScreen({super.key});
@override
State<TopScreen> createState() => _TopScreenState();
}
class _TopScreenState extends State<TopScreen> {
final Color color = const HSLColor.fromAHSL(1, 210, 0.57, 0.91).toColor();
final Map data = neumorphismDataList;
final List users = neumorphismDataList['users'] as List;
int current = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: color,
body: SafeArea(
child: Column(
children: [
Container(
margin: const EdgeInsets.only(top: 15),
padding: const EdgeInsets.symmetric(horizontal: 15),
child: Row(
children: [
CircleAvatar(
backgroundImage: NetworkImage(data['logo']),
),
const SizedBox(width: 10),
Expanded(
child: Text(
"Hi, ${data['name']}",
style: TextStyle(fontSize: 18, color: Colors.grey[800]),
),
),
NeomorphismButton(
icon: Icons.search, onPressed: () => print('Search'))
],
),
),
Padding(
padding: const EdgeInsets.only(top: 45, left: 25),
child: Row(
children: [
Column(
children: [
NeomorphismButton(
icon: Icons.add,
width: 64,
height: 64,
isRounded: true,
onPressed: () {},
),
const SizedBox(height: 15),
const Text(
"Your\nHistory",
textAlign: TextAlign.center,
)
],
),
Expanded(
child: SizedBox(
height: 120,
child: ListView(
scrollDirection: Axis.horizontal,
children: [
for (var i in users)
Padding(
padding: const EdgeInsets.only(left: 15),
child: Column(
children: [
Stack(
children: [
Container(
width: 64,
height: 64,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(32),
border:
Border.all(color: Colors.cyan),
image: DecorationImage(
image: NetworkImage(
i['logo'],
),
),
),
),
if (i['is_active'])
Positioned(
bottom: 0,
right: 0,
child: Icon(
Icons.circle,
color: Colors.green[700],
size: 18,
))
],
),
const SizedBox(height: 15),
SizedBox(
width: 48,
child: Text(
i['name'],
overflow: TextOverflow.ellipsis,
),
)
],
),
)
],
),
),
)
],
),
)
],
),
),
floatingActionButton: NeomorphismButton(
icon: Icons.add,
onPressed: () {},
isRounded: true,
width: 64,
height: 64,
),
);
}
}