-
Notifications
You must be signed in to change notification settings - Fork 10
/
cardsection.py
63 lines (51 loc) · 959 Bytes
/
cardsection.py
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
from flet import *
from data import menu_kfc
cardmenu = Row()
for x in menu_kfc:
cardmenu.controls.append(
Card(
elevation=20,
content=Container(
bgcolor="white",
width=150,
border_radius = border_radius.all(30),
content=Column([
Image(
src=x['image'],
border_radius = border_radius.all(30),
width=150,
height=110,
fit=ImageFit.CONTAIN
),
Container(
padding = padding.all(10),
content=Column([
Text(x['title'],size=16,weight="bold"),
Text(x['desc'],size=13),
# FOR PRICE AND BUTTON
Row([
Text(x['price'],size=23,weight="bold"),
IconButton(icon="add")
],alignment="spaceBetween")
])
)
])
)
)
)
sectioncard = Container(
padding = padding.only(top=20),
bgcolor= "#E3002A",
content=Column([
Container(
margin = margin.only(left=10),
content=Text("In Restaurant",
color="white",
size=30,weight="bold"
)
),
Row([
cardmenu
],scroll="auto")
])
)