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
'package:flutter/material.dart'
;
import
'../data/disease_sub_topics.dart'
;
import
'../data/disease_sub_topics.dart'
;
...
@@ -15,6 +16,8 @@ class DiseaseDetails extends StatelessWidget {
...
@@ -15,6 +16,8 @@ class DiseaseDetails extends StatelessWidget {
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'Disease Information'
)),
appBar:
AppBar
(
title:
const
Text
(
'Disease Information'
)),
body:
Container
(
body:
Container
(
color:
Colors
.
blue
[
100
],
padding:
EdgeInsets
.
only
(
bottom:
30
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
[
children:
[
...
@@ -31,15 +34,17 @@ class DiseaseDetails extends StatelessWidget {
...
@@ -31,15 +34,17 @@ class DiseaseDetails extends StatelessWidget {
itemBuilder:
(
BuildContext
context
,
int
index
)
{
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
GestureDetector
(
return
GestureDetector
(
onTap:
()
{
onTap:
()
{
// Navigator.of(context).push(
Navigator
.
of
(
context
).
push
(
// MaterialPageRoute(
MaterialPageRoute
(
// builder: (context) => DiseaseSubTopic(
builder:
(
context
)
=>
DiseaseIndividual
(
// disease: disease,
disease:
disease
,
// category: categories[index])),
category:
categories
[
index
],
// );
)),
);
},
},
child:
Container
(
child:
Container
(
margin:
const
EdgeInsets
.
all
(
20
),
margin:
const
EdgeInsets
.
only
(
left:
15
,
right:
15
,
bottom:
15
,
top:
10
),
height:
120
,
height:
120
,
child:
Stack
(
child:
Stack
(
children:
[
children:
[
...
@@ -96,7 +101,7 @@ class DiseaseDetails extends StatelessWidget {
...
@@ -96,7 +101,7 @@ class DiseaseDetails extends StatelessWidget {
width:
10
,
width:
10
,
),
),
Text
(
Text
(
"
${disease.diseaseName}
${categories[index].topic}
"
,
"
${disease.diseaseName}
${categories[index].topic}
"
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
20
,
color:
Colors
.
white
),
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> {
...
@@ -109,7 +109,9 @@ class _DiseaseIntelligenceState extends State<DiseaseIntelligence> {
onTap:
()
{
onTap:
()
{
Navigator
.
of
(
context
).
push
(
Navigator
.
of
(
context
).
push
(
MaterialPageRoute
(
MaterialPageRoute
(
builder:
(
context
)
=>
DiseaseList
()),
builder:
(
context
)
=>
DiseaseList
(
title:
'All Diseases'
,
)),
);
);
},
},
child:
Container
(
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/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:flutter/material.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
...
@@ -18,12 +18,6 @@ class _HomePageState extends State<HomePage> {
...
@@ -18,12 +18,6 @@ class _HomePageState extends State<HomePage> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
drawer:
SideDrawer
(),
drawer:
SideDrawer
(),
appBar:
AppBar
(
title:
const
Text
(
"Home Page"
,
textAlign:
TextAlign
.
center
,
),
),
body:
Container
(
body:
Container
(
color:
Colors
.
blue
[
100
],
color:
Colors
.
blue
[
100
],
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
...
@@ -37,7 +31,7 @@ class _HomePageState extends State<HomePage> {
...
@@ -37,7 +31,7 @@ class _HomePageState extends State<HomePage> {
child:
Stack
(
child:
Stack
(
children:
[
children:
[
Container
(
Container
(
height:
2
50
,
height:
3
50
,
decoration:
const
BoxDecoration
(
decoration:
const
BoxDecoration
(
image:
DecorationImage
(
image:
DecorationImage
(
image:
AssetImage
(
image:
AssetImage
(
...
@@ -102,14 +96,14 @@ class _HomePageState extends State<HomePage> {
...
@@ -102,14 +96,14 @@ class _HomePageState extends State<HomePage> {
padding:
const
EdgeInsets
.
all
(
16
),
padding:
const
EdgeInsets
.
all
(
16
),
crossAxisSpacing:
5
,
crossAxisSpacing:
5
,
mainAxisSpacing:
5
,
mainAxisSpacing:
5
,
maxCrossAxisExtent:
2
5
0.0
,
maxCrossAxisExtent:
2
8
0.0
,
children:
[
children:
[
GestureDetector
(
GestureDetector
(
child:
Container
(
child:
Container
(
padding:
const
EdgeInsets
.
only
(
padding:
const
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
child:
ClipRRect
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
6
0
),
borderRadius:
BorderRadius
.
circular
(
4
0
),
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
...
@@ -143,7 +137,7 @@ class _HomePageState extends State<HomePage> {
...
@@ -143,7 +137,7 @@ class _HomePageState extends State<HomePage> {
padding:
const
EdgeInsets
.
only
(
padding:
const
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
child:
ClipRRect
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
6
0
),
borderRadius:
BorderRadius
.
circular
(
4
0
),
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
...
@@ -183,7 +177,7 @@ class _HomePageState extends State<HomePage> {
...
@@ -183,7 +177,7 @@ class _HomePageState extends State<HomePage> {
padding:
const
EdgeInsets
.
only
(
padding:
const
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
child:
ClipRRect
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
6
0
),
borderRadius:
BorderRadius
.
circular
(
4
0
),
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
...
@@ -217,7 +211,7 @@ class _HomePageState extends State<HomePage> {
...
@@ -217,7 +211,7 @@ class _HomePageState extends State<HomePage> {
padding:
const
EdgeInsets
.
only
(
padding:
const
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
top:
10
,
left:
10
,
right:
10
,
bottom:
10
),
child:
ClipRRect
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
6
0
),
borderRadius:
BorderRadius
.
circular
(
4
0
),
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
color:
Colors
.
blueAccent
.
withOpacity
(
0.6
)),
...
...
lib/screens/welcome_screen.dart
View file @
564e0c5d
...
@@ -29,13 +29,12 @@ class WelcomeScreen extends StatelessWidget {
...
@@ -29,13 +29,12 @@ class WelcomeScreen extends StatelessWidget {
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
[
children:
[
Center
(
Center
(
child:
ClipOval
(
child:
CircleAvatar
(
child:
Container
(
backgroundColor:
Colors
.
cyan
,
width:
180
,
radius:
80.0
,
height:
180
,
child:
CircleAvatar
(
color:
Colors
.
transparent
,
radius:
70.0
,
alignment:
Alignment
.
center
,
child:
ClipOval
(
child:
Image
.
asset
(
"images/logo1.png"
)),
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