Skip to content

Commit

Permalink
version 2.0.0 is done, updated the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
noobcoder17 committed Sep 7, 2020
1 parent 3c82601 commit fa4125b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 23 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@
<sub>Built with ❤︎ by
<a href="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/noobcoder17">Akash Debnath</a>
</h2>
<p align="center">Drinkable is a Flutter App powered by Firebase to keep track your daily water intake.</p>
<p align="center">Drinkable is a Flutter App powered by Firebase to keep track your daily water intake and remind you to drink water by sending notifications.</p>



<h1 align="center">
<img src="screenshot/flutter_01.png" height="420" />
</h1>

In this app user will sign up using there Google Account (Google Sign-In) and if he/she is a new user, then he/she have to fill a form with basic details like gender, age, weight. We also added the daily wake up time. It will be used in next version where user will be notified to drink water in intervals. By providing the basis information, your can get your recommended daily water intake which is editable.
In this app user will sign up using their Google Account (Google Sign-In) and if he/she is a new user, then he/she have to fill a form with basic details like gender, age, weight. We also added the daily wake up time. It will be used to send you a notification dauly at that time. By providing the basis information, your can get your recommended daily water intake which is editable.

<p align='left'>
<img src="screenshot/flutter_06.png" height="380" />
<img src="screenshot/flutter_08.png" height="380" />
</p>

Now once you signed up, you can add water that you consumed. You can track your intakes in Statistics screen.
Now once you signed up, you can add water that you consumed. You can track your intakes in Statistics screen. If you add water, then you will be notified after one and half hour later to drink water again. If you reach your daily target, then you won't be notified for that day again.

In future if you want to update your profile data like you weight and get the recommended water intake automatically, then you can do it in profile page.
In future if you want to update your profile data like your weight and get the recommended water intake automatically, then you can do it in profile page.

<p align='left'>
<img src="screenshot/flutter_03.png" height="380" />
<img src="screenshot/flutter_04.png" height="380" />
</p>

This app also access your location and gets the weather from <a href="https://openweathermap.org/">Open Weather</a> api of your location.
This app also access your location and gets the weather details from <a href="https://openweathermap.org/">Open Weather</a> api of your location.

For this app I made a custom looking App Drawer.
<p align='left'>
Expand Down
12 changes: 3 additions & 9 deletions lib/providers/auth_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,14 @@ import '../models/app_user.dart';
//utils
import '../utils/notification_utils.dart';


class AuthProvider extends ChangeNotifier {
FirebaseFirestore _firestore = FirebaseFirestore.instance;
GoogleSignIn _googleSignIn = GoogleSignIn();
FirebaseAuth _firebaseAuth = FirebaseAuth.instance;

GoogleSignInAccount get googleAcount {
return _googleSignIn.currentUser;
}

User get user {
return _firebaseAuth.currentUser;
}

GoogleSignInAccount get googleAcount => _googleSignIn.currentUser;

User get user => _firebaseAuth.currentUser;

Future<bool> selectGoogleAcount() async {
try {
Expand Down
12 changes: 7 additions & 5 deletions lib/providers/home_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,20 @@ class HomeProvider extends ChangeNotifier {
}else{
_isInited = false;
_uid = null;
_weeklyData = null;
_appUser = null;
_weekColRef = null;
_userRef = null;
_currentWeek = null;
_weather = null;
_locationData = null;
}
notifyListeners();
}

Map<String,dynamic> get weather {
return _weather;
}
Map<String,dynamic> get weather => _weather;

AppUser get appUser => _appUser;

String get dailyTarget {
int target = _appUser.dailyTarget;
Expand All @@ -74,8 +78,6 @@ class HomeProvider extends ChangeNotifier {
return consumed/target;
}

AppUser get appUser => _appUser;

Future<void> init()async{
if(_isInited==false){
try {
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/notification_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Future<void> setDailyStartNotification(TimeOfDay time, String user)async{
await plugin.cancel(0);
await plugin.showDailyAtTime(
0,
"Good Morning, $user",
"Don't forget to dring enoung water today",
"Good morning, $user",
"Don't forget to dring enough water today",
Time(time.hour,time.minute),
notificationDetails
);
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A Flutter application which keeps track your water intake and remin

publish_to: 'none'

version: 1.0.0
version: 2.0.0

environment:
sdk: ">=2.7.0 <3.0.0"
Expand All @@ -18,8 +18,8 @@ dependencies:
provider: ^4.3.2+1
firebase_core: ^0.5.0
firebase_auth: ^0.18.0+1
google_sign_in: ^4.5.3
cloud_firestore: ^0.14.0+2
google_sign_in: ^4.5.3
location: ^3.0.2
http: ^0.12.2
flutter_local_notifications: ^1.4.4+4
Expand Down

0 comments on commit fa4125b

Please sign in to comment.