POC fit-generation

Overview

fit_generation

POC for fit-generation

Table of content

Project Description

This app acts as POC to show how to implement:

  • BottomAppBar using go_router
  • Auth using magic Link
  • Chat using Stream
  • Easy weight tracker with graph

Getting Started

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

Git

Git repo git project

Commit rules

To be able to generate a changelog-file out of commit messages, you need write messages as follow:

<"type">: <"short summary"> ─⫸ Summary in present tense. Not capitalized. No period at the end.

└─⫸ Commit Type: build|docs|feat|fix|perf|refactor|test

build: Changes that affect the build system or external dependencies
docs: Changes to documentation
feat: A new feature
fix: A bug fix
ref: Refactoring production code; no function change
perf: Performance improvements
test: Adding tests, refactoring test; no production code change

Navigation

Navigation 2 is done with goRouter. See the docs and Repo with Samples .
BottomNavBar is done according to shared_scaffold sample code

Open GoRouter issues:

As log as these issues are open, ButtonNavBar with GoRouter could not persist view state and sub-locations after navigation.
A solution would be to have just one page with stacked views in it:

To make BottomNavigationBar working with go router we need at least three things:

  1. SharedScaffold: The SharedScaffold contain a Scaffold-Widget which contains only the widgets which should be present trough all top views which could be accessed trough the BottomNavigationBar. This is especially the BottomNavigationBar but could also be a Nav-Drawer or an global AppBar.
    In the BottomNavigationBar's onTap methode must ensure that a new index cause a navigation. Make sure that the index and navigation match the BottomNavigationBarItem.

  2. GoRouter The top-routes should not have transition to make it look at you would stay on the same page.
    Further we need the navigatorBuilder which ensure that the SharedScaffold get the correct page index when navigating to one of top views. Make sure that the index provided by getSelectedNavBarIndex() match the BottomNavigationBar.

  3. When navigating to a route which is not a sub-route of the top views (in BottomNavigationBar)
    the navigatorBuilder will provide -1 to the to the SharedScaffold which then hide the BottomNavBar.
    This way there is no nav-stack when restoring the app state (no back button) and
    we therefore must add a possibility to return home manually.

ButtonNavBar Style: Until now, normal Material style is applied. There are packages to enhance the look ad feel: Simple: bottom_navy_bar With Action Button bubble_bottom_bar

DeepLinking

GoRouter support Deep-Links out of the box, but you need to enable on iOS/Android:

Android manifest.

  <meta-data
      android:name="flutter_deeplinking_enabled"
      android:value="true" />

ios -> info.plist

<key>FlutterDeepLinkingEnabled</key>
	<true/>

On Android: Android use "App Links" which works similar to "Universal links" on iOS If the app is installed a bottomSheet will let you decide between opening in app or mobile browser. If the app isn't installed, the link will open in mobile browser.

Social-Media preview Tags and images come out of the box from index.html

<title>dedeApp</title>
<meta name="description" content="Create and share wishlist easy and cost free">

On iOS:
iOS use [Universal Links][17] which work similar to "App Links" on Android. Older iOS Version (<9) use "customScheme".

You could check if an url is a "universal link" using [apple validation tool][18]

Navigation state restoration

GoRouter don't support multiple navigation stacks: open issue

State Restoration allows the Navigator to restore the navigation stack when a user leaves and returns to the app after it has been killed while running in the background. This is not limited to navigation and also be used for storing the state of a list for example.

Read more

To store a state we must add a RootRestorationScope into runApp() and extend
the MainAppState as follow: class _MainAppState extends State<MainApp> with RestorationMixin. Then add a restorationScopeId to MaterialApp and every GoRouter route (not needed when using builder()).

GoRouter Example App

Not Working currently: To store the state of a listView, add a restorationScopeId to the ListView.builder methode.

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

Firebase

firebase console

FlutterFireUI

Flutter-ui showcase

This handles all the auth logic incl. reading the magic link using FirebaseDynamicLinks out of the box. !! Sadly the profile page is not working correctly !!

ToDo: enable hosting to read magic-links on desktop and show some meaningful content.
For example -> "open this link with your mobile phone"

Firebase Auth

Auth Logic which is not handled by the FlutterFireUI is located in auth_repo.dart

Test Login using Magic-Link:

  • Android:
adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d {magic-link} 
  • iOS: To test deeplink on iOS on Simulator you need to user customscheme as follow:
xcrun simctl openurl booted app.fitgeneration.fitGeneration:{magic-link w/o https}
You might also like...

Boozin fitness - A sample app to that will pull data from Google Fit to get the steps count and calories burned

boozin_fitness A sample app to that will pull data from Google Fit to get the st

Nov 23, 2022

A code generation tool based on Database. :construction: developing :construction:

A code generation tool based on Database. :construction:  developing :construction:

dbgen A code generation tool based on Database. Getting Started This project is a starting point for a Flutter application. A few resources to get you

Jun 8, 2022

Examples of Flutter Code Generation.

Examples of Flutter Code Generation.

Flutter Code Generation Examples Code generation packages/tools used in the app: flutter_localization/intl build_runner flutter_gen/flutter_gen_runner

Oct 11, 2022

Code generation for Flutter Padding widgets based on your constants

Paddinger Paddinger is a Flutter package to generate Padding widgets. Given a set of constants like: @paddinger const double PADDING_NORMAL = 8; A set

Oct 20, 2022

Allows Dart reflection using code generation/builder.

reflection_factory reflection_factory allows Dart reflection with an easy approach, even for third-party classes, using code generation portable for a

Oct 30, 2022

Code generation for Flutter Padding widgets based on your constants

Code generation for Flutter Padding widgets based on your constants

Oct 20, 2022

A simple Flutter app that lists all the 151 1st generation pokemóns.

A simple Flutter app that lists all the 151 1st generation pokemóns.

Pokémon App A simple Flutter project that lists all the 151 1st generation pokemóns. This project was created for study purposes. Installation You can

Sep 13, 2022

The next-generation cross-platform Minecraft Launcher.

MultiFold MultiFold is the next-generation cross-platform Minecraft launcher. This project is currently work-in-progress. Contributing You are welcome

Nov 9, 2022

💘 This is my Youtube tutorial of my Social Media App Generation Made in Flutter 💘

💘 Generation Tutorial 💘 ⌛ This is the project source code of my youtube video tutorial of ⌛ 💚 Flutter Social Media App Tutorial 2021 💚 📌 Tutorial

Nov 24, 2022

Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem.

Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem.

Serverpod Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem. It allows you to write your server-s

Jan 8, 2023

Create dart data classes easily, fast and without writing boilerplate or running code generation.

Create dart data classes easily, fast and without writing boilerplate or running code generation.

Dart Data Class Generator Create dart data classes easily, fast and without writing boilerplate or running code generation. Features The generator can

Feb 28, 2022

Code generation for immutable classes that has a simple syntax/API without compromising on the features.

Welcome to Freezed, yet another code generator for unions/pattern-matching/copy. 0.14.0 and null-safety Important note: From 0.14.0 and onwards, Freez

Jan 4, 2023

This is an opinionated code-generation tool from GraphQL to Dart/Flutter.

GraphQL Codegen This is an opinionated code-generation tool from GraphQL to Dart/Flutter. It'll allow you to generate Dart serializers and client help

Dec 29, 2021

Item selling mobile app with secure payments with Payhere payment gateway. Auto APK generation with github actions CI/CD.

payhere_demo A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Jan 20, 2022

Automatic source code generation for Dart

Overview source_gen provides utilities for automated source code generation for Dart: A framework for writing Builders that consume and produce Dart c

Dec 30, 2022

Naj - An open-source code generation and file management system written in Dart

Naj An open-source code generation and file management system written in Dart Ov

Feb 14, 2022

Router_generator is a flutter library for router generation

Router_generator is a flutter library for router generation

Sep 27, 2022

🔍 Code generation for selectors of class fields that helps reduce repetitive code

Code generation for selectors of class fields and enum cases that helps reduce repetitive code.

Oct 3, 2022

Simple Dart package with build-in code generation. It simplifies and speedup creation of cache mechanism for dart classes.

Simple Dart package with build-in code generation. It simplifies and speedup creation of cache mechanism for dart classes.

Simple Dart package with build-in code generation. It simplifies and speedup creation of cache mechanism for dart classes.

Jan 2, 2023
Owner
Andy
Andy
💘 This is my Youtube tutorial of my Social Media App Generation Made in Flutter 💘

?? Generation Tutorial ?? ⌛ This is the project source code of my youtube video tutorial of ⌛ ?? Flutter Social Media App Tutorial 2021 ?? ?? Tutorial

Samarpan Dasgupta 17 Nov 24, 2022
Create dart data classes easily, fast and without writing boilerplate or running code generation.

Dart Data Class Generator Create dart data classes easily, fast and without writing boilerplate or running code generation. Features The generator can

null 186 Feb 28, 2022
This is an opinionated code-generation tool from GraphQL to Dart/Flutter.

GraphQL Codegen This is an opinionated code-generation tool from GraphQL to Dart/Flutter. It'll allow you to generate Dart serializers and client help

United Traders 1 Dec 29, 2021
Automatic source code generation for Dart

Overview source_gen provides utilities for automated source code generation for Dart: A framework for writing Builders that consume and produce Dart c

Dart 418 Dec 30, 2022
Router_generator is a flutter library for router generation

Router_generator is a flutter library for router generation

Jelly Bean 20 Sep 27, 2022
Simple Dart package with build-in code generation. It simplifies and speedup creation of cache mechanism for dart classes.

Simple Dart package with build-in code generation. It simplifies and speedup creation of cache mechanism for dart classes.

iteo 37 Jan 2, 2023
Sytôdy, a Flutter "speech to text" todo app POC

Sytôdy, a Flutter "speech to text" todo app POC ⚠️ iOS10(Swift) & Android Usage Install flutter cd sytody flutter run ?? Video demo How it works TL;DR

Erick Ghaumez 83 Jan 19, 2022
A simple POC implementation of the project Real World Project

Real World Project in Dart/Flutter This is a simple POC implementation of the project Real World Project.

null 4 Nov 14, 2022
Flutter widget that automatically resizes text to fit perfectly within its bounds.

Flutter widget that automatically resizes text to fit perfectly within its bounds. Show some ❤️ and star the repo to support the project Resources: Do

Simon Leier 1.8k Jan 3, 2023
Flutter widget that automatically resizes text to fit perfectly within its bounds.

ONLY FOR FLUTTER WEB Flutter widget that automatically resizes text to fit perfectly within its bounds. Show some ❤️ and star the repo to support the

Rebar Ahmad 4 Jan 6, 2022