Skip to content

Commit f9c94a6

Browse files
Remove unnecessary comments
1 parent b2e675d commit f9c94a6

File tree

15 files changed

+7
-260
lines changed

15 files changed

+7
-260
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -39,38 +39,3 @@ jobs:
3939
#5 run test
4040
- name: Test flutter app
4141
run: flutter test
42-
43-
# #6 build apk
44-
# - name: Build APK
45-
# run: flutter build apk --release
46-
47-
# #7 build aab
48-
# - name: Build appBundle
49-
# run: flutter build appbundle
50-
51-
# #8 build ipa
52-
# - name: Build IPA
53-
# run:
54-
# flutter build ipa --no-codesign
55-
# - name: Compress Archives and IPAs
56-
# run: |
57-
# cd build
58-
# tar -czf ios_build.tar.gz ios
59-
60-
# #9 get those build to be available to download
61-
# - name: Upload Artifacts
62-
# uses: actions/upload-artifact@v2
63-
# with:
64-
# name: Releases
65-
# path: |
66-
# build/app/outputs/flutter-apk/app-release.apk
67-
# build/app/outputs/bundle/release/app-release.aab
68-
# build/ios_build.tar.gz
69-
70-
# #10 create release with those builds
71-
# - name: Create Release
72-
# uses: ncipollo/release-action@v1
73-
# with:
74-
# artifacts: "build/app/outputs/flutter-apk/app-release.apk,build/app/outputs/bundle/release/app-release.aab,build/ios_build.tar.gz"
75-
# tag: v1.0.${{ github.run_number }}
76-
# token: ${{ secrets.TOKEN }}

lib/AuthenticateScreen/auth_methods/email_and_password_auth.dart

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:cloud_firestore/cloud_firestore.dart';
22
import 'package:cafedential/AuthenticateScreen/auth_methods/auth_enum.dart';
33
import 'package:firebase_auth/firebase_auth.dart';
4-
// import 'dart:convert' show utf8;
54

65
final _store = FirebaseFirestore.instance;
76

@@ -16,9 +15,7 @@ class EmailandPasswordAuth {
1615
'name': name,
1716
'email': email,
1817
'userid': user.uid,
19-
// 'pwd': utf8.encode(password),
2018
});
21-
// await userCredential.user!.sendEmailVerification();
2219
return EmailSignUpResults.SignUpComplete;
2320
} else {
2421
return EmailSignUpResults.SignUpFailed;
@@ -34,16 +31,7 @@ class EmailandPasswordAuth {
3431
if (userCredential.user!.email != null) {
3532
return EmailSignInResults.SignInComplete;
3633
}
37-
// if (userCredential.user!.emailVerified) {
38-
// return EmailSignInResults.SignInComplete;
39-
// } else {
40-
// final bool logOutResponse = await logOut();
41-
// if (logOutResponse) {
42-
// return EmailSignInResults.EmailNotVerified;
43-
// } else {
44-
return EmailSignInResults.UnexpectedError;
45-
// }
46-
// }
34+
return EmailSignInResults.UnexpectedError;
4735
} catch (e) {
4836
// print(e.toString());
4937
return EmailSignInResults.EmailOrPasswordInvalid;

lib/AuthenticateScreen/login_screen.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
import 'package:cafedential/AuthenticateScreen/auth_methods/auth_enum.dart';
44
import 'package:cafedential/AuthenticateScreen/auth_methods/auth_methods.dart';
55
import 'package:cafedential/AuthenticateScreen/auth_methods/email_and_password_auth.dart';
6-
// import 'package:firebase_auth/firebase_auth.dart';
76
import 'package:flutter/material.dart';
87
import 'package:flutter/services.dart';
98
import 'package:lottie/lottie.dart';
10-
// import 'package:modal_progress_hud/modal_progress_hud.dart';
119
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
1210
import '../../nav.dart';
1311

@@ -25,15 +23,13 @@ class _LoginScreenState extends State<LoginScreen> {
2523
final GlobalKey<FormState> _loginKey = GlobalKey<FormState>();
2624
final TextEditingController _emailController = TextEditingController();
2725
final TextEditingController _passwordController = TextEditingController();
28-
// final _auth = FirebaseAuth.instance;
26+
2927
bool showSpinner = false;
30-
// late String email;
31-
// late String password;
28+
3229
@override
3330
Widget build(BuildContext context) {
3431
return SafeArea(
3532
child: Scaffold(
36-
// backgroundColor: Colors.white,
3733
body: ModalProgressHUD(
3834
inAsyncCall: showSpinner,
3935
child: Padding(
@@ -62,7 +58,6 @@ class _LoginScreenState extends State<LoginScreen> {
6258
SizedBox(
6359
height: 230.0,
6460
child: Lottie.asset('assets/login-coffee.json'),
65-
// child: Lottie.network('https://assets8.lottiefiles.com/packages/lf20_nik29bnh.json'),
6661
),
6762
const SizedBox(
6863
height: 20.0,
@@ -101,7 +96,6 @@ class _LoginScreenState extends State<LoginScreen> {
10196
Padding(
10297
padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
10398
child: Container(
104-
// padding: EdgeInsets.fromLTRB(20.0, 20.0, 50.0, 10.0),
10599
decoration: BoxDecoration(
106100
gradient: const LinearGradient(
107101
colors: [

lib/AuthenticateScreen/register_screen.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import 'package:flutter/material.dart';
77
import 'package:lottie/lottie.dart';
88
import '../../nav.dart';
99
import 'package:firebase_auth/firebase_auth.dart';
10-
// import 'package:modal_progress_hud/modal_progress_hud.dart';
1110
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
1211

1312
class Register extends StatefulWidget {

lib/AuthenticateScreen/welcome_screen.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class _WelcomeState extends State<Welcome> {
3838
height: 300,
3939
width: 300,
4040
child: Lottie.asset('assets/welcome-coffee.json'),
41-
// child: Lottie.network('https://assets8.lottiefiles.com/private_files/lf30_kjpkr2oh.json'),
4241
),
4342
Column(
4443
crossAxisAlignment: CrossAxisAlignment.stretch,

lib/MainPageScreen/add_coffee_page.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'package:cafedential/MainPageScreen/main_methods/cloud_coffee_data.dart';
44
import 'package:flutter/material.dart';
55
import 'package:flutter/services.dart';
66
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
7-
// import 'package:modal_progress_hud/modal_progress_hud.dart';
87

98
class AddCoffeeData extends StatefulWidget {
109
final Function() notifyParent;

lib/MainPageScreen/card_page.dart

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -31,40 +31,7 @@ class _CardPageState extends State<CardPage> {
3131
onPressed: () {
3232
Navigator.push(context, MaterialPageRoute(builder: (context) => EditCoffeeData(coffeeList: widget.coffeeList, doc_id: widget.doc_id, notifyParent: widget.notifyParent)));
3333
},
34-
),
35-
36-
// IconButton(
37-
// icon: const Icon(Icons.delete),
38-
// onPressed: () async {
39-
// showDialog(
40-
// context: context,
41-
// builder: (context) {
42-
// return AlertDialog(
43-
// title: const Text('Delete this note?'),
44-
// actions: [
45-
// TextButton(
46-
// onPressed: () {
47-
// Navigator.pop(context);
48-
// },
49-
// child: const Text('Cancel'),
50-
// ),
51-
// TextButton(
52-
// onPressed: () async {
53-
// final User userCredential = FirebaseAuth.instance.currentUser!;
54-
// await FirebaseFirestore.instance.collection('users').doc(userCredential.uid).collection('coffee_notes').doc(widget.doc_id).delete().whenComplete((){
55-
// widget.notifyParent();
56-
// Navigator.pop(context);
57-
// });
58-
// },
59-
// child: const Text('Delete'),
60-
// ),
61-
// ],
62-
// );
63-
// },
64-
// );
65-
// },
66-
// ),
67-
34+
),
6835
],
6936
),
7037
body: SingleChildScrollView(
@@ -81,7 +48,6 @@ class _CardPageState extends State<CardPage> {
8148
return Column(
8249
key: const Key('coffee_info_column'),
8350
children: [
84-
// Text('index: ${widget.coffeeList.indexID}'),
8551
twoTextStyles(' Roast ','${widget.coffeeList.coffeeRoast}',' Date ','${widget.coffeeList.date}'),
8652
twoTextStyles(' Temperature ','${widget.coffeeList.temperature}', ' Grind Size ','${widget.coffeeList.grindSize}'),
8753
twoTextStyles(' Brew Ratio ','${widget.coffeeList.brewRatio}',' Brew Time ','${widget.coffeeList.brewTime} min'),
@@ -122,36 +88,20 @@ class _CardPageState extends State<CardPage> {
12288
style: const TextStyle(
12389
fontSize: 22,
12490
fontFamily: 'ArefRuqaalnk',
125-
// fontWeight: FontWeight.bold,
12691
),
12792
maxLines: 1,
12893
),
129-
// Text(
130-
// title,
131-
// style: const TextStyle(
132-
// fontSize: 22,
133-
// // fontWeight: FontWeight.bold,
134-
// fontFamily: 'ArefRuqaalnk',
135-
// ),
136-
// ),
13794
const SizedBox(height: 10,),
13895
Padding(
13996
padding: const EdgeInsets.all(8.0),
14097
child: AutoSizeText(
14198
content,
14299
style: const TextStyle(
143100
fontSize: 20,
144-
// fontWeight: FontWeight.bold,
145101
),
146102
maxLines: 2,
147103
),
148104
),
149-
// Text(
150-
// content,
151-
// style: const TextStyle(
152-
// fontSize: 20,
153-
// ),
154-
// ),
155105
],
156106
),
157107
),
@@ -212,12 +162,6 @@ class _CardPageState extends State<CardPage> {
212162
maxLines: 5,
213163
),
214164
),
215-
// Text(
216-
// content,
217-
// style: const TextStyle(
218-
// fontSize: 20,
219-
// ),
220-
// ),
221165
],
222166
),
223167
),

lib/MainPageScreen/edit_coffee_info_page.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import 'package:cafedential/MainPageScreen/main_methods/cloud_coffee_data.dart';
22
import 'package:flutter/material.dart';
33
import 'package:flutter/services.dart';
44
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
5-
// import 'package:flutter/src/foundation/key.dart';
6-
// import 'package:flutter/src/widgets/framework.dart';
7-
// import 'package:modal_progress_hud/modal_progress_hud.dart';
85

96
class EditCoffeeData extends StatefulWidget {
107
final Function() notifyParent;

lib/MainPageScreen/home_page.dart

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ import 'package:cloud_firestore/cloud_firestore.dart';
55
import 'package:cafedential/MainPageScreen/add_coffee_page.dart';
66
import 'package:cafedential/MainPageScreen/card_page.dart';
77
import 'package:cafedential/MainPageScreen/main_methods/cloud_coffee_data.dart';
8-
// import 'package:cafedential/nav.dart';
98
import 'package:firebase_auth/firebase_auth.dart';
109
import 'package:flutter/material.dart';
1110
import 'package:lottie/lottie.dart';
12-
// import 'package:modal_progress_hud/modal_progress_hud.dart';
1311
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
1412
class HomePage extends StatefulWidget {
1513
const HomePage({Key? key}) : super(key: key);
@@ -28,7 +26,6 @@ class _HomePageState extends State<HomePage> {
2826
refresh() {
2927
setState(() {
3028
didChangeDependencies();
31-
// getUserCoffeeNoteList();
3229
});
3330
}
3431

@@ -57,7 +54,6 @@ class _HomePageState extends State<HomePage> {
5754
SizedBox(
5855
height: 250.0,
5956
child: Lottie.asset('assets/no-data-coffee-time.json'),
60-
// child: Lottie.network('https://assets6.lottiefiles.com/packages/lf20_UTYENB.json'),
6157
),
6258
const Text('No Data ...', style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold)),
6359
const Text('Press the plus button to create your coffee data', style: TextStyle(fontSize: 15,)),
@@ -92,11 +88,7 @@ class _HomePageState extends State<HomePage> {
9288
have_data = false;
9389
});
9490
}
95-
// setState(() {
96-
// have_data = false;
97-
// });
9891
}
99-
// print('doc_id: $doc_id');
10092
}
10193
}
10294

@@ -139,18 +131,14 @@ class _HomeCardState extends State<HomeCard> {
139131
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
140132
maxLines: 2,
141133
),
142-
// Text(
143-
// "${widget.coffeeList.coffeeName}",
144-
// style: const TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
145-
// ),
146134
subtitle: Text(
147135
'\n${widget.coffeeList.date}',
148136
style: const TextStyle(fontSize: 15, color: Color.fromARGB(255, 138, 138, 138)),
149137
),
150138
trailing: Text(
151139
'Total Score: ${widget.coffeeList.totalScore}\nFinal Score: ${widget.coffeeList.finalScore?.substring(0, 4)}',
152140
style: const TextStyle(fontSize: 20, color: Color.fromARGB(255, 75, 75, 75)),
153-
),//Text('${coffeeList.totalScore} (${coffeeList.finalScore})'),
141+
),
154142
),
155143
onTap: () {
156144
Navigator.push(
@@ -183,16 +171,13 @@ class _HomeCardState extends State<HomeCard> {
183171
// print('Delete Success');
184172
widget.notifyParent();
185173
});
186-
// .catchError((error) => print('Failed to delete the note: $error'));
187174
setState(() {
188175
showSpinner = false;
189176
});
190177
// print('Going to pop the dialog');
191178
widget.notifyParent();
192179
// ignore: use_build_context_synchronously
193180
Navigator.pop(context);
194-
// Navigator.pop(context);
195-
// Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => Nav()));
196181
},
197182
child: const Text('Delete'),
198183
),

lib/MainPageScreen/main_methods/cloud_coffee_data.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ Widget coffeeUpdateTextFormField({required String? labeltext,required String? Fu
219219
labelText: '$labeltext ($initialValue)',
220220
labelStyle: const TextStyle(
221221
fontSize: 15,
222-
// fontWeight: FontWeight.bold,
223222
color: Color.fromARGB(255, 0, 0, 0),
224223
),
225224
errorBorder: OutlineInputBorder(
@@ -298,7 +297,6 @@ class CoffeeList {
298297
String? notes;
299298
String? totalScore;
300299
String? finalScore;
301-
// String? indexID;
302300

303301
CoffeeList();
304302

@@ -328,7 +326,6 @@ class CoffeeList {
328326
'notes': notes,
329327
'total_score': totalScore,
330328
'final_score': finalScore,
331-
// 'index': indexID,
332329
};
333330

334331
CoffeeList.fromSnapshot(snapshot) :

0 commit comments

Comments
 (0)