Job Centre is a Flutter application that fetches and displays job postings from an RSS feed. The application consists of several Dart files that handle various aspects of the app, including fetching job data, displaying job listings, and managing the UI.
To get started with the VacancyBox Jobs app, follow these steps:
-
Clone the repository:
git clone https://github.com/bruceiczw/job-centre.git cd job-centre
-
Install the dependencies:
flutter pub get
-
Run the application:
flutter run
The project is organized as follows:
vacancybox-jobs/
│
├── lib/
│ ├── main.dart
│ ├── job_screen.dart
│ ├── job_feed_service.dart
│ ├── models/
│ │ └── job_post.dart
│ └── widgets/
│
├── pubspec.yaml
└── README.md
main.dart
: Entry point of the application.job_screen.dart
: Contains the UI for displaying the list of job postings.job_feed_service.dart
: Handles fetching job data from the RSS feed.models/job_post.dart
: Defines theJobPost
model.
The project relies on the following dependencies:
flutter
: The Flutter SDK.http
: A package for making HTTP requests.webfeed
: A package for parsing RSS feeds.
These dependencies are specified in the pubspec.yaml
file:
dependencies:
flutter:
sdk: flutter
http: ^0.13.3
webfeed: ^0.7.0
The main application is defined in main.dart
. It sets up the MaterialApp
and the home screen:
import 'package:flutter/material.dart';
import 'package:job_centre/job_screen.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: JobListScreen(),
);
}
}
The JobListScreen
in job_screen.dart
displays the list of job postings:
import 'package:flutter/material.dart';
import 'package:job_centre/job_feed_service.dart';
import 'package:job_centre/models/job_post.dart';
// Rest of the code...
The JobFeedService
in job_feed_service.dart
handles fetching job data from the RSS feed:
import "package:http/http.dart" as http;
import "package:job_centre/models/job_post.dart";
import "package:webfeed/webfeed.dart";
// Rest of the code...
The JobPost
model in models/job_post.dart
defines the structure of a job posting:
class JobPost {
final String title;
final String link;
final String description;
final String? company;
final String? location;
final String? postedDate;
JobPost({
required this.title,
required this.link,
required this.description,
this.company,
this.location,
this.postedDate,
});
}
Contributions are welcome! Please open an issue or submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
Here are some screenshots of the Job Centre app:
Feel free to explore the app and let us know if you have any feedback or suggestions!