Skip to content

Commit 2889221

Browse files
release:version 45
1 parent 9631413 commit 2889221

File tree

3 files changed

+35
-14
lines changed

3 files changed

+35
-14
lines changed

lib/screens/Status/status_page.dart

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,30 @@ class StatusViewState extends State<StatusView> {
140140
Color statusColor = _getStatusColor(status);
141141

142142
return GestureDetector(
143-
onTap: () => _updateCourseStatus(course, "bunked"),
144-
onDoubleTap: () => _updateCourseStatus(course, "cancelled"),
145-
onLongPress: () => _updateCourseStatus(course, "present"),
143+
onTap: () => {
144+
setState(() {
145+
statusColor = _getStatusColor("bunked");
146+
status = "bunked";
147+
}),
148+
_updateCourseStatus(course, "bunked")
149+
},
150+
onDoubleTap: () => {
151+
setState(() {
152+
statusColor = _getStatusColor("cancelled");
153+
status = "cancelled";
154+
}),
155+
_updateCourseStatus(course, "cancelled")
156+
},
157+
onLongPress: () => {
158+
setState(() {
159+
statusColor = _getStatusColor("present");
160+
status = "present";
161+
}),
162+
163+
_updateCourseStatus(course, "present")
164+
},
146165
child: AnimatedContainer(
147-
duration: Duration(milliseconds: 300),
166+
duration: Duration(milliseconds: 0),
148167
margin: const EdgeInsets.only(bottom: 16),
149168
decoration: BoxDecoration(
150169
borderRadius: BorderRadius.circular(16),

lib/screens/TimeTable/time_table_page.dart

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ class _TimeTablePageState extends State<TimeTablePage> {
156156
borderRadius: BorderRadius.circular(10),
157157
),
158158
child: Row(
159-
160159
children: [
161160
Icon(getRandomSubjectIcon(), size: 28, color: accentColor),
162161
const SizedBox(width: 16),
@@ -241,14 +240,17 @@ class _TimeTablePageState extends State<TimeTablePage> {
241240
hintText: 'Enter your Subject Name',
242241
prefixIcon: Icons.book,
243242
),
244-
const SizedBox(height: 20),
245-
Row(
243+
const SizedBox(width: 10),
244+
const Padding(padding: EdgeInsets.all(10) , child: Stack(
245+
alignment: Alignment.center,
246246
children: [
247-
Expanded(child: _buildDayDropdown()),
248-
const SizedBox(width: 10),
249-
Expanded(child: _buildCourseDropdown()),
247+
Text("OR" , style: TextStyle(fontSize: 20 , color: Colors.white , fontWeight: FontWeight.bold),),
248+
Divider(),
250249
],
251-
),
250+
),),
251+
_buildCourseDropdown(),
252+
const SizedBox(height: 20),
253+
_buildDayDropdown(),
252254
const SizedBox(height: 30),
253255
Center(child: _buildSubmitButton()),
254256
],
@@ -266,7 +268,7 @@ class _TimeTablePageState extends State<TimeTablePage> {
266268
controller: controller,
267269
onChanged: (courseName) {
268270
setState(() {
269-
_course = courseName.isEmpty ? "Course" : courseName;
271+
_course = courseName.isEmpty ? "Add Existing Course" : courseName;
270272
_useCourseDropDown = courseName.isEmpty;
271273
});
272274
},
@@ -321,7 +323,7 @@ class _TimeTablePageState extends State<TimeTablePage> {
321323
decoration: _getDropdownDecoration(
322324
prefixIcon: Icons.school),
323325
dropdownColor: cardColor,
324-
hint: Text("Course" , style: TextStyle(color: secondaryTextColor),),
326+
hint: Text("Select Existing Course" , style: TextStyle(color: secondaryTextColor),),
325327
style: const TextStyle(color: textColor),
326328
value: _useCourseDropDown ? null : "New Course",
327329
onChanged: (scheduleUrl) {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: bunk_mate
22
description: "A new Flutter project."
33
publish_to: "none"
4-
version: 1.0.0+3.1
4+
version: 1.0.0+4.5
55

66
environment:
77
sdk: ">=3.3.4 <4.0.0"

0 commit comments

Comments
 (0)