diff --git a/lib/main.dart b/lib/main.dart index 7f441ae..f3d9984 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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'; @@ -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(), diff --git a/lib/programs screen/google_summer_of_code_screen.dart b/lib/programs screen/google_summer_of_code_screen.dart index a9cba72..397c71d 100644 --- a/lib/programs screen/google_summer_of_code_screen.dart +++ b/lib/programs screen/google_summer_of_code_screen.dart @@ -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'; @@ -14,6 +12,8 @@ import '../widgets/year_button.dart'; class GoogleSummerOfCodeScreen extends StatefulWidget { + const GoogleSummerOfCodeScreen({super.key}); + @override State createState() => _GoogleSummerOfCodeScreenState(); @@ -23,8 +23,8 @@ class GoogleSummerOfCodeScreen extends StatefulWidget { class _GoogleSummerOfCodeScreenState extends State { 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 gsoc2024 = []; List gsoc2023 = []; @@ -91,7 +91,7 @@ class _GoogleSummerOfCodeScreenState extends State { 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'); @@ -111,7 +111,7 @@ class _GoogleSummerOfCodeScreenState extends State { } 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(); } @@ -133,8 +133,8 @@ class _GoogleSummerOfCodeScreenState extends State { ..._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() ]; @@ -192,7 +192,7 @@ class _GoogleSummerOfCodeScreenState extends State { orgList = _getOrganizationsByYear(selectedYear) .where((element) => element.name - ?.toLowerCase() + .toLowerCase() .contains(searchText.toLowerCase()) == true) .toList(); @@ -400,8 +400,8 @@ class _GoogleSummerOfCodeScreenState extends State { const SizedBox(height: 20), orgList.isEmpty ? _isRefreshing - ? Column( - children: const [ + ? const Column( + children: [ Center( child: Column( children: [ @@ -426,7 +426,7 @@ class _GoogleSummerOfCodeScreenState extends State { ), ], ) - : Container( + : SizedBox( height: height, child: ListView.builder( itemCount: orgList.length, @@ -442,7 +442,7 @@ class _GoogleSummerOfCodeScreenState extends State { 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 ), ], ),