Skip to content

Commit

Permalink
Merge pull request #298 from RishavKumarSinha/fix#293
Browse files Browse the repository at this point in the history
FOSSASIA Codeheat UI Page Added
  • Loading branch information
andoriyaprashant authored Aug 9, 2024
2 parents 6ed1ee2 + c7a2c65 commit f7753d4
Show file tree
Hide file tree
Showing 9 changed files with 718 additions and 0 deletions.
Binary file added assets/fossasia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:opso/ChatBotpage.dart';
import 'package:opso/opso_timeline.dart';
import 'package:opso/programs%20screen/fossasia.dart';
import 'package:opso/programs%20screen/girl_script.dart';
import 'package:opso/programs%20screen/github_campus.dart';
import 'package:opso/programs%20screen/google_season_of_docs_screen.dart';
Expand Down Expand Up @@ -93,6 +94,10 @@ class _HomePageState extends State<HomePage> {
title: 'Google Season of Docs',
imageAssetPath: 'assets/Google_season_of_docs.png',
),
Program(
title: 'FOSSASIA Codeheat',
imageAssetPath: 'assets/fossasia.png',
),
Program(
title: 'Major League Hacking Fellowship',
imageAssetPath: 'assets/mlh_logo.jpg',
Expand Down Expand Up @@ -380,6 +385,15 @@ class _HomePageState extends State<HomePage> {
);
break;

case 'FOSSASIA Codeheat':
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => FOSSASIA(),
),
);
break;


case 'Major League Hacking Fellowship':
Navigator.push(
Expand Down Expand Up @@ -547,6 +561,10 @@ class ProgramSearchDelegate extends SearchDelegate<String> {
title: 'Google Season of Docs',
imageAssetPath: 'assets/Google_season_of_docs.png',
),
Program(
title: 'FOSSASIA Codeheat',
imageAssetPath: 'assets/fossasia.png',
),
Program(
title: 'Major League Hacking Fellowship',
imageAssetPath: 'assets/mlh_logo.jpg',
Expand Down Expand Up @@ -672,6 +690,15 @@ class ProgramSearchDelegate extends SearchDelegate<String> {
);
break;

case 'FOSSASIA Codeheat':
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const FOSSASIA(),
),
);
break;

case 'Redox OS Summer of Code':
Navigator.push(
context,
Expand Down
2 changes: 2 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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';
import 'package:opso/programs%20screen/google_season_of_docs_screen.dart';
Expand Down Expand Up @@ -54,6 +55,7 @@ class OpSoApp extends StatelessWidget {
"/google_season_of_docs": (context) =>
GoogleSeasonOfDocsScreen(),
"/summer_of_bitcoin": (context) => const SummerOfBitcoin(),
"/fossasia": (context) => const FOSSASIA(),
"/hacktoberfest_screen": (context) => const Hacktoberfest(),
"/open_summer_of_code": (context) => const OpenSummerOfCode(),
"/hyperledger": (context) => const Hyperledger(),
Expand Down
47 changes: 47 additions & 0 deletions lib/modals/fossasia_project_modal.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
class FOSSASIAProjectModel {
String name;
String description;
List<String> techStack;
String link;
String year;

FOSSASIAProjectModel({
required this.name,
required this.description,
required this.techStack,
required this.link,
required this.year,
});

factory FOSSASIAProjectModel.fromJson(Map<String, dynamic> json) {
List<String> techStackList = [];
if (json['TechStack'] is List) {
techStackList = List<String>.from(json['TechStack']);
} else if (json['TechStack'] is String) {
techStackList = [json['TechStack']];
}

return FOSSASIAProjectModel(
name: json['Name'],
description: json['Description'],
techStack: techStackList,
link: json['link'],
year: json['Year'].toString(),
);
}

Map<String, dynamic> toJson() {
return {
'Name': name,
'Description': description,
'TechStack': techStack,
'link': link,
'Year': year,
};
}

@override
String toString() {
return 'FOSSASIAProjectModel(name: $name, description: $description, techStack: $techStack, link: $link, year: $year)';
}
}
6 changes: 6 additions & 0 deletions lib/opso_timeline.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ class OpsoTimeLineScreen extends StatelessWidget {
'startDate': DateTime.utc(2024, 8, 1),
'endDate': DateTime.utc(2024, 8, 31),
},
{
'description':
"FOSSASIA Codeheat\nApplication Period - 01/09/2024 to 31/11/2024",
'startDate': DateTime.utc(2024, 9, 1),
'endDate': DateTime.utc(2024, 11, 31),
},
{
'description':
"Hacktoberfest\nContribution Period - 01/10/2024 to 31/10/2024",
Expand Down
Loading

0 comments on commit f7753d4

Please sign in to comment.