Skip to content

Commit 24ce5f9

Browse files
committed
fixed bug
1 parent cad973b commit 24ce5f9

File tree

4 files changed

+63
-2
lines changed

4 files changed

+63
-2
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ app.*.map.json
4545

4646
/android/app/google-services.json
4747

48-
README.md
48+
/lib/values/api_key.dart

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Drinkable
2+
3+
<h1 align="center">
4+
<img src="assets/images/big_logo.png" height="220" />
5+
<br>🌊 Drinkable 🌊<br>
6+
</h1>
7+
<h2 align="center">
8+
<sub>Built with ❤︎ by
9+
<a href="https://github.com/noobcoder17">Akash Debnath</a>
10+
<p>Drinkable is a Flutter App powered by Firebase to keep track your daily water intake.</p>
11+
</h2>
12+
13+
14+
15+
<h1 align="center">
16+
<img src="screenshot/flutter_01.png" height="420" />
17+
</h1>
18+
19+
In this app user will sign up using there Google Acount (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.
20+
21+
<p align='left'>
22+
<img src="screenshot/flutter_06.png" height="380" />
23+
<img src="screenshot/flutter_08.png" height="380" />
24+
</p>
25+
26+
Now once you signed up, you can add water that you consumned. You can track your intakes in Statistics screen.
27+
28+
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.
29+
30+
<p align='left'>
31+
<img src="screenshot/flutter_03.png" height="380" />
32+
<img src="screenshot/flutter_04.png" height="380" />
33+
</p>
34+
35+
This app also access your location and gets the weather from <a href="https://openweathermap.org/">Open Weather</a> api of your location.
36+
37+
For this app I made a custom looking App Drawer.
38+
<p align='left'>
39+
<img src="screenshot/flutter_02.png" height="380" />
40+
</p>
41+
42+
I made this app for my own use and added it on GitHub so that others can use it also.
43+
44+
## Getting Started
45+
Just Clone the repository and inside the repository run <i>flutter create .</i>
46+
47+
Create a Firebase project and add this app in the firebase project with SHA-1 and SHA-256 hash of your signing certificate. Follow the instructions and add <i>google-services.json</i> file in Adroid's App level directory. Then enable Google Sing-In from Firebase Authentication's Sign-In Methods.
48+
49+
Then connect your emulator and run the app by <i>flutter run</i>
50+
51+
You are GoodToGo.
52+
53+
**Free Software, Hell Yeah!**
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Launch Screen Assets
2+
3+
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4+
5+
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

lib/providers/home_provider.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import 'package:firebase_auth/firebase_auth.dart';
77
// utils
88
import '../utils/get_week.dart';
99

10+
//values
11+
import '../values/api_key.dart';
12+
1013
// models
1114
import '../models/weekly_data.dart';
1215
import '../models/app_user.dart';
@@ -92,7 +95,7 @@ class HomeProvider extends ChangeNotifier {
9295
if(canGetLocation){
9396
_locationData = await _location.getLocation();
9497
http.Response response = await http.get(
95-
'https://api.openweathermap.org/data/2.5/weather?lat=${_locationData.latitude}&lon=${_locationData.longitude}&appid=5c079888a15f3da50f160e44ce22723e&units=metric'
98+
'https://api.openweathermap.org/data/2.5/weather?lat=${_locationData.latitude}&lon=${_locationData.longitude}&appid=${keys['openweather']}&units=metric'
9699
);
97100
if(response.statusCode==200){
98101
final weatherInfo = jsonDecode(response.body);

0 commit comments

Comments
 (0)