Coder Social home page Coder Social logo

yandex_todo's Introduction

Список задач (ШМР 2023)

Фичи:

  • Можно добавлять задачи
  • Можно удалять задачи
  • Можно редактировать задачи
  • Задачи сохраняются на сервер и в файлик
  • Написано на чистом Flutter без использования сторонних библиотек (ну почти).

Для запуска:

  1. создать файл config.json в корне проекта
  2. задать в нем {"token" : <ваш токен>}

Аналогично с тестами: flutter test --dart-define-from-file=config.json К слову об автогенерации тестов: юнит-тестирование написано с помощью ChatGPT, рекомендую. Пример промпта:

Write a group of unit-tests in flutter to test these functions:
1. Future<(int, List<Task>)?> listTasks()
2. Future<(int, List<Task>)?> updateTasks(List<Task> tasks, int revision)
3. Future<(int, Task)?> getTaskbyId(String id)
4. Future<int?> addTask(Task task, int revision)
5. Future<int?> updateTask(Task task, int revision)
6. Future<int?> deleteTask(String id, int revision)

The syntax (int, List) stands for a tuple of two values with said types. You can access these fields using tuple.$1 and tuple.$2.
First of all, call the first function and store both fields of a tuple as variables. Then increase the integer by one and pass it into the second function.
After that, call the other functions.
Use this Task object when applicable: Task t = Task(importance: Importance.low, text: 'test', done: false, id: '42');
Use '42' as id when needed.

Важно объяснить нейросети про то, как работают Records, она про них еще не знает.

Скачать apk можно тут.

yandex_todo's People

Contributors

peaashmeter avatar

Watchers

 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.