Skip to content

Commit

Permalink
made contact no optional(in model)
Browse files Browse the repository at this point in the history
  • Loading branch information
devout-coder committed Sep 8, 2023
1 parent 301db0c commit ad95d28
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 62 deletions.
2 changes: 1 addition & 1 deletion lib/models/student_model/student_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class StudentModel {
@JsonKey(name: "gradyear")
final String gradyear;
@JsonKey(name: "phoneNo")
final String phoneNum;
final String? phoneNum;
final String? div;
StudentModel({
required this.batch,
Expand Down
2 changes: 1 addition & 1 deletion lib/models/student_model/student_model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 0 additions & 60 deletions lib/utils/notification_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,72 +54,12 @@ class NotificationTypeC {
String yearBranchDivTopic;
String yearBranchDivBatchTopic;

// @JsonKey(name: "updateCount")
// int? updateCount;
// @JsonKey(name: "Batch")
// final String batch;
// @JsonKey(name: "Branch")
// final String branch;
// @JsonKey(name: "Name")
// final String name;
// @JsonKey(name: "email")
// final String email;
// @JsonKey(name: "gradyear")
// final String gradyear;
// @JsonKey(name: "phoneNo")
// final String phoneNum;
// final String div;
NotificationTypeC({
required this.notification,
required this.yearTopic,
required this.yearBranchTopic,
required this.yearBranchDivTopic,
required this.yearBranchDivBatchTopic,
});
// NotificationTypeC(
// String _notification,
// String _yearTopic,
// String _yearBranchTopic,
// String _yearBranchDivTopic,
// String _yearBranchDivBatchTopic) {
// notification = _notification;
// yearTopic = _yearTopic;
// yearBranchTopic = _yearBranchTopic;
// yearBranchDivTopic = _yearBranchDivTopic;
// yearBranchDivBatchTopic = _yearBranchDivBatchTopic;
// }
}

// final notificationTypeProvider =
// StateNotifierProvider<NotificationTypeNotifier, NotificationTypeC>((ref) {
// return NotificationTypeNotifier();
// });
//
// class NotificationTypeNotifier extends StateNotifier<NotificationTypeC> {
// NotificationTypeNotifier() : super(NotificationTypeC("All", "", "", "", ""));
//
// void makeTopic(WidgetRef ref, StudentModel? studentmodel) {
// if (ref.watch(firebaseAuthProvider).currentUser?.uid != null) {
// String studentYear = studentmodel!.gradyear.toString();
// String studentBranch = studentmodel.branch.toString();
// String studentDiv = studentmodel.div.toString();
// String studentBatch = studentmodel.batch.toString();
// // ref
// // .read(notificationTypeProvider.notifier)
// // .update((state) => state + newValue);
// state.yearTopic = studentYear;
// state.yearBranchTopic = "$studentYear-$studentBranch";
// state.yearBranchDivTopic = "$studentYear-$studentBranch-$studentDiv";
// state.yearBranchDivBatchTopic =
// "$studentYear-$studentBranch-$studentDiv-$studentBatch";
//
// // state = NotificationTypeC(
// // "All",
// // studentYear,
// // "$studentYear-$studentBranch",
// // "$studentYear-$studentBranch-$studentDiv",
// // "$studentYear-$studentBranch-$studentDiv-$studentBatch");
// debugPrint("state just updated in notification type provider ");
// }
// }
// }

0 comments on commit ad95d28

Please sign in to comment.