Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2020-045
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
2020-045
2020-045
Commits
de6eccf5
Commit
de6eccf5
authored
Jan 07, 2021
by
Boteju W.J.M.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flutter app
parent
173ae855
Pipeline
#2035
failed with stages
Changes
9
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
157 additions
and
175 deletions
+157
-175
fitnessapp/lib/Screens/DogBreedRecognition/dog_breed_identification_screen.dart
.../DogBreedRecognition/dog_breed_identification_screen.dart
+9
-2
fitnessapp/lib/Screens/DogBreedRecognition/dog_details_screen.dart
...p/lib/Screens/DogBreedRecognition/dog_details_screen.dart
+122
-107
fitnessapp/lib/Screens/Home/MainHome.dart
fitnessapp/lib/Screens/Home/MainHome.dart
+5
-2
fitnessapp/lib/Screens/Login/components/body.dart
fitnessapp/lib/Screens/Login/components/body.dart
+3
-0
fitnessapp/lib/Screens/Signup/components/body.dart
fitnessapp/lib/Screens/Signup/components/body.dart
+7
-4
fitnessapp/lib/Screens/WalkingPatternRecognition/service.dart
...essapp/lib/Screens/WalkingPatternRecognition/service.dart
+2
-0
fitnessapp/lib/Screens/Welcome/components/body.dart
fitnessapp/lib/Screens/Welcome/components/body.dart
+3
-59
fitnessapp/lib/constants.dart
fitnessapp/lib/constants.dart
+3
-1
fitnessapp/lib/globals.dart
fitnessapp/lib/globals.dart
+3
-0
No files found.
fitnessapp/lib/Screens/DogBreedRecognition/dog_breed_identification_screen.dart
View file @
de6eccf5
...
@@ -9,7 +9,8 @@ import 'package:image_picker/image_picker.dart';
...
@@ -9,7 +9,8 @@ import 'package:image_picker/image_picker.dart';
import
'package:video_player/video_player.dart'
;
import
'package:video_player/video_player.dart'
;
import
'package:http/http.dart'
as
http
;
import
'package:http/http.dart'
as
http
;
import
'package:path_provider/path_provider.dart'
;
import
'package:path_provider/path_provider.dart'
;
import
'package:fitnessapp/globals.dart'
as
globals
;
import
'package:fitnessapp/Screens/WalkingPatternRecognition/service.dart'
;
import
'../../constants.dart'
;
import
'../../constants.dart'
;
import
'dog_details_screen.dart'
;
import
'dog_details_screen.dart'
;
import
'Dog.dart'
;
import
'Dog.dart'
;
...
@@ -37,6 +38,13 @@ class _DogBreedIdentificationState extends State<DogBreedIdentification> {
...
@@ -37,6 +38,13 @@ class _DogBreedIdentificationState extends State<DogBreedIdentification> {
final
TextEditingController
maxHeightController
=
TextEditingController
();
final
TextEditingController
maxHeightController
=
TextEditingController
();
final
TextEditingController
qualityController
=
TextEditingController
();
final
TextEditingController
qualityController
=
TextEditingController
();
@override
void
initState
()
{
super
.
initState
();
print
(
globals
.
username
);
print
((
globals
.
password2
).
runtimeType
);
}
Future
<
void
>
_showAlert
(
BuildContext
context
)
{
Future
<
void
>
_showAlert
(
BuildContext
context
)
{
return
showDialog
(
return
showDialog
(
context:
context
,
context:
context
,
...
@@ -293,7 +301,6 @@ class _DogBreedIdentificationState extends State<DogBreedIdentification> {
...
@@ -293,7 +301,6 @@ class _DogBreedIdentificationState extends State<DogBreedIdentification> {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
print
(
"Heree"
);
return
Scaffold
(
return
Scaffold
(
body:
Center
(
body:
Center
(
child:
Column
(
child:
Column
(
...
...
fitnessapp/lib/Screens/DogBreedRecognition/dog_details_screen.dart
View file @
de6eccf5
This diff is collapsed.
Click to expand it.
fitnessapp/lib/Screens/Home/MainHome.dart
View file @
de6eccf5
...
@@ -68,10 +68,12 @@ class _ProfilePageState extends State<ProfilePage> {
...
@@ -68,10 +68,12 @@ class _ProfilePageState extends State<ProfilePage> {
}
}
getTotalWalkingMinutes
(
day
,
dog
)
async
{
getTotalWalkingMinutes
(
day
,
dog
)
async
{
print
(
"Came heree"
);
SearchService
.
getTotalWalkingMinutesPerDay
(
day
,
dog
).
then
((
responseBody
)
{
SearchService
.
getTotalWalkingMinutesPerDay
(
day
,
dog
).
then
((
responseBody
)
{
dynamic
data
=
jsonDecode
(
responseBody
);
dynamic
data
=
jsonDecode
(
responseBody
);
setState
(()
{
setState
(()
{
value
=
data
[
0
][
'minutes per day'
];
value
=
data
[
0
][
'minutes per day'
];
print
(
value
);
if
(
value
!=
0
)
{
if
(
value
!=
0
)
{
value
=
value
.
toInt
();
value
=
value
.
toInt
();
walkingHrs
=
value
~/
60
;
walkingHrs
=
value
~/
60
;
...
@@ -90,6 +92,7 @@ class _ProfilePageState extends State<ProfilePage> {
...
@@ -90,6 +92,7 @@ class _ProfilePageState extends State<ProfilePage> {
}
}
getTotalRunningMinutes
(
day
,
dog
)
async
{
getTotalRunningMinutes
(
day
,
dog
)
async
{
print
(
"Hereee in run"
);
SearchService
.
getTotalRunningMinutesPerDay
(
day
,
dog
).
then
((
responseBody
)
{
SearchService
.
getTotalRunningMinutesPerDay
(
day
,
dog
).
then
((
responseBody
)
{
dynamic
data
=
jsonDecode
(
responseBody
);
dynamic
data
=
jsonDecode
(
responseBody
);
setState
(()
{
setState
(()
{
...
@@ -257,7 +260,7 @@ class _ProfilePageState extends State<ProfilePage> {
...
@@ -257,7 +260,7 @@ class _ProfilePageState extends State<ProfilePage> {
TableRow
(
TableRow
(
children:
[
children:
[
ProfileInfoBigCard
(
ProfileInfoBigCard
(
firstText:
"
1 hr 45
mins"
,
firstText:
"
0 hrs 0
mins"
,
secondText:
"Resting"
,
secondText:
"Resting"
,
activity:
3
,
activity:
3
,
icon:
Image
.
asset
(
icon:
Image
.
asset
(
...
@@ -266,7 +269,7 @@ class _ProfilePageState extends State<ProfilePage> {
...
@@ -266,7 +269,7 @@ class _ProfilePageState extends State<ProfilePage> {
),
),
),
),
ProfileInfoBigCard
(
ProfileInfoBigCard
(
firstText:
"
1 hr 4
0 mins"
,
firstText:
"
0 hrs
0 mins"
,
activity:
4
,
activity:
4
,
secondText:
"Barking"
,
secondText:
"Barking"
,
icon:
Image
.
asset
(
icon:
Image
.
asset
(
...
...
fitnessapp/lib/Screens/Login/components/body.dart
View file @
de6eccf5
...
@@ -35,12 +35,15 @@ class _BodyState extends State<Body> {
...
@@ -35,12 +35,15 @@ class _BodyState extends State<Body> {
SearchService
.
login
(
username
,
password
).
then
((
responseBody
)
{
SearchService
.
login
(
username
,
password
).
then
((
responseBody
)
{
print
(
username
);
print
(
username
);
dynamic
data
=
jsonDecode
(
responseBody
);
dynamic
data
=
jsonDecode
(
responseBody
);
setState
(()
{
setState
(()
{
loading
=
true
;
loading
=
true
;
globals
.
userId
=
data
[
'user_id'
];
globals
.
userId
=
data
[
'user_id'
];
globals
.
token
=
data
[
'token'
];
globals
.
token
=
data
[
'token'
];
globals
.
email
=
data
[
'email'
];
globals
.
email
=
data
[
'email'
];
print
(
globals
.
userId
);
this
.
getDogsBasedOnUser
(
globals
.
userId
);
this
.
getDogsBasedOnUser
(
globals
.
userId
);
loading
=
false
;
loading
=
false
;
});
});
...
...
fitnessapp/lib/Screens/Signup/components/body.dart
View file @
de6eccf5
...
@@ -10,6 +10,8 @@ import 'package:fitnessapp/components/rounded_input_field.dart';
...
@@ -10,6 +10,8 @@ import 'package:fitnessapp/components/rounded_input_field.dart';
import
'package:fitnessapp/components/rounded_password_field.dart'
;
import
'package:fitnessapp/components/rounded_password_field.dart'
;
import
'../../../constants.dart'
;
import
'../../../constants.dart'
;
import
'../../../loading.dart'
;
import
'../../../loading.dart'
;
import
'package:fitnessapp/globals.dart'
as
globals
;
class
Body
extends
StatefulWidget
{
class
Body
extends
StatefulWidget
{
@override
@override
...
@@ -27,13 +29,14 @@ class _BodyState extends State<Body> {
...
@@ -27,13 +29,14 @@ class _BodyState extends State<Body> {
SearchService
.
register
(
username
,
password
,
email
).
then
((
responseBody
)
{
SearchService
.
register
(
username
,
password
,
email
).
then
((
responseBody
)
{
dynamic
data
=
jsonDecode
(
responseBody
);
dynamic
data
=
jsonDecode
(
responseBody
);
print
(
data
);
print
(
data
);
print
(
data
[
'error'
]);
setState
(()
{
setState
(()
{
loading
=
false
;
loading
=
false
;
if
((
data
[
'username'
]
!=
''
||
data
[
'username'
]
!=
null
)
&&
if
((
data
[
'user'
][
'username'
]
!=
''
||
data
[
'user'
][
'password'
]
!=
null
)
&&
data
[
'error'
]
==
'No'
)
{
data
[
'error'
]
==
'No error'
)
{
globals
.
username
=
data
[
'user'
][
'username'
];
globals
.
password
=
data
[
'user'
][
'password'
];
globals
.
password2
=
password
;
userExists
=
false
;
userExists
=
false
;
print
(
"New User"
);
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
...
...
fitnessapp/lib/Screens/WalkingPatternRecognition/service.dart
View file @
de6eccf5
...
@@ -85,7 +85,9 @@ class SearchService {
...
@@ -85,7 +85,9 @@ class SearchService {
body:
body
)
body:
body
)
.
then
((
http
.
Response
response
)
{
.
then
((
http
.
Response
response
)
{
return
response
;
return
response
;
});
});
return
response
.
body
;
return
response
.
body
;
}
}
...
...
fitnessapp/lib/Screens/Welcome/components/body.dart
View file @
de6eccf5
...
@@ -4,9 +4,7 @@ import 'package:fitnessapp/Screens/Signup/signup_screen.dart';
...
@@ -4,9 +4,7 @@ import 'package:fitnessapp/Screens/Signup/signup_screen.dart';
import
'package:fitnessapp/Screens/Welcome/components/background.dart'
;
import
'package:fitnessapp/Screens/Welcome/components/background.dart'
;
import
'package:fitnessapp/constants.dart'
;
import
'package:fitnessapp/constants.dart'
;
import
'package:flutter_local_notifications/flutter_local_notifications.dart'
;
import
'package:flutter_local_notifications/flutter_local_notifications.dart'
;
import
'package:timezone/data/latest.dart'
as
tz
;
import
'package:timezone/timezone.dart'
as
tz
;
import
'package:flutter_native_timezone/flutter_native_timezone.dart'
;
class
Body
extends
StatefulWidget
{
class
Body
extends
StatefulWidget
{
@override
@override
...
@@ -19,38 +17,10 @@ class _BodyState extends State<Body> {
...
@@ -19,38 +17,10 @@ class _BodyState extends State<Body> {
@override
@override
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
// var androidInitilize = new AndroidInitializationSettings('download');
// var iOSinitilize = new IOSInitializationSettings();
// var initilizationsSettings = new InitializationSettings(
// android: androidInitilize, iOS: iOSinitilize);
// fltrNotification = new FlutterLocalNotificationsPlugin();
// fltrNotification.initialize(initilizationsSettings,
// onSelectNotification: notificationSelected);
// _showNotification();
}
}
// Future _showNotification() async {
// final String currentTimeZone =
// await FlutterNativeTimezone.getLocalTimezone();
// tz.initializeTimeZones();
// tz.setLocalLocation(tz.getLocation(currentTimeZone));
// var androidDetails = new AndroidNotificationDetails(
// "Channel ID", "Desi programmer", "This is my channel",
// importance: Importance.max);
// var iSODetails = new IOSNotificationDetails();
// var generalNotificationDetails =
// new NotificationDetails(android: androidDetails, iOS: iSODetails);
// await fltrNotification.periodicallyShow(
// 1,
// 'Times Uppp',
// 'Scheduled Notification',
// RepeatInterval.everyMinute,
// generalNotificationDetails,
// androidAllowWhileIdle: true);
// }
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -108,36 +78,10 @@ class _BodyState extends State<Body> {
...
@@ -108,36 +78,10 @@ class _BodyState extends State<Body> {
borderRadius:
BorderRadius
.
circular
(
30
)),
borderRadius:
BorderRadius
.
circular
(
30
)),
),
),
),
),
// ButtonTheme(
// buttonColor: Colors.white,
// minWidth: 320,
// height: 55,
// child: OutlineButton(
// onPressed: () {
// _showNotification();
// },
// child: Text(
// "Notification",
// style: TextStyle(
// color: kPrimaryColor, fontWeight: FontWeight.bold),
// ),
// borderSide: BorderSide(color: kPrimaryColor, width: 2),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(30)),
// ),
// )
],
],
),
),
),
),
);
);
}
}
// Future notificationSelected(String payload) async {
// showDialog(
// context: context,
// builder: (context) => AlertDialog(
// content: Text("Notification : $payload"),
// ),
// );
// }
}
}
fitnessapp/lib/constants.dart
View file @
de6eccf5
...
@@ -10,7 +10,9 @@ const kPrimaryColor3 = Color(0xFF8ED3B2);
...
@@ -10,7 +10,9 @@ const kPrimaryColor3 = Color(0xFF8ED3B2);
// const kPrimaryColor = Color(0xFF388E3C);
// const kPrimaryColor = Color(0xFF388E3C);
const
kBackgroundColor
=
Color
(
0xFFFCFCFC
);
const
kBackgroundColor
=
Color
(
0xFFFCFCFC
);
const
kInactiveChartColor
=
Color
(
0xFFEAECEF
);
const
kInactiveChartColor
=
Color
(
0xFFEAECEF
);
const
kPrimaryGreenColor
=
Color
(
0xFF388E3C
);
// const kPrimaryGreenColor = Color(0xFF388E3C);
const
kPrimaryGreenColor
=
Color
(
0xFF55BD8B
);
const
kRedColour
=
Color
(
0xFFD75050
);
const
kRedColour
=
Color
(
0xFFD75050
);
const
kPurpleColour
=
Color
(
0xFF6E6CDF
);
const
kPurpleColour
=
Color
(
0xFF6E6CDF
);
const
kOrangeColour
=
Color
(
0xFFD75050
);
const
kOrangeColour
=
Color
(
0xFFD75050
);
...
...
fitnessapp/lib/globals.dart
View file @
de6eccf5
...
@@ -4,6 +4,9 @@ library my_prj.globals;
...
@@ -4,6 +4,9 @@ library my_prj.globals;
int
userId
;
int
userId
;
String
email
=
''
;
String
email
=
''
;
String
token
=
''
;
String
token
=
''
;
String
username
=
''
;
String
password
=
''
;
String
password2
=
''
;
//dog
//dog
int
dogId
;
int
dogId
;
...
...
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