Skip to content
/ rvpodhooks Public template

Flutter MVC template with Riverpod Hooks, GoRouter and Responsive Framework

License

Notifications You must be signed in to change notification settings

Hasuki69/rvpodhooks

Repository files navigation

Flutter MVC+S Template

Main Packages :

  1. Riverpod, Hooks (State management)
  2. Go Router (Navigation & Routing)
  3. Responsive Framework (Responsive & Auto adapt)
  4. Freezed, Freezed Annotation (Immutable class generator)
  5. Json Serializable, Json Annotation (to & from generator)
  6. Riverpod Lint, Custome Lint (Linter for riverpod)
  7. Build Runner (Dart code generator)

Additional Packages :

  1. Vector Graphics, Vector Graphics Compiler (SVG renderer & optimize)
  2. Shared Preferences (Simple key-value pairs storage)
  3. Intl (Internationalized, date & number format & parse, etc)
  4. Http (Http request)
  5. Animations (Fancy pre-built animations)
  6. Dartx (Collection of useful static extension methods)

Additional Config

Enable Impeller on android (default on next release)

  1. Add this code on AndroidManifest.xml (android/app/src/main/AndroidManifest.xml) below application tag
<meta-data
        android:name="io.flutter.embedding.android.EnableImpeller"
        android:value="true" />

Consume .env on android folder (dart-define method)

  1. Add this code on build.gradle (android/app/build.gradle) above android block
def dartEnvironmentVariables = []
if (project.hasProperty('dart-defines')) {
    dartEnvironmentVariables = project.property('dart-defines')
        .split(',')
        .collectEntries { entry ->
            def pair = new String(entry.decodeBase64(), 'UTF-8').split('=')
            [(pair.first()): pair.last()]
        }
}
  1. Add this code on build.gradle (android/app/build.gradle) inside defaultConfig on android block
android {
    ... Other Code here ...

    defaultConfig {
        ... Other Code here ...

        manifestPlaceholders += [
            GMAP_KEY: dartEnvironmentVariables.GMAP_KEY
        ]
    }

    ... Other Code here ...
}
  1. Usage on AndroidManifest.xml (android/app/src/main/AndroidManifest.xml) above activity tag on application tag
<meta-data android:name="com.google.android.geo.API_KEY"
            android:value="${GMAP_KEY}" />

About

Flutter MVC template with Riverpod Hooks, GoRouter and Responsive Framework

Resources

License

Stars

Watchers

Forks

Languages