Giter VIP home page Giter VIP logo

loono's Introduction


Repozitář se zdrojovým kódem byl přesunut na https://github.com/Loono-cz/loono


loono

We show prevention matters.

  • To generate the freezed or db part files run flutter packages pub run build_runner build --delete-conflicting-outputs.
  • If you need to define anything non static on a freezed class remember to add a private constructor (https://pub.dev/packages/freezed#custom-getters-and-methods)
  • You might need to rerun the Dart Analyser for the IDE to be pick up the generated files

Notes

  • We are committing generated files to avoid situations where those files might be different among developers or might differ from the ones generated via the CodeMagic pipeline. We also commit them to avoid spending time and money when building the app on CodeMagic.

Mason templates

  • Mason is Dart template generator which helps teams generate files quickly and consistently.
  • To install mason, run: dart pub global activate mason_cli
  • Currently used templates (bricks):
    • pom_class - A template for generating Page Object Model (POM) class.
  • Then from the root of the project you can quickly make generate a file from a template:
mason get
mason list
mason make pom_class

App internalizations

  • Currently app supports only Czech language, all texts used within the app should be located in lib/l10n/intl_cs.arb. Supporting new languages can be made by adding new language arb file.
  • Internalization is done by flutter_internalization plugin

Integration Tests

  • The app has to run from the clean state. Make sure to clear the app's data before running the tests. (Android/iOS)
  • To run all frontend (UI) tests on an emulator or on a real iOS / Android device, first connect the device and run the following command from the root of the project: flutter test --test-randomize-ordering-seed=random --flavor dev integration_test/test_sets/app_test.dart.
  • Or, you can run a specific TC (test case) or a group with: flutter test integration_test/test_sets/app_test.dart --plain-name "LOON-437" --flavor dev
  • To run BE tests which test real API, add generated CUSTOM_TOKEN to ./assets/.env. You can run the test then with: flutter test --flavor dev integration_test/test_sets/be_test.dart. Generating Custom Token requires having Python SDK & an internal Firebase Account Service JSON file (dev environment).
  • Conventions:
    • test case implementation is inspired by POM (Page Object Model) design pattern
    • test data are created from Dart objects and not from JSON - for easier maintainability from API changes
    • test cases are structured with folder-by-feature

Webview share dialog

  • Webview allows to open native share dialog using custom JS handler called openShareSheet. It can be called directly from JS with following code: window.flutter_inappwebview.callHandler("openShareSheet");. This will open native share dialog with current url address. To customize shared content, just pass desired string argument to the handler like this: window.flutter_inappwebview.callHandler("openShareSheet","Mrkni na naši novou appku Preventivka na loono.cz");

loono's People

Contributors

luk3s avatar martin-ladecky avatar martingeorgiu avatar martinmacek avatar martinwenisch avatar mattpake avatar miroslavpeterka1 avatar mzdm avatar petrva1 avatar phiviet01 avatar ryzizub avatar smolikja avatar ulcdenis avatar vaetas avatar vojtechoboril avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.