About the Position

We are looking for an aspiring Dart/Flutter Developer eager to gain hands-on experience in building cross-platform mobile applications for Android and iOS. As part of our internship program, you will work alongside experienced developers and other interns, contributing to real projects and improving your skills under professional guidance.

For more details on how our internship works, please visit our Internship Overview.
To learn more about our team, visit https://foreachpartners.com/.

What You Will Do

  • Develop and maintain mobile applications using Dart and Flutter for both Android and iOS platforms.
  • Collaborate with the team to understand project requirements, implement features, and refine user experiences.
  • Participate in code reviews, discussions, and team meetings.
  • Continuously learn and adapt to new technologies, frameworks, and best practices.

What We’re Looking For

  • Core Knowledge:
    • Basic understanding of Dart and Flutter, sufficient for personal pet-projects.
  • Eagerness to Learn:
    • Willingness to explore multiple development technologies simultaneously, investing personal time to enhance your skill set.
  • Additional Skills (Nice-to-Have):
    • Familiarity with SQL, HTML, CSS (and preprocessors like LESS or SASS).
    • Comfort working with Linux CLI, Docker, Git, and IDEs/editors such as VS Code.
  • Foundational CS Literacy:
    • Basic understanding of databases, networking, web application stacks, and operating systems (especially Linux) is beneficial.

Why Apply?

  • **Practical Experience:**Gain real-world experience working with modern mobile technologies in a professional setting.
  • **Skill Growth:**Improve your Flutter development capabilities, problem-solving skills, and familiarity with essential tools and workflows.
  • Career Building:
    Successful participants may have opportunities to continue collaboration with us on commercial terms.

Test Tasks

As part of your application, please complete the tasks below. They will help us assess your coding ability, problem-solving approach, and testing methodology.

Task 1: Implement the getScore Function

Objective:
Below is a code snippet that simulates a series of game score states throughout a match. Your task is to implement the getScore(gameStamps, offset) function, which returns the score at a given offset within the gameStamps list.

Carefully analyze the provided code, understand its logic and nuances, and ensure your solution matches the style and complexity of the existing code.

Code Snippet:

// lib/game.dart
import 'dart:math';

const TIMESTAMPS_COUNT = 50000;
const PROBABILITY_SCORE_CHANGED = 0.0001;
const PROBABILITY_HOME_SCORE = 0.45;
const OFFSET_MAX_STEP = 3;

class Score {
final int home;
final int away;

Score({
required this.home,
required this.away
});
}

class Stamp {
final int offset;
final Score score;

Stamp({
required this.offset,
required this.score
});
}

final Stamp emptyScoreStamp = Stamp(
offset: 0,
score: Score(
home: 0,
away: 0,
),
);

List<Stamp> generateGame() {
final stamps = List<Stamp>.generate(TIMESTAMPS_COUNT, (score) => emptyScoreStamp);

var currentStamp = stamps[0];

for (var i = 0; i < TIMESTAMPS_COUNT; i++) {
currentStamp = generateStamp(currentStamp);
stamps[i] = currentStamp;
}

return stamps;
}

Stamp generateStamp(Stamp prev) {
final scoreChanged = Random().nextDouble() > 1 - PROBABILITY_SCORE_CHANGED;
final homeScoreChange = scoreChanged && Random().nextDouble() < PROBABILITY_HOME_SCORE ? 1 : 0;
final awayScoreChange = scoreChanged && !(homeScoreChange > 0) ? 1 : 0;
final offsetChange = (Random().nextDouble() * OFFSET_MAX_STEP).floor() + 1;

return Stamp(
offset: prev.offset + offsetChange,
score: Score(
home: prev.score.home + homeScoreChange,
away: prev.score.away + awayScoreChange
),
);
}

Score getScore(List<Stamp> gameStamps, int offset) {
// Implement the function here
}

Example usage (not required, just for reference):

// bin/main.dart
import 'package:scope_game/game.dart';

void main() {
final game = generateGame();

game.forEach((e) {
print("offset - ${e.offset}; away - ${e.score.away}; home - ${e.score.home};");
});
}

Deliverables:

  • Provide a link to a gist containing your getScore function implementation.

Task 2: Write Tests for getScore

Objective:
Using the test library, write comprehensive unit tests for the getScore function. Your tests should cover a range of scenarios, be focused on testing one concept at a time, and have descriptive names that clearly express what is being checked.

Deliverables:

  • Provide a link to a gist containing your test code.

Task 3: Develop a Mobile App for Capturing a Photo

**Objective:**Create a simple Flutter application consisting of a single screen that includes:

  1. A camera preview.
  2. A text input field for a user comment.
  3. A button that, when pressed:
    • Retrieves the device’s current location (latitude and longitude).
    • Captures an image from the camera.
    • Retrieves the comment text.
    • Sends all this data (comment, coordinates, and image) to a server.

Example request:

curl -H "Content-Type: application/javascript" \
-X POST https://flutter-sandbox.free.beeceptor.com/upload_photo/ \
-F comment="A photo from the phone camera." \
-F latitude=38.897675 \
-F longitude=-77.036547 \
-F photo=@test.png

Requirements:

  • Built using Flutter.
  • You may use any tools or libraries you deem necessary.
  • The UI layout and design are up to you, but adaptability to various screen sizes is encouraged.

Deliverables:

  • A link to an APK file where we can test the described functionality.
  • Links to a Git repository containing the full source code.

We look forward to reviewing your submissions and potentially welcoming you to our team!