Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-256
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-256
2022-256
Commits
92ff4883
Commit
92ff4883
authored
May 08, 2022
by
Nilupul Jayasekara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement menu card
parent
f517e823
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
5 deletions
+93
-5
diabeta_app/lib/components/menu_card.dart
diabeta_app/lib/components/menu_card.dart
+93
-5
No files found.
diabeta_app/lib/components/menu_card.dart
View file @
92ff4883
import
'package:flutter/material.dart'
;
class
MenuCard
extends
StatefulWidget
{
const
MenuCard
({
Key
?
key
})
:
super
(
key:
key
);
const
MenuCard
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
MenuCard
>
createState
()
=>
_MenuCardState
();
...
...
@@ -19,7 +19,95 @@ class _MenuCardState extends State<MenuCard> {
borderRadius:
const
BorderRadius
.
all
(
Radius
.
circular
(
20
)),
color:
Colors
.
teal
[
200
],
),
child:
getWidgetByIndex
(
0
),
),
);
}
Widget
getWidgetByIndex
(
int
index
)
{
switch
(
index
)
{
case
0
:
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
const
SizedBox
(
height:
16
,
),
Text
(
'LATEST CHECK 29/04/2022 12:47 PM'
),
const
SizedBox
(
height:
20
,
),
const
Text
(
'WEEKLY ENTRIES'
,
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
),),
const
SizedBox
(
height:
20
,
),
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
36
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Column
(
children:
[
const
Text
(
'In Range'
),
Row
(
children:
[
Icon
(
Icons
.
thumb_up
,
size:
30
,
),
Text
(
'0'
,
style:
TextStyle
(
fontSize:
30
,
fontWeight:
FontWeight
.
bold
),
)
],
),
],
),
Column
(
children:
[
const
Text
(
'Below'
),
Row
(
children:
[
Icon
(
Icons
.
arrow_downward
,
size:
30
,
),
Text
(
'0'
,
style:
TextStyle
(
fontSize:
30
,
fontWeight:
FontWeight
.
bold
),
)
],
),
],
),
Column
(
children:
[
const
Text
(
'Above'
),
Row
(
children:
[
Icon
(
Icons
.
arrow_upward
,
size:
30
,
),
Text
(
'0'
,
style:
TextStyle
(
fontSize:
30
,
fontWeight:
FontWeight
.
bold
),
)
],
),
],
)
],
),
),
],
);
default
:
return
Container
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment