-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from SAISURYAtalla/broadcast
Broadcasts screen frontend
- Loading branch information
Showing
12 changed files
with
271 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -285,31 +285,6 @@ class DummyStudents { | |
]; | ||
} | ||
|
||
// class DummySkills { | ||
// static List<Skill> skills = [ | ||
// Skill(id: '1', name: 'Flutter', level: 80), | ||
// Skill(id: '2', name: 'C++', level: 100), | ||
// Skill(id: '3', name: 'javascript', level: 20), | ||
// Skill(id: '4', name: 'Nodejs', level: 30), | ||
// Skill(id: '5', name: 'Reactjs', level: 40), | ||
// Skill(id: '6', name: 'MongoDB', level: 50), | ||
// Skill(id: '7', name: 'Graphic Designing', level: 60), | ||
// Skill(id: '8', name: 'chess', level: 70), | ||
// Skill(id: '9', name: 'cricket', level: 80), | ||
// Skill(id: '10', name: 'VScode', level: 100), | ||
// Skill(id: '11', name: 'Dart', level: 100), | ||
// Skill(id: '12', name: 'Typing', level: 90), | ||
// Skill(id: '13', name: 'Drawing', level: 80), | ||
// Skill(id: '14', name: 'Painting', level: 70), | ||
// Skill(id: '15', name: 'Sketching', level: 60), | ||
// Skill(id: '16', name: 'Programming', level: 50), | ||
// Skill(id: '17', name: 'Python', level: 40), | ||
// Skill(id: '18', name: 'C', level: 30), | ||
// Skill(id: '19', name: 'Speaking', level: 20), | ||
// Skill(id: '20', name: 'Sleeping', level: 10) | ||
// ]; | ||
// } | ||
|
||
class Dummyachievements { | ||
static List<Achievement> achievements = [ | ||
Achievement( | ||
|
@@ -547,135 +522,211 @@ class DummyFaculties { | |
id: '2', | ||
name: 'Prof. Johnson', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]], | ||
courses: [ | ||
DummyCourses.courses[1], | ||
DummyCourses.courses[6], | ||
DummyCourses.courses[11] | ||
], | ||
cabinNumber: 'C-102', | ||
department: 'Mechanical Engineering', | ||
), | ||
Faculty( | ||
id: '3', | ||
name: 'Dr. Brown', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]], | ||
courses: [ | ||
DummyCourses.courses[2], | ||
DummyCourses.courses[7], | ||
DummyCourses.courses[12] | ||
], | ||
cabinNumber: 'C-103', | ||
department: 'Electrical Engineering', | ||
), | ||
Faculty( | ||
id: '4', | ||
name: 'Prof. Davis', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]], | ||
courses: [ | ||
DummyCourses.courses[3], | ||
DummyCourses.courses[8], | ||
DummyCourses.courses[13] | ||
], | ||
cabinNumber: 'C-104', | ||
department: 'Civil Engineering'), | ||
Faculty( | ||
id: '5', | ||
name: 'Dr. Wilson', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]], | ||
courses: [ | ||
DummyCourses.courses[4], | ||
DummyCourses.courses[9], | ||
DummyCourses.courses[14] | ||
], | ||
cabinNumber: 'C-105', | ||
department: 'Chemical Engineering'), | ||
Faculty( | ||
id: '6', | ||
name: 'Prof. Miller', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]], | ||
courses: [ | ||
DummyCourses.courses[0], | ||
DummyCourses.courses[5], | ||
DummyCourses.courses[10] | ||
], | ||
cabinNumber: 'C-106', | ||
department: 'Biotechnology'), | ||
Faculty( | ||
id: '7', | ||
name: 'Dr. Turner', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]], | ||
courses: [ | ||
DummyCourses.courses[1], | ||
DummyCourses.courses[6], | ||
DummyCourses.courses[11] | ||
], | ||
cabinNumber: 'C-107', | ||
department: 'Aerospace Engineering'), | ||
Faculty( | ||
id: '8', | ||
name: 'Prof. Clark', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]], | ||
courses: [ | ||
DummyCourses.courses[2], | ||
DummyCourses.courses[7], | ||
DummyCourses.courses[12] | ||
], | ||
cabinNumber: 'C-108', | ||
department: 'Information Technology'), | ||
Faculty( | ||
id: '9', | ||
name: 'Dr. Harris', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]], | ||
courses: [ | ||
DummyCourses.courses[3], | ||
DummyCourses.courses[8], | ||
DummyCourses.courses[13] | ||
], | ||
cabinNumber: 'C-109', | ||
department: 'Mechatronics'), | ||
Faculty( | ||
id: '10', | ||
name: 'Prof. Turner', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]], | ||
courses: [ | ||
DummyCourses.courses[4], | ||
DummyCourses.courses[9], | ||
DummyCourses.courses[14] | ||
], | ||
cabinNumber: 'C-110', | ||
department: 'Robotics Engineering'), | ||
Faculty( | ||
id: '11', | ||
name: 'Dr. White', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]], | ||
courses: [ | ||
DummyCourses.courses[0], | ||
DummyCourses.courses[5], | ||
DummyCourses.courses[10] | ||
], | ||
cabinNumber: 'D-101', | ||
department: 'Industrial Engineering'), | ||
Faculty( | ||
id: '12', | ||
name: 'Prof. Allen', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]], | ||
courses: [ | ||
DummyCourses.courses[1], | ||
DummyCourses.courses[6], | ||
DummyCourses.courses[11] | ||
], | ||
cabinNumber: 'D-102', | ||
department: 'Computer Engineering'), | ||
Faculty( | ||
id: '13', | ||
name: 'Dr. Young', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]], | ||
courses: [ | ||
DummyCourses.courses[2], | ||
DummyCourses.courses[7], | ||
DummyCourses.courses[12] | ||
], | ||
cabinNumber: 'D-103', | ||
department: 'Software Engineering'), | ||
Faculty( | ||
id: '14', | ||
name: 'Prof. Walker', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]], | ||
courses: [ | ||
DummyCourses.courses[3], | ||
DummyCourses.courses[8], | ||
DummyCourses.courses[13] | ||
], | ||
cabinNumber: 'D-104', | ||
department: 'Environmental Engineering'), | ||
Faculty( | ||
id: '15', | ||
name: 'Dr. Lee', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]], | ||
courses: [ | ||
DummyCourses.courses[4], | ||
DummyCourses.courses[9], | ||
DummyCourses.courses[14] | ||
], | ||
cabinNumber: 'D-105', | ||
department: 'Petrolesum[ Engineer]ing'), | ||
Faculty( | ||
id: '16', | ||
name: 'Prof. Hall', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]], | ||
courses: [ | ||
DummyCourses.courses[0], | ||
DummyCourses.courses[5], | ||
DummyCourses.courses[10] | ||
], | ||
cabinNumber: 'D-106', | ||
department: 'Nuclear Engineering'), | ||
Faculty( | ||
id: '17', | ||
name: 'Dr. Miller', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]], | ||
courses: [ | ||
DummyCourses.courses[1], | ||
DummyCourses.courses[6], | ||
DummyCourses.courses[11] | ||
], | ||
cabinNumber: 'D-107', | ||
department: 'Biomedical Engineering'), | ||
Faculty( | ||
id: '18', | ||
name: 'Prof. Baker', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]], | ||
courses: [ | ||
DummyCourses.courses[2], | ||
DummyCourses.courses[7], | ||
DummyCourses.courses[12] | ||
], | ||
cabinNumber: 'D-108', | ||
department: 'Chemical Engineering'), | ||
Faculty( | ||
id: '19', | ||
name: 'Dr. Turner', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]], | ||
courses: [ | ||
DummyCourses.courses[3], | ||
DummyCourses.courses[8], | ||
DummyCourses.courses[13] | ||
], | ||
cabinNumber: 'D-109', | ||
department: 'Electronics Engineering'), | ||
Faculty( | ||
id: '20', | ||
name: 'Prof. Smith', | ||
email: '[email protected]', | ||
courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]], | ||
courses: [ | ||
DummyCourses.courses[4], | ||
DummyCourses.courses[9], | ||
DummyCourses.courses[14] | ||
], | ||
cabinNumber: 'D-110', | ||
department: 'Computer Science'), | ||
]; | ||
|
@@ -947,7 +998,11 @@ class DummyRooms { | |
Room(id: '16', name: 'Outdoor Sports Arena', vacant: true), | ||
Room(id: '17', name: 'Medical Clinic', vacant: false, occupantId: 'S004'), | ||
Room(id: '18', name: 'Music Room', vacant: true), | ||
Room(id: '19', name: 'Student Council Office', vacant: false, occupantId: 'T005'), | ||
Room( | ||
id: '19', | ||
name: 'Student Council Office', | ||
vacant: false, | ||
occupantId: 'T005'), | ||
Room(id: '20', name: 'Virtual Reality Lab', vacant: true), | ||
]; | ||
} | ||
|
@@ -1124,13 +1179,15 @@ class DummyAchievements { | |
id: '12', | ||
name: 'Training and Development', | ||
date: DateTime(2022, 4, 22), | ||
description: 'Contributed significantly to employee training and development.', | ||
description: | ||
'Contributed significantly to employee training and development.', | ||
), | ||
Achievement( | ||
id: '13', | ||
name: 'Quality Assurance Recognition', | ||
date: DateTime(2023, 2, 14), | ||
description: 'Acknowledged for ensuring high-quality standards in projects.', | ||
description: | ||
'Acknowledged for ensuring high-quality standards in projects.', | ||
), | ||
Achievement( | ||
id: '14', | ||
|
@@ -1166,13 +1223,15 @@ class DummyAchievements { | |
id: '19', | ||
name: 'Health and Wellness Initiative', | ||
date: DateTime(2023, 9, 10), | ||
description: 'Led initiatives to promote health and wellness in the workplace.', | ||
description: | ||
'Led initiatives to promote health and wellness in the workplace.', | ||
), | ||
Achievement( | ||
id: '20', | ||
name: 'Public Speaking Achievement', | ||
date: DateTime(2022, 1, 30), | ||
description: 'Received acclaim for public speaking skills at a conference.', | ||
description: | ||
'Received acclaim for public speaking skills at a conference.', | ||
), | ||
]; | ||
// You can use the dummyEntries list as needed in your application | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class Broadcast { | ||
final String title; | ||
final String body; | ||
final DateTime date; | ||
|
||
Broadcast({ | ||
required this.title, | ||
required this.body, | ||
required this.date, | ||
}); | ||
|
||
factory Broadcast.fromJson(Map<String, dynamic> json) { | ||
return Broadcast( | ||
title: json['title'], | ||
body: json['body'], | ||
date: DateTime.parse(json['date']), // Update parsing to 'date' | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:smart_insti_app/models/broadcast_schema.dart'; | ||
|
||
final broadcastProvider = FutureProvider<List<Broadcast>>((ref) async { | ||
await Future.delayed(const Duration(seconds: 2)); // Simulating delay | ||
return List.generate( | ||
10, | ||
(index) => Broadcast( | ||
title: 'Broadcast $index', | ||
body: 'This is the body of broadcast $index.', | ||
date: DateTime.now().subtract(Duration(days: index)), | ||
), | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,6 @@ class StudentState { | |
return students.firstWhere((student) => student.id == studentId); | ||
} catch (e) { | ||
return Student( | ||
// Default values or a placeholder student object | ||
id: '1', | ||
name: 'John Doe', | ||
email: '[email protected]', | ||
|
Oops, something went wrong.