Coder Social home page Coder Social logo

mobile-app's Introduction

Build Status

vost

Aplicação para VOST

Pre-Requisites

In order to be able to run this app, you will need to generate your own mapbox credentials.

1 - Create a new account in https://www.mapbox.com/ and request a new key to be used in the project 2 - Create a keys.dart file at the root of the project 3 - Inside it add the MAPBOX_ACCESS_TOKEN as the token you created on the mapbox website 4 - Add also a MAPBOX_URL_TEMPLATE, eg: https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}@2x.png?access_token={accessToken} can be used as default

Project Structure

  • data - Manages the API and Local data
  • domain - Manages the business logic of the application
  • di - Manages the dependency Injection of the application
  • presentation - Manages the UI, routing and blocs

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

License

This project is open source software licensed under the MIT LICENSE.

mobile-app's People

Contributors

404shades avatar codeglitch avatar lima21 avatar miguelpruivo avatar oldmetalmind avatar thesmader avatar tomerpacific avatar vanethos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mobile-app's Issues

About Screen

Description
About screen for VOST, including contacts, links to the contributors and tutorial screen

File Location

- presentation
|__ ui

Requirements

  • Include button to access Contributors screen
  • Include button to access Tutorial screen
  • All contacts should be clickable, either launch phone/email apps or use https://pub.dev/packages/url_launcher to open URLs

UI
imagem

NOTES

Assume the following test:

A VOST Portugal - Associação de Voluntários Em Situações de Emergência - é uma equipa de voluntários digitais que recolhe, valida, e informa as populações em casos de emergência. Esta aplicação, feita integralmente por voluntários e em código aberto, tem como objectivo colocar numa só aplicação mensagens oficiais no âmbito da autoprotecção, desastres naturais, e fenómenos meteorológicos adversos.

Assume that in the grid you will receive a List<Contacts> in which a Contact can have the following structure:

String name;
String imageUrl;
String info;
ContactType type; // this is an enum with the values ["PHONE", "URL", "EMAIL"]

Depending on the type, a click on this button can either open the phone app with the number ,open an url or send an email.

The buttons at the bottom of the screen should be clickable, so a function should be exposed to place there the callback

Unit Tests - Counties Endpoint

Description
Unit tests for the endpoint GET {{base_url}}/counties

Pre-Requisites

Unit-Tests

  • Creating the model via a JSON Response
  • Calling the endpiint and mocking a 200 response with a valid response
  • Calling the endpoint and mocking a 200 response with an invalid response
  • Calling the endpoint and mocking a 400 response
  • Verify that calling the api with a mock response creates the expected object

District Endpoint

Description
Create all the classes and functions needed to access the GET endpoint {{base_url}}/districts

File Location

- data
|__ remote
- domain
|_ mamagers

Requirements

  • A endpoints class where the endpoint is declared must be created
  • A services class where the mapping from Response to District must be created

Example Response

{
    "links": {
        "first": "https://api.vost.pt/v1/districts?page=1",
        "last": "https://api.vost.pt/v1/districts?page=20",
        "next": "https://api.vost.pt/v1/districts?page=2"
    },
    "data": [
        {
            "type": "districts",
            "id": "4",
            "attributes": {
                "code": "040000",
                "name": "BRAGANÇA",
                "created_at": "2019-07-02 13:31:04",
                "updated_at": "2019-07-02 13:31:04"
            },
            "links": {
                "self": "https://api.vost.pt/v1/districts/4"
            }
        }
    ],
    "meta": {
        "items": 1,
        "total": 20
    }
}

Unit Tests - Recent Occurrences Endpoint

Description
Unit tests for the endpoint GET {{base_url}}/occurrences

Pre-Requisites

Unit-Tests

  • Creating the model via a JSON Response
  • Calling the endpiint and mocking a 200 response with a valid response
  • Calling the endpoint and mocking a 200 response with an invalid response
  • Calling the endpoint and mocking a 400 response
  • Verify that calling the api with a mock response creates the expected object

Report Problem Screen

Description
Create Problems Screen

File Location

- presentation
|__ ui

Requirements

  • Screen with text information about how to report a problem

  • Appbar must have a ""back"" button

UI
imagem

NOTES
Assume the following text:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. In iaculis nunc sed augue. A scelerisque purus semper eget duis at tellus at urna. Quisque sagittis purus sit amet volutpat. Maecenas volutpat blandit aliquam etiam. Eu facilisis sed odio morbi quis commodo odio. Aliquet risus feugiat in ante metus. Nec ullamcorper sit amet risus. Libero id faucibus nisl tincidunt eget nullam. Non consectetur a erat nam at. Cursus eget nunc scelerisque viverra mauris in aliquam sem. At tempor commodo ullamcorper a lacus vestibulum sed. Urna molestie at elementum eu facilisis sed. Fermentum dui faucibus in ornare. Arcu vitae elementum curabitur vitae nunc sed velit dignissim. Nunc faucibus a pellentesque sit amet porttitor eget. Nunc sed velit dignissim sodales ut eu sem. Interdum posuere lorem ipsum dolor. Eu mi bibendum neque egestas congue quisque. Convallis convallis tellus id interdum velit laoreet id donec.

[email protected]

The email should be clickable and it should open a new e-mail for [email protected].

Contributors Screen

Description
Create screen with all the contributors for the app

File Location

- presentation
|__ ui

Requirements

  • From the Github API, get the current contributors information and display it in form of list with:
    • User image
    • User Name
    • User description

UI
imagem

Notes
Expect the following object:

{
    "username": "String",
     "name": "String",
     "profilePicture": "String"
      "category": CategoryEnum
}

With Category enum having the values:

copy,
design,
development

Species Endpoint

Description
Create all the classes and functions needed to access the GET endpoint {{base_url}}/occurrences/species

File Location

- data
|__ remote
- domain
|_ mamagers

Requirements

  • A endpoints class where the endpoint is declared must be created
  • A services class where the mapping from Response to Species must be created

Example Response

{
    "links": {
        "first": "https://api.vost.pt/v1/occurrences/species?page=1",
        "last": "https://api.vost.pt/v1/occurrences/species?page=14",
        "next": "https://api.vost.pt/v1/occurrences/species?page=2"
    },
    "data": [
        {
            "type": "occurrence_species",
            "id": "14",
            "attributes": {
                "code": 9900,
                "name": "Estados de Alerta",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            },
            "relationships": {
                "family": {
                    "data": {
                        "type": "occurrence_families",
                        "id": "5"
                    }
                }
            }
        }
    ],
    "included": [
        {
            "type": "occurrence_families",
            "id": "5",
            "attributes": {
                "code": 9000,
                "name": "Operações e Estados de Alerta",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        }
    ],
    "meta": {
        "items": 1,
        "total": 14
    }
}

Unit Tests - Species Endpoint

Description
Unit tests for the endpoint GET {{base_url}}/occurrences/species

Pre-Requisites

Unit-Tests

  • Creating the model via a JSON Response
  • Calling the endpiint and mocking a 200 response with a valid response
  • Calling the endpoint and mocking a 200 response with an invalid response
  • Calling the endpoint and mocking a 400 response
  • Verify that calling the api with a mock response creates the expected object

Delete default test

Delete file test\widget_test.dart the tests will fail since we don't have the default views

Occurrences Widget - On Site Help

Description
Separate widget for the "On Site Help" of the Occurrences.

File Location

- presentation
|__ ui

Requirements

  • Widget that with the Occurrences object displays information about:

    • The means that are on the site, be it human, land or aerial
    • Last update
  • This widget must have a callback for the click on the map image, so that the details screen can show the Map screen with the marker centered on it

UI

imagem

NOTES
Until the API Is completed, assume that this widget has as an input 1 DateTime object and 3 int.

Occurrences Widget - Location

Description
Separate widget for the Location of the Occurrences.

File Location

- presentation
|__ ui

Requirements

  • Widget that with the Occurrences object displays information about:

    • Name of occurence
    • Name of the location of occurrence
    • Lat/long of location
    • Map with pin centered
    • Last update
  • This widget must have a callback for the click on the map image, so that the details screen can show the Map screen with the marker centered on it

UI

imagem

Status Endpoint

Description
Create all the classes and functions needed to access the GET endpoint {{base_url}}/occurrences/statuses

File Location

- data
|__ remote
- domain
|_ mamagers

Requirements

  • A endpoints class where the endpoint is declared must be created
  • A services class where the mapping from Response to Status must be created

Example Response

{
    "links": {
        "first": "https://api.vost.pt/v1/occurrences/statuses?page=1",
        "last": "https://api.vost.pt/v1/occurrences/statuses?page=10",
        "next": "https://api.vost.pt/v1/occurrences/statuses?page=2"
    },
    "data": [
        {
            "type": "occurrence_statuses",
            "id": "10",
            "attributes": {
                "code": 255,
                "name": "Encerrada pela VOST",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        }
    ],
    "meta": {
        "items": 1,
        "total": 10
    }
}

Unit Tests - Status Endpoint

Description
Unit tests for the endpoint GET {{base_url}}/occurrences/statuses

Pre-Requisites

Unit-Tests

  • Creating the model via a JSON Response
{
    "links": {
        "first": "https://api.vost.pt/v1/occurrences/statuses?page%5Bsize%5D=1&sort=created_at&order=desc&page%5Bnumber%5D=1",
        "last": "https://api.vost.pt/v1/occurrences/statuses?page%5Bsize%5D=1&sort=created_at&order=desc&page%5Bnumber%5D=10",
        "next": "https://api.vost.pt/v1/occurrences/statuses?page%5Bsize%5D=1&sort=created_at&order=desc&page%5Bnumber%5D=2"
    },
    "data": [
        {
            "type": "occurrence_statuses",
            "id": "10",
            "attributes": {
                "code": 255,
                "name": "Encerrada pela VOST",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        }
    ],
    "meta": {
        "items": 1,
        "total": 10
    }
}
  • Calling the endpoint and mocking a 200 response with a valid response
  • Calling the endpoint and mocking a 200 response with an invalid response
  • Calling the endpoint and mocking a 400 response
  • Verify that calling the api with a mock response creates the expected object

Occurrences Widget - Start and End

Description
Separate widget for the "Start and End" of the Occurrences.

File Location

- presentation
|__ ui

Requirements

  • Widget that with the Occurrences object displays information about:
    • Start and end of the occurrence
    • Last updated

UI

imagem

NOTES
Until the API Is completed, assume that this widget has as an input 3 DateTime objects.

Parishes Endpoint

Description
Create all the classes and functions needed to access the GET endpoint {{base_url}}/parishes

File Location

- data
|__ remote
- domain
|_ mamagers

Requirements

  • A endpoints class where the endpoint is declared must be created
  • A services class where the mapping from Response to Parish must be created

Example Response

{
    "links": {
        "first": "https://api.vost.pt/v1/parishes?page=1",
        "last": "https://api.vost.pt/v1/parishes?page=3092",
        "next": "https://api.vost.pt/v1/parishes?page=2"
    },
    "data": [
        {
            "type": "parishes",
            "id": "3086",
            "attributes": {
                "code": "480106",
                "name": "LOMBA",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            },
            "links": {
                "self": "https://api.vost.pt/v1/parishes/3086"
            }
        }
    ],
    "meta": {
        "items": 1,
        "total": 3092
    }
}

Families Endpoint

Description
Create all the classes and functions needed to access the GET endpoint {{base_url}}/occurrences/families

File Location

- data
|__ remote
- domain
|_ mamagers

Requirements
A endpoints class where the endpoint is declared must be created

  • A services class where the mapping from Response to Family must be created

Example Response

{
    "links": {
        "first": "https://api.vost.pt/v1/occurrences/families?page=1",
        "last": "https://api.vost.pt/v1/occurrences/families?page=1"
    },
    "data": [
        {
            "type": "occurrence_families",
            "id": "1",
            "attributes": {
                "code": 1000,
                "name": "Riscos Naturais",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        },
        {
            "type": "occurrence_families",
            "id": "2",
            "attributes": {
                "code": 2000,
                "name": "Riscos Tecnológicos",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        },
        {
            "type": "occurrence_families",
            "id": "3",
            "attributes": {
                "code": 3000,
                "name": "Riscos Mistos",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        },
        {
            "type": "occurrence_families",
            "id": "4",
            "attributes": {
                "code": 4000,
                "name": "Protecção e Assistência a Pessoas e Bens",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        },
        {
            "type": "occurrence_families",
            "id": "5",
            "attributes": {
                "code": 9000,
                "name": "Operações e Estados de Alerta",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        }
    ],
    "meta": {
        "items": 50,
        "total": 5
    }
}

Load markers into the map

Description
With the list of occurrences, show all the markers in the map so that the user can see them.

File Location

- presentation
|__ ui

Requirements

  • When opening the map screen, we should show all the available markers at the same time plus the location of the user.
  • The markers should have a callback so that when clicked they show a detail, as explained in #30

UI

imagem

Manage App Flavors

Description
Create prod and dev flavors for the app

The flavors will:

  • If the flavor is PROD, don't show any debugging logs
  • Depending on the flavor, either use localhost for DEV or https://api.vost.pt/v1 for PROD
  • Use https://pub.dev/packages/version_banner or another library to show the user that he is using the DEV version of the app

File Location

main.dart
main_common.dart
main_dev.dart

Requirements

  • Initialize the flavors in the app with the tutorials seen here: https://flutter.dev/docs/deployment/flavors
  • Create a main file for each flavor (dev being main_dev.dart)
  • Create a main_common.dart file where all the main logic for running the app is located
  • Create a Config object that is created by each main_x file that is used to setup the base url and the flavor
  • Use this package https://pub.dev/packages/version_banner or use your own code to have a banner in the app so that the user can know if he is using the dev, prod or any other flavor. If the flavor is production, no banner is shown

Load More Data in List Screen

Description
When scrolling down on a list, if we reach the end of a list, it should load more data if available

File Location

- presentation
|__ ui

Requirements

  • When the user reaches the bottom of the list, there should be an API call to check if there is more data to be shown. An indicator should appear on the screen to warn the user that new data is being fetched

Occurrences List

Description
List of the VOST occurrences

File Location

- presentation
|__ ui

Requirements

  • Shows a list of occurences with the following data:

    • Occurence Type
    • Parish
    • Status
    • Last Updated
    • Is the user following the occurence? (symbolized by the start icon)
  • This screen will either show the most recent occurrences or the "following" occurrences

  • If the list is empty, an empty screen is shown

UI
Lis of Occurences:
imagem

Empty Screen:
imagem

Unit Tests - District Endpoint

Description
Unit tests for the endpoint GET {{base_url}}/districts

Pre-Requisites

Unit-Tests

  • Creating the model via a JSON Response
  • Calling the endpiint and mocking a 200 response with a valid response
  • Calling the endpoint and mocking a 200 response with an invalid response
  • Calling the endpoint and mocking a 400 response
  • Verify that calling the api with a mock response creates the expected object

Onboarding Screen

Description
Create tutorial for the app

File Location

- presentation
|__ ui

Requirements

  • When swipping on the screen we go to the next (swipe right) or left (swipe left) screen
  • There is one screen with an explanation about the location permission for the app. That screen will have an ""Accept"" and ""Refuse"" buttons
    • Accept will show the OS's permission dialog to accept the permission
    • Refuse will show a pop-up screen warning the user that some features of the app will not work properly, such as the map

UI

unknown

Create Bottom Bar for Main Screen

Description
Bottom Bar Navigation for the Main Screen

File Location

- presentation
|__ ui

Requirements

  • The bottom Bar for the main screen will have 3 items:
    • Map/List button - the button presented at the middle (A Floating Action Button). The default state shows a map icon. When clicked -> goes to the map screen and changes the icon to a list. When clicked again -> Shows the list screen and changes the icon to a map Icon
    • Following/Recents toggle - the button will toggle between the "Following" and "Recents" occurences. This should provide a callback to fetch data from the API with the correct filters
    • A 3 dotted button to access a popup menu (https://api.flutter.dev/flutter/material/PopupMenuButton-class.html) It will have two options:
      • About -> opens the About Screen
      • Report a Problem -> opens the report a problem screen

UI

imagem

imagem

Occurrence Widget - Status

Description
Separate widget for the Status of the Occurrences.

File Location

- presentation
|__ ui

Requirements

  • Widget that with the Occurrences object displays information about:
    • Status
    • Last update

UI

imagem

NOTES
Until the API Is completed, assume that this widget has as an input 1 DateTime objects and a String.

Shared Preferences

Description
Initialize Shared Preferences in the app

File Location

- data
|__ sharedpreferences
      |___ vost_shared_preferences.dart
- domain
|__ managers
     |___ shared_preferences_manager.dart

Requirements

  • Create class that manages the https://pub.dev/packages/shared_preferences plugin - VostSharedPreferences. This class should read and write into the shared Preferences.

  • All the keys should const and Stringand should be declared as private at the bottom of the file

  • Create class that abstracts managing the shared preferences : SharedPreferencesManager -> this class will know the default value for each preference, example: if we are trying to get a list of ids, instead of null, we should return an empty array. This class has a get and set method for each value. If needed, it can also have a set method that sets multiple values.

NOTE:
Since that at the start we don't have any values to store, please create a new String value to store with the key test_shared.

Flare Splash Screen

Description
Create Flutter Splash Screen

File Location

- presentation
|__ ui

Requirements

  • "This screen will show an animation with the app logo
  • Internally, this screen will check in the shared preferences if the user has opened the app previously
    • If first install, go to tutorial
    • Else, go to main app screen"

UI

imagem

Unit Tests - Families Endpoint

Description
Unit tests for the endpoint GET {{base_url}}/occurrences/families

Pre-Requisites

Unit-Tests

  • Creating the model via a JSON Response
  • Calling the endpiint and mocking a 200 response with a valid response
  • Calling the endpoint and mocking a 200 response with an invalid response
  • Calling the endpoint and mocking a 400 response
  • Verify that calling the api with a mock response creates the expected object

Unit Tests - Parishes Endpoint

Description
Unit tests for the endpoint GET {{base_url}}/parishes

Pre-Requisites

Unit-Tests

  • Creating the model via a JSON Response
  • Calling the endpiint and mocking a 200 response with a valid response
  • Calling the endpoint and mocking a 200 response with an invalid response
  • Calling the endpoint and mocking a 400 response
  • Verify that calling the api with a mock response creates the expected object

Recent Occurrences Endpoint

Description
Create all the classes and functions needed to access the GET endpoint {{base_url}}/occurrences

File Location

- data
|__ remote
- domain
|_ mamagers

Requirements

  • A endpoints class where the endpoint is declared must be created
  • A services class where the mapping from Response to Occurence must be created

This endpoint must expose the following query parameters to be used:

  • page[number]
  • page[size]
  • search
  • exact
  • events
  • types
  • statuses:
  • districts
  • counties
  • parishes
  • sort
  • order

The following methods must be exposed in an abstracted class called OccurrencesManager:

  • Search for the most recent occurences - including pagination, with filter options
  • Search for a list of occurrences given an id - with filter options

Example Response

{
    "links": {
        "first": "https://api.vost.pt/v1/occurrences?page=1",
        "last": "https://api.vost.pt/v1/occurrences?page=42751",
        "next": "https://api.vost.pt/v1/occurrences?page=2"
    },
    "data": [
        {
            "type": "occurrences",
            "id": "42751",
            "attributes": {
                "locality": "Ervedosa do Douro",
                "latitude": 41.16918811,
                "longitude": -7.49500763,
                "started_at": "2019-08-10 14:23:00",
                "ended_at": null,
                "created_at": "2019-08-10 15:05:02",
                "updated_at": "2019-08-10 15:05:02"
            },
            "relationships": {
                "type": {
                    "data": {
                        "type": "occurrence_types",
                        "id": "108"
                    }
                },
                "status": {
                    "data": {
                        "type": "occurrence_statuses",
                        "id": "5"
                    }
                },
                "parish": {
                    "data": {
                        "type": "parishes",
                        "id": "2759"
                    }
                }
            },
            "links": {
                "self": "https://api.vost.pt/v1/occurrences/42751"
            }
        }
    ],
    "included": [
        {
            "type": "occurrence_types",
            "id": "108",
            "attributes": {
                "code": 4305,
                "name": "Limpeza de Via e Sinalização de Perigo",
                "created_at": "2019-07-02 13:31:19",
                "updated_at": "2019-07-02 13:31:19"
            }
        },
        {
            "type": "occurrence_statuses",
            "id": "5",
            "attributes": {
                "code": 5,
                "name": "Em Curso",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        },
        {
            "type": "parishes",
            "id": "2759",
            "attributes": {
                "code": "181502",
                "name": "ERVEDOSA DO DOURO",
                "created_at": "2019-07-02 13:31:16",
                "updated_at": "2019-07-02 13:31:16"
            },
            "links": {
                "self": "https://api.vost.pt/v1/parishes/2759"
            }
        }
    ],
    "meta": {
        "items": 1,
        "total": 42751
    }
}

Details Screen

Description
Flutter Description screen with the Status, Location, Start and End and On Site Help of the Occurence

File Location

- presentation
|__ ui

Pre-Requisites

Requirements

  • "This screen will show an animation with the app logo
  • Internally, this screen will check in the shared preferences if the user has opened the app previously
    • If first install, go to tutorial
    • Else, go to main app screen"

UI

imagem

Counties Endpoint

Description
Create all the classes and functions needed to access the GET endpoint {{base_url}}/counties

File Location

- data
|__ remote
- domain
|_ mamagers

Requirements

  • A endpoints class where the endpoint is declared must be created
  • A services class where the mapping from Response to County must be created

Example Response

{
    "links": {
        "first": "https://api.vost.pt/v1/counties?page=1",
        "last": "https://api.vost.pt/v1/counties?page=308",
        "next": "https://api.vost.pt/v1/counties?page=2"
    },
    "data": [
        {
            "type": "counties",
            "id": "270",
            "attributes": {
                "code": "181600",
                "name": "SÃO PEDRO DO SUL",
                "created_at": "2019-07-02 13:31:05",
                "updated_at": "2019-07-02 13:31:05"
            },
            "relationships": {
                "district": {
                    "data": null
                }
            },
            "links": {
                "self": "https://api.vost.pt/v1/counties/270"
            }
        }
    ],
    "meta": {
        "items": 1,
        "total": 308
    }
}

provider package initialization

Description
For dependency injection, our app will use the provider package

File Location

If any initialization helper files are needed, we should consider creating a di folder in the root of the project

- di

Requirements

  • Initialize the provider package - https://pub.dev/packages/provider

  • The provider package should always provide a BLoC to a new page, so either create a BasePage that handles this logic, create a mixin or find a new solution so that adding a new page can be as simple as declaring the type of the BLoC.

Unit Tests - Types Endpoint

Description
Unit tests for the endpoint GET {{base_url}}/occurrences/types

Pre-Requisites

Unit-Tests

  • Creating the model via a JSON Response
  • Calling the endpiint and mocking a 200 response with a valid response
  • Calling the endpoint and mocking a 200 response with an invalid response
  • Calling the endpoint and mocking a 400 response
  • Verify that calling the api with a mock response creates the expected object

Clicking on a marker shows the Occurrence Details

Description
Clicking on the marker on a map should show a small detail about the occurence. It is possible to expand this detail to ger more information.

File Location

- presentation
|__ ui

Pre-Requisites

Requirements

  • Clicking on the map marker should:
    • Center the pin on the screen
    • Highlight the marker
    • Show the Occurence Type Widget for that marker
    • Show a Floating Action that when clicked shows all the widgets for the occurences in a list
      • When clicked on the FAB again this list disappears
      • When clicking on the map screen, the list disappears

UI

imagem

Clicking on the FAB should expand with all the details that were created in #19, #20, #21 and #22

Types Endpoint

Description
Create all the classes and functions needed to access the GET endpoint {{base_url}}/occurrences/types

File Location

- data
|__ remote
- domain
|_ mamagers

Requirements

  • A endpoints class where the endpoint is declared must be created
  • A services class where the mapping from Response to Types must be created

Example Response

{
    "links": {
        "first": "https://api.vost.pt/v1/occurrences/types?page=1",
        "last": "https://api.vost.pt/v1/occurrences/types?page=143",
        "next": "https://api.vost.pt/v1/occurrences/types?page=2"
    },
    "data": [
        {
            "type": "occurrence_types",
            "id": "33",
            "attributes": {
                "code": 2305,
                "name": "Ferroviário",
                "created_at": "2019-07-02 13:31:19",
                "updated_at": "2019-07-02 13:31:19"
            },
            "relationships": {
                "species": {
                    "data": {
                        "type": "occurrence_species",
                        "id": "4"
                    }
                }
            }
        }
    ],
    "included": [
        {
            "type": "occurrence_species",
            "id": "4",
            "attributes": {
                "code": 2300,
                "name": "Incêndios em Transportes",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        }
    ],
    "meta": {
        "items": 1,
        "total": 143
    }
}

Pull to Refresh Data in List Screen

Description
Add Pull to Refresh in the List of Occurrences

File Location

- presentation
|__ ui

Requirements

  • "In the list of occurrences screen, there must be a ""pull-to-refresh"" feature where if the user swipes down when he is at the top of the list, the data is refreshed.

  • See for example the pull_to_refresh package: https://pub.dev/packages/pull_to_refresh
    This will be used in all lists."

Copy [EN/PT] - Contributors Screen

Text sentence [PT and EN] describing that all contribution was open-sourced and by the community, not only developers but also other areas.

Related to the screen of Contributors: Issue-#17

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.