IvanHerreraCasas / flutter_planner

A Flutter application to plan personal daily tasks, activities and routines that can be used with Supabase or Isar for the backend.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flutter Planner

style: very good analysis Codecov License: MIT

A Flutter application to plan personal daily tasks, activities and routines that can be used with Supabase or Isar for the backend.

Planner

Schedule

Dark theme


Features

  • 2 backend alternatives: Supabase and Isar.
  • Email authentication (if used with Supabase).
  • Calendar and timeline view for daily tasks and activities.
  • Timetable for weekly routines.
  • Activities types: task, routine, and event.
  • Reminders for activities and remaining tasks*.
  • Settings for user configuration, appearance, and tasks reminders.
  • Responsive ui.

*reminders only work on android and ios (ios needs extra set up)


Set up

Supabase

This step is only needed if you want to use this app with Supabase.

  1. Create a new project.

  2. Create a new table, named routines with the following rows (RLS enable).

    Name Type Extra Other
    id int8 Is identity -
    user_id uuid Is nullable Foreign key (table: users, column: id)
    name text - -
    day int2 - -
    start_time time - -
    end_time time - -
  3. Create a new table, named 'activities', with the following rows (RLS enable).

    Name Type Extra Other
    id int8 Is identity -
    user_id uuid Is nullable Foreign key (table: users, column: id)
    name text Is nullable -
    type int2 - Default value: 0
    date date - -
    start_time time - -
    end_time time - -
    description text Is nullable -
    links text Is nullable, define as array -
    routine_id int8 Is nullable Foreign key (table: routines, column: id)
  4. Create a new table, named 'tasks', with the following rows (RLS enable).

    Name Type Extra Other
    id int8 Is identity -
    user_id uuid Is nullable Foreign key (table: users, column: id)
    title text Is nullable -
    date date - -
    completed bool - -
  5. Create a new policy for all tables.

    • Allowed operation: ALL.
    • USING expression: auth.uid() = user_id.
    • WITH CHECK expression: (role() = 'authenticated'::text).
  6. In authentication settings, disable email confirmations.

Flutter

  1. Clone this repo.
  2. In the root directory, create a new file named '.env' with the following lines.
SUPABASE_URL=<YOUR_URL>
SUPABASE_ANON_KEY=<YOUR_KEY>

Running the project⚡

Run the desired flavor (production is the flavor that uses Isar, development and staging are the same and use Supabase).

# Development (Supabase)
$ flutter run --flavor development --target lib/main_development.dart

# Staging (Supabase)
$ flutter run --flavor staging --target lib/main_staging.dart
  
# Production (Isar)
$ flutter run --flavor production --target lib/main_production.dart

Running Tests 🧑‍🔬

To run all unit and widget tests use the following command:

flutter test --coverage --test-randomize-ordering-seed random

Building the project

Android

# Development (Supabase)
$ flutter build apk --target lib/main_development.dart

# Staging (Supabase)
$ flutter build apk --target lib/main_staging.dart
  
# Production (Isar)
$ flutter build apk --target lib/main_production.dart

Windows

# Development (Supabase)
$ flutter build windows --target lib/main_development.dart
$ flutter pub run msix:create --build-windows false

# Staging (Supabase)
$ flutter build windows --target lib/main_staging.dart
$ flutter pub run msix:create --build-windows false
  
# Production (Isar)
$ flutter build windows --target lib/main_production.dart
$ flutter pub run msix:create --build-windows false

Dependencies


Contribution

If you have a suggestion or would to contribute feel free to contact me, fill an issue or make a pull request :).

About

A Flutter application to plan personal daily tasks, activities and routines that can be used with Supabase or Isar for the backend.

License:MIT License


Languages

Language:Dart 95.7%Language:C++ 2.4%Language:CMake 1.2%Language:HTML 0.6%Language:C 0.1%Language:Swift 0.1%Language:Kotlin 0.0%Language:Objective-C 0.0%