Skip to content

Commit

Permalink
Merge pull request #327 from RishavKumarSinha/bookmark_fixed
Browse files Browse the repository at this point in the history
Bookmark Navigation Fixed
  • Loading branch information
andoriyaprashant authored Oct 4, 2024
2 parents d15bf69 + c168cf7 commit e65e5f2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
5 changes: 2 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:opso/landing_page.dart';
import 'package:opso/programs%20screen/fossasia.dart';
import 'package:opso/programs%20screen/girl_script.dart';
import 'package:opso/programs%20screen/github_campus.dart';
Expand Down Expand Up @@ -49,14 +48,14 @@ class OpSoApp extends StatelessWidget {
"/progarm_page": (context) => const HomePage(),
"/girl_script_summer_of_code": (context) => const GSSOCScreen(),
"/social_winter_of_code": (context) => const SWOCScreen(),
"/season_of_sokde": (context) => const SeasonOfKDE(),
"/season_of_kde": (context) => const SeasonOfKDE(),
"/google_summer_of_code": (context) =>
GoogleSummerOfCodeScreen(),
"/google_season_of_docs": (context) =>
GoogleSeasonOfDocsScreen(),
"/summer_of_bitcoin": (context) => const SummerOfBitcoin(),
"/fossasia": (context) => const FOSSASIA(),
"/hacktoberfest_screen": (context) => const Hacktoberfest(),
"/Hacktoberfest": (context) => const Hacktoberfest(),
"/open_summer_of_code": (context) => const OpenSummerOfCode(),
"/hyperledger": (context) => const Hyperledger(),
"/rsoc": (context) => const RsocPage(),
Expand Down
26 changes: 13 additions & 13 deletions lib/programs screen/google_summer_of_code_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:ffi';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:opso/modals/book_mark_model.dart';
Expand All @@ -14,6 +12,8 @@ import '../widgets/year_button.dart';


class GoogleSummerOfCodeScreen extends StatefulWidget {
const GoogleSummerOfCodeScreen({super.key});

@override
State<GoogleSummerOfCodeScreen> createState() =>
_GoogleSummerOfCodeScreenState();
Expand All @@ -23,8 +23,8 @@ class GoogleSummerOfCodeScreen extends StatefulWidget {
class _GoogleSummerOfCodeScreenState extends State<GoogleSummerOfCodeScreen> {
bool _isRefreshing = false;
bool isBookmarked = true;
String currentPage = "/Google_summer_of_code";
String currentProject = "GoogleSummerOfCodeScreen";
String currentPage = "/google_summer_of_code";
String currentProject = "Google Summer of Code";
String selectedOrg = ''; // Ensure this is defined
List<Organization> gsoc2024 = [];
List<Organization> gsoc2023 = [];
Expand Down Expand Up @@ -91,7 +91,7 @@ class _GoogleSummerOfCodeScreenState extends State<GoogleSummerOfCodeScreen> {
gsoc2023 = orgData2023.organizations ?? [];
gsoc2024 = orgData2024.organizations ?? [];
orgList = gsoc2024; // Default to the latest year
allOrganizations = [...orgList.map((org) => org.name!).toSet()];
allOrganizations = [...orgList.map((org) => org.name).toSet()];
});
} catch (e) {
print('Error: $e');
Expand All @@ -111,7 +111,7 @@ class _GoogleSummerOfCodeScreenState extends State<GoogleSummerOfCodeScreen> {
}
if (!selectedLanguages.contains('All')) {
orgList = orgList.where((project) =>
selectedLanguages.every((language) => project.technologies?.contains(language) == true)
selectedLanguages.every((language) => project.technologies.contains(language) == true)
).toList();
}

Expand All @@ -133,8 +133,8 @@ class _GoogleSummerOfCodeScreenState extends State<GoogleSummerOfCodeScreen> {
..._getOrganizationsByYear(selectedYear)
.where((org) =>
selectedLanguages.contains('All') ||
org.technologies?.any(selectedLanguages.contains) == true)
.map((org) => org.name!)
org.technologies.any(selectedLanguages.contains) == true)
.map((org) => org.name)
.toSet()
];

Expand Down Expand Up @@ -192,7 +192,7 @@ class _GoogleSummerOfCodeScreenState extends State<GoogleSummerOfCodeScreen> {
orgList = _getOrganizationsByYear(selectedYear)
.where((element) =>
element.name
?.toLowerCase()
.toLowerCase()
.contains(searchText.toLowerCase()) ==
true)
.toList();
Expand Down Expand Up @@ -400,8 +400,8 @@ class _GoogleSummerOfCodeScreenState extends State<GoogleSummerOfCodeScreen> {
const SizedBox(height: 20),
orgList.isEmpty
? _isRefreshing
? Column(
children: const [
? const Column(
children: [
Center(
child: Column(
children: [
Expand All @@ -426,7 +426,7 @@ class _GoogleSummerOfCodeScreenState extends State<GoogleSummerOfCodeScreen> {
),
],
)
: Container(
: SizedBox(
height: height,
child: ListView.builder(
itemCount: orgList.length,
Expand All @@ -442,7 +442,7 @@ class _GoogleSummerOfCodeScreenState extends State<GoogleSummerOfCodeScreen> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 2,
blurRadius: 5,
offset: Offset(0, 3), // changes position of shadow
offset: const Offset(0, 3), // changes position of shadow
),
],
),
Expand Down

0 comments on commit e65e5f2

Please sign in to comment.