Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-226
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-226
2022-226
Commits
564e0c5d
Commit
564e0c5d
authored
Oct 05, 2022
by
Wickramasinghe R.J.P
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display information using onboarding screens
parent
1dfd0b7f
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
986 additions
and
91 deletions
+986
-91
lib/models/disease_description_point.dart
lib/models/disease_description_point.dart
+7
-0
lib/models/disease_individual.dart
lib/models/disease_individual.dart
+7
-0
lib/models/disease_individual_info.dart
lib/models/disease_individual_info.dart
+9
-0
lib/screens/disease_details_screen.dart
lib/screens/disease_details_screen.dart
+13
-8
lib/screens/disease_individual_info_screen.dart
lib/screens/disease_individual_info_screen.dart
+248
-0
lib/screens/disease_individual_screen.dart
lib/screens/disease_individual_screen.dart
+196
-0
lib/screens/disease_intelligence_screen.dart
lib/screens/disease_intelligence_screen.dart
+3
-1
lib/screens/disease_screen.dart
lib/screens/disease_screen.dart
+418
-62
lib/screens/home_screen.dart
lib/screens/home_screen.dart
+7
-13
lib/screens/welcome_screen.dart
lib/screens/welcome_screen.dart
+6
-7
lib/widgets/bottom_nav_bar.dart
lib/widgets/bottom_nav_bar.dart
+72
-0
No files found.
lib/models/disease_description_point.dart
0 → 100644
View file @
564e0c5d
class
DiseaseDescriptionPoint
{
late
String
descriptionPoint
;
DiseaseDescriptionPoint
({
required
this
.
descriptionPoint
,
});
}
lib/models/disease_individual.dart
0 → 100644
View file @
564e0c5d
class
DiseaseIndividualTopic
{
late
String
individualTopic
;
DiseaseIndividualTopic
({
required
this
.
individualTopic
,
});
}
lib/models/disease_individual_info.dart
0 → 100644
View file @
564e0c5d
class
DiseaseIndividualSubTopicInfo
{
late
String
individualTopicInfo
;
late
String
imgUrl
;
DiseaseIndividualSubTopicInfo
({
required
this
.
individualTopicInfo
,
required
this
.
imgUrl
,
});
}
lib/screens/disease_details_screen.dart
View file @
564e0c5d
import
'package:canis_care/screens/disease_individual_screen.dart'
;
import
'package:flutter/material.dart'
;
import
'../data/disease_sub_topics.dart'
;
...
...
@@ -15,6 +16,8 @@ class DiseaseDetails extends StatelessWidget {
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'Disease Information'
)),
body:
Container
(
color:
Colors
.
blue
[
100
],
padding:
EdgeInsets
.
only
(
bottom:
30
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
[
...
...
@@ -31,15 +34,17 @@ class DiseaseDetails extends StatelessWidget {
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
GestureDetector
(
onTap:
()
{
// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => DiseaseSubTopic(
// disease: disease,
// category: categories[index])),
// );
Navigator
.
of
(
context
).
push
(
MaterialPageRoute
(
builder:
(
context
)
=>
DiseaseIndividual
(
disease:
disease
,
category:
categories
[
index
],
)),
);
},
child:
Container
(
margin:
const
EdgeInsets
.
all
(
20
),
margin:
const
EdgeInsets
.
only
(
left:
15
,
right:
15
,
bottom:
15
,
top:
10
),
height:
120
,
child:
Stack
(
children:
[
...
...
@@ -96,7 +101,7 @@ class DiseaseDetails extends StatelessWidget {
width:
10
,
),
Text
(
"
${disease.diseaseName}
${categories[index].topic}
"
,
"
${disease.diseaseName}
${categories[index].topic}
"
,
style:
const
TextStyle
(
fontSize:
20
,
color:
Colors
.
white
),
)
...
...
lib/screens/disease_individual_info_screen.dart
0 → 100644
View file @
564e0c5d
This diff is collapsed.
Click to expand it.
lib/screens/disease_individual_screen.dart
0 → 100644
View file @
564e0c5d
import
'dart:convert'
;
import
'package:canis_care/models/disease_individual.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_staggered_animations/flutter_staggered_animations.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'package:http/http.dart'
;
import
'package:http/http.dart'
as
http
;
import
'../models/category.dart'
;
import
'../models/disease.dart'
;
import
'../widgets/bottom_nav_bar.dart'
;
import
'disease_individual_info_screen.dart'
;
class
DiseaseIndividual
extends
StatefulWidget
{
final
Disease
disease
;
final
Category
category
;
const
DiseaseIndividual
({
Key
?
key
,
required
this
.
disease
,
required
this
.
category
,
})
:
super
(
key:
key
);
@override
State
<
DiseaseIndividual
>
createState
()
=>
_DiseaseIndividualState
();
}
class
_DiseaseIndividualState
extends
State
<
DiseaseIndividual
>
{
Client
client
=
http
.
Client
();
List
<
String
>
subTopics
=
[];
List
<
DiseaseIndividualTopic
>
subTopicList
=
[];
@override
void
initState
()
{
_retrieveSubTopics
();
super
.
initState
();
}
_retrieveSubTopics
()
async
{
subTopics
=
[];
String
retrieveUri
=
"http://192.168.1.102:8000/disease/"
+
widget
.
disease
.
diseaseName
+
"/"
+
widget
.
category
.
topic
+
"/"
;
List
responses
=
json
.
decode
((
await
client
.
get
(
Uri
.
parse
(
retrieveUri
))).
body
);
for
(
var
element
in
responses
)
{
String
res
=
element
.
substring
(
element
.
indexOf
(
'#'
));
String
res2
=
res
.
replaceAll
(
"#"
,
""
);
subTopics
.
add
(
res2
);
}
// var newDiseases = List<String>.from(diseases);
subTopicList
=
List
.
generate
(
subTopics
.
length
,
(
index
)
=>
DiseaseIndividualTopic
(
individualTopic:
subTopics
[
index
]));
setState
(()
{});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
Text
(
widget
.
disease
.
diseaseName
+
" "
+
widget
.
category
.
topic
)),
body:
Stack
(
children:
[
Container
(
color:
Colors
.
blue
[
100
],
child:
Container
(
margin:
const
EdgeInsets
.
only
(
top:
15.0
),
child:
ListView
.
builder
(
itemCount:
subTopicList
.
length
,
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
AnimationConfiguration
.
staggeredGrid
(
position:
index
,
columnCount:
subTopicList
.
length
,
child:
SlideAnimation
(
child:
FadeInAnimation
(
child:
GestureDetector
(
onTap:
()
{
Navigator
.
of
(
context
).
push
(
MaterialPageRoute
(
builder:
(
context
)
=>
DiseaseIndividualTopicInfo
(
disease:
widget
.
disease
,
category:
widget
.
category
,
diseaseIndividualTopic:
subTopicList
[
index
],
)),
);
},
child:
Container
(
margin:
const
EdgeInsets
.
only
(
top:
10.0
),
padding:
const
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
),
child:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
20
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
const
EdgeInsets
.
only
(
bottom:
12
),
child:
Container
(
padding:
const
EdgeInsets
.
all
(
16
),
// width: SizeConfig.screenWidth * 0.78,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
cyan
,
),
child:
Row
(
children:
[
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
subTopicList
[
index
].
individualTopic
,
style:
GoogleFonts
.
lato
(
textStyle:
const
TextStyle
(
fontSize:
18
,
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
white
),
),
),
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
const
SizedBox
(
width:
8
),
],
),
const
SizedBox
(
height:
12
),
],
),
),
Container
(
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
),
height:
60
,
width:
1
,
color:
Colors
.
grey
[
200
]!.
withOpacity
(
0.7
),
),
/* RotatedBox(
quarterTurns: 3,
child: Text(
reminder!.isCompleted == 1 ? "NOTED" : "WAITING",
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.white),
),
),
),*/
]),
),
),
// child: Container(
// width: MediaQuery.of(context).size.width,
// padding: const EdgeInsets.all(15.0),
// child: ListTile(
// title: Text(
// diseaseList[index].diseaseName,
// style: const TextStyle(
// fontSize: 20, fontWeight: FontWeight.w600),
// ),
// onTap: () {
// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => DiseaseDetails(
// disease: diseaseList[index],
// )),
// );
// },
// trailing: IconButton(
// icon: const Icon(Icons.view_headline_sharp),
// // onPressed: () => {_deleteNote((notes[index].id).toString())},
// onPressed: () => {
// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => OnBoarding()),
// )
// }),
// ),
// ),
),
),
),
),
);
},
),
),
),
Positioned
(
bottom:
0
,
left:
0
,
right:
0
,
child:
BotBar
())
]),
);
}
}
lib/screens/disease_intelligence.dart
→
lib/screens/disease_intelligence
_screen
.dart
View file @
564e0c5d
...
...
@@ -109,7 +109,9 @@ class _DiseaseIntelligenceState extends State<DiseaseIntelligence> {
onTap:
()
{
Navigator
.
of
(
context
).
push
(
MaterialPageRoute
(
builder:
(
context
)
=>
DiseaseList
()),
builder:
(
context
)
=>
DiseaseList
(
title:
'All Diseases'
,
)),
);
},
child:
Container
(
...
...
lib/screens/disease_screen.dart
View file @
564e0c5d
This diff is collapsed.
Click to expand it.
lib/screens/home_screen.dart
View file @
564e0c5d
import
'package:canis_care/models/component.dart'
;
import
'package:canis_care/screens/disease_intelligence.dart'
;
import
'package:canis_care/screens/disease_intelligence
_screen
.dart'
;
import
'package:flutter/material.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
...
...
@@ -18,12 +18,6 @@ class _HomePageState extends State<HomePage> {
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
drawer:
SideDrawer
(),
appBar:
AppBar
(
title:
const
Text
(
"Home Page"
,
textAlign:
TextAlign
.
center
,
),
),
body:
Container
(
color:
Colors
.
blue
[
100
],
alignment:
Alignment
.
center
,
...
...
@@ -37,7 +31,7 @@ class _HomePageState extends State<HomePage> {
child:
Stack
(
children:
[
Container
(
height:
2
50
,
height:
3
50
,
decoration:
const
BoxDecoration
(
image:
DecorationImage
(
image:
AssetImage
(
...
...
@@ -102,14 +96,14 @@ class _HomePageState extends State<HomePage> {
padding:
const
EdgeInsets
.
all
(
16
),
crossAxisSpacing:
5
,
mainAxisSpacing:
5
,
maxCrossAxisExtent:
2
5
0.0
,
maxCrossAxisExtent:
2
8
0.0
,
children:
[
GestureDetector
(
child:
Container
(
padding:
const
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
6
0
),
borderRadius:
BorderRadius
.
circular
(
4
0
),
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
...
...
@@ -143,7 +137,7 @@ class _HomePageState extends State<HomePage> {
padding:
const
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
6
0
),
borderRadius:
BorderRadius
.
circular
(
4
0
),
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
...
...
@@ -183,7 +177,7 @@ class _HomePageState extends State<HomePage> {
padding:
const
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
6
0
),
borderRadius:
BorderRadius
.
circular
(
4
0
),
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
...
...
@@ -217,7 +211,7 @@ class _HomePageState extends State<HomePage> {
padding:
const
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
6
0
),
borderRadius:
BorderRadius
.
circular
(
4
0
),
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
...
...
lib/screens/welcome_screen.dart
View file @
564e0c5d
...
...
@@ -29,13 +29,12 @@ class WelcomeScreen extends StatelessWidget {
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
[
Center
(
child:
ClipOval
(
child:
Container
(
width:
180
,
height:
180
,
color:
Colors
.
transparent
,
alignment:
Alignment
.
center
,
child:
Image
.
asset
(
"images/logo1.png"
),
child:
CircleAvatar
(
backgroundColor:
Colors
.
cyan
,
radius:
80.0
,
child:
CircleAvatar
(
radius:
70.0
,
child:
ClipOval
(
child:
Image
.
asset
(
"images/logo1.png"
)),
),
),
),
...
...
lib/widgets/bottom_nav_bar.dart
0 → 100644
View file @
564e0c5d
import
'package:flutter/material.dart'
;
class
BotBar
extends
StatelessWidget
{
const
BotBar
({
Key
?
key
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
blue
[
100
],
boxShadow:
[
BoxShadow
(
blurRadius:
20
,
color:
Colors
.
black
.
withOpacity
(
0.2
),
offset:
Offset
.
zero
)
]),
height:
60
,
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceAround
,
children:
[
ClipOval
(
child:
Material
(
child:
IconButton
(
icon:
const
Icon
(
Icons
.
home
,
size:
30
,
color:
Colors
.
blue
,
),
onPressed:
()
{},
),
),
),
ClipOval
(
child:
Material
(
child:
IconButton
(
icon:
const
Icon
(
Icons
.
add_a_photo
,
size:
30
,
color:
Colors
.
blue
,
),
onPressed:
()
{},
),
),
),
ClipOval
(
child:
Material
(
child:
IconButton
(
icon:
const
Icon
(
Icons
.
account_circle
,
size:
30
,
color:
Colors
.
blue
,
),
onPressed:
()
{},
),
),
),
ClipOval
(
child:
Material
(
child:
IconButton
(
icon:
const
Icon
(
Icons
.
ac_unit_rounded
,
size:
30
,
color:
Colors
.
blue
,
),
onPressed:
()
{},
),
),
),
],
),
);
}
}
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