diff --git a/fude_app/lib/helpers/randomNoteModal.dart b/fude_app/lib/helpers/randomNoteModal.dart index 03d027f..e66f1e9 100644 --- a/fude_app/lib/helpers/randomNoteModal.dart +++ b/fude_app/lib/helpers/randomNoteModal.dart @@ -19,7 +19,7 @@ void showRandomNote(BuildContext context, DocumentSnapshot randomNote, child: AlertDialog( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)), - contentPadding: EdgeInsets.all(0), + contentPadding: EdgeInsets.all(2.5), content: ClipRRect( borderRadius: BorderRadius.circular(30), child: Container( @@ -65,9 +65,9 @@ void showRandomNote(BuildContext context, DocumentSnapshot randomNote, ? Expanded( child: Center( child: Text( - "You don't have any $category ideas yet.", + category == 'ALL' ? "You still need to add some ideas to this jar!" : "You don't have any ideas in this category yet!", textAlign: TextAlign.center, - overflow: TextOverflow.fade, + overflow: TextOverflow.clip, style: TextStyle( color: Theme.of(context).primaryColor == Color.fromRGBO(40, 40, 40, 1) @@ -75,7 +75,7 @@ void showRandomNote(BuildContext context, DocumentSnapshot randomNote, : Color.fromRGBO(40, 40, 40, 1), fontWeight: FontWeight.bold, fontSize: 20, - letterSpacing: 3, + letterSpacing: 1, ), ), ), diff --git a/fude_app/lib/pages/jars/jar.dart b/fude_app/lib/pages/jars/jar.dart index cfa8b8f..ecf52e4 100644 --- a/fude_app/lib/pages/jars/jar.dart +++ b/fude_app/lib/pages/jars/jar.dart @@ -266,7 +266,7 @@ class _JarPageState extends State { child: Column( children: [ Text( - 'SELECT A CATEGORY', + 'TAP A CATEGORY TO', style: TextStyle( color: Theme.of(context) .secondaryHeaderColor, @@ -280,7 +280,7 @@ class _JarPageState extends State { height: height * 0.01, ), Text( - 'TO PULL A RANDOM IDEA', + 'PULL A RANDOM IDEA', style: TextStyle( color: Theme.of(context) .secondaryHeaderColor, diff --git a/fude_app/lib/scoped-models/jar.dart b/fude_app/lib/scoped-models/jar.dart index be392e9..6bce7ab 100644 --- a/fude_app/lib/scoped-models/jar.dart +++ b/fude_app/lib/scoped-models/jar.dart @@ -52,6 +52,8 @@ mixin JarModel on Model { notifyListeners(); CollectionReference jarCollection = _firestore.collection('jars'); String imageLocation; + data['categories'].add('ALL'); + try { if (data['image'] != null) { imageLocation = await uploadJarImageToStorage(data['image']); @@ -361,11 +363,17 @@ mixin JarModel on Model { print(e); } if (notes.documents.length > 0) { - notes.documents.forEach((doc) { - if (doc.data['category'] == category) { + if (category == 'ALL') { + notes.documents.forEach((doc) { _jarNotesByCategory.add(doc); - } - }); + }); + } else { + notes.documents.forEach((doc) { + if (doc.data['category'] == category) { + _jarNotesByCategory.add(doc); + } + }); + } } else { return null; } diff --git a/fude_app/lib/widgets/form-inputs/add_jar_category_input.dart b/fude_app/lib/widgets/form-inputs/add_jar_category_input.dart index b5d8f02..8e1add9 100644 --- a/fude_app/lib/widgets/form-inputs/add_jar_category_input.dart +++ b/fude_app/lib/widgets/form-inputs/add_jar_category_input.dart @@ -22,7 +22,7 @@ class AddJarCategoryField extends StatelessWidget { final double height = MediaQuery.of(context).size.height; final double width = MediaQuery.of(context).size.width; return GestureDetector( - onLongPress: () => addCategoryToRemoveList(hint), + onLongPress: () => hint != 'ALL' ? addCategoryToRemoveList(hint) : print("you can't delete the all category"), child: Card( color: Theme.of(context).cardColor, elevation: 6.0, diff --git a/fude_app/lib/widgets/forms/edit_jar.dart b/fude_app/lib/widgets/forms/edit_jar.dart index ae9e361..83d7bb1 100644 --- a/fude_app/lib/widgets/forms/edit_jar.dart +++ b/fude_app/lib/widgets/forms/edit_jar.dart @@ -73,11 +73,11 @@ class EditJarForm extends StatelessWidget { enabled: false, addCategoryToRemoveList: addCategoryToRemoveList, ), - Text( + categories[i] != 'ALL' ? Text( 'Tap and hold to delete', style: TextStyle( color: Color.fromRGBO(131, 129, 129, 1), fontSize: 12), - ) + ) : Container() ], ), );