@@ -5,11 +5,9 @@ import 'package:cloud_firestore/cloud_firestore.dart';
55import 'package:cafedential/MainPageScreen/add_coffee_page.dart' ;
66import 'package:cafedential/MainPageScreen/card_page.dart' ;
77import 'package:cafedential/MainPageScreen/main_methods/cloud_coffee_data.dart' ;
8- // import 'package:cafedential/nav.dart';
98import 'package:firebase_auth/firebase_auth.dart' ;
109import 'package:flutter/material.dart' ;
1110import 'package:lottie/lottie.dart' ;
12- // import 'package:modal_progress_hud/modal_progress_hud.dart';
1311import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart' ;
1412class 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 }\n Final 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 ),
0 commit comments