ikaem / five_on_4_mobile

0 stars 0 forks source link

five_on_4_mobile

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application that follows the simple app state management tutorial.

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Assets

The assets directory houses images, fonts, and any other files you want to include with your application.

The assets/images directory contains resolution-aware images.

Localization

This project generates localized messages based on arb files found in the lib/src/localization directory.

To support additional languages, please visit the tutorial on Internationalizing Flutter apps

How to do db migrations

  1. make sure version 1 schema exists
    1. wiuth migration 1
    2. if not, create it with maake generate_migrations_schema
  2. make changes
    • add new table
    • or add new column
    • or change column type
      • or some such
  3. increase "schemaVersion" on AppDatabase by 1 -> maybe not this
  4. run the following command
    maake generate_migrations_schema
  5. run the following command
    make generate_migrations_steps
  6. add next migration to migration_wrapper that matches your db modification. for example:
    
    onUpgrade: stepByStep(
      from1To2: (m, schema) async {
        // await m.addColumn(schema.users, schema.users.nickname);
        await m.createTable(schema.matchEntity);
      },
      from2To3: (m, schema) async {
        // await m.createTable(schema.somethingElse);
        await m.addColumn(schema.matchEntity, schema.matchEntity.title);
      },
    ),
6. run the following command

make generate