This repository is archived. I started this repo when I was first learning mobile/flutter dev, and I've learned a lot since then. And well, there are way too many things to fix but a limited time.
Break is a health & fitness tracking app built with Dart (Flutter) and Firebase. From logging nutritions to working out with YouTube videos, I have been learning and adding many cool features over the months, and here are some quick snippets.
Sign In & Preview Screen | Routine Detail Screen | Workout Miniplayer | Speed Dial |
---|---|---|---|
Sign In & Preview Screen | Routine Detail Screen | Workout Miniplayer | Speed Dial |
---|---|---|---|
There are countless fitness apps available, yet I was never satisfied with just one app, and I always had to use multiple apps to log and track my physical activtivies—weightlifting and running—and nutrition consumption at the same time. For example, Yazio was very good for tracking nutritions consumptions, but tracking physical activities was never good there. Strong app was very good for tracking weight lifting exercises, but they didn't have the feautes to add nutritions consumptions. To achieve health & fitness goals such as dieting, both exercising AND eating are equally important, but no apps offered exceptionally good product for both.
That's why I started this project. The goal of this project is to create a all-in-one place for users to log and track their health & fitness. Users can log and track their body measurements, nutritions consumed, and workout data, and these data are transformed into customizable and easy-to-look dashboard, all in one app.
This project is a work-in-process. I am keeping learning and developing new features. Below is the breif roadmap:
- Manaully add nutritions data
- Add nutritions by scanning bar code
- Automatically log nutritions data using credit card transactions data
- Manually add body measurements data
- Automatically sync measurements data with Apple HealthKit and/or Google Fit
- Log weight lifting exercise data manually
- Log other cardio workouts
- Workout with YouTube Video
For this application, I've (sorted of) implemented the MVVM architecture pattern to increase maintainability and testability.
lib
│───models
│ │───workout.dart
│ │───user.dart
│ │───routine.dart
│ │───nutrition.dart
│ │───measurement.dart
│ └───...
│───services
│ │───auth.dart
│ │───database.dart
│ │───firestore_service.dart
│ └───...
│───styles
│ │───button_styles.dart
│ │───constants.dart
│ │───text_styles.dart
│ └───theme_colors.dart
│───utils
│ │───dummy_data.dart
│ └───formatter.dart
│───view
│ │───screens
│ │ │───animations
│ │ │───add_nutrition_screen.dart
│ │ │───add_workout_to_routine_screen.dart
│ │ │───...
│ │ │───library_tab.dart
│ │ │───preview_screen.dart
│ │ │───explore_tab.dart
│ │ └───...
│ └───widgets
│ │───...
│ │───builders
│ │ │───animated_list_view_builder.dart
│ │ │───custom_future_builder.dart
│ │ │───custom_list_view_builder.dart
│ │ └───custom_stream_builder.dart
│ │───buttons
│ │ │───appbar_back_button.dart
│ │ │───appbar_close_button.dart
│ │ │───keyboard_actions_done_button.dart
│ └───...
│───view_models
│ │───add_measurements_screen_model.dart
│ │───add_nutrition_screen_model.dart
│ │───add_workout_to_routine_screen_model.dart
│ └───...
└───main.dart
I have used the following libraries to build this app:
-
flutter_svg for displaying svg files
-
logger for better debugging and logging
-
uuid for generating uuids
-
enum_to_string to make working with enums easier
-
easy_localization for easy i18n
-
email_validator for validating emails
-
cached_network_image for caching network images
-
cupertino_icons for using iOS-looking icons
-
intl for i18n
-
url_launcher for launching url within the app
-
device_info_plus for getting users' device info
-
flutter_lints for strict Flutter Linting
-
visibility_detector for implementing visibility_detector
-
collection to make working with collections easier
-
google_fonts for using Google Fonts
-
flutter_blurhash for creating pretty placeholder image using blurhash
-
firebase_storage for Firebase Cloud Storage
-
firebase_core to use Firebase
-
cloud_firestore for Firebase Cloud Firestore
-
cloud_functions for Firebase Cloud Functions
-
firebase_auth for Firebase Authentication
-
firebase_crashlytics for Firebase Crashlytics
-
firebase_analytics for Firebase Analytics
-
google_sign_in for enabling signing in with google with Firebase
-
flutter_facebook_auth for enabling signing in with Facebook with Firebase
-
sign_in_with_apple for enabling signing in with Apple
-
kakao_flutter_sdk for enabling signing in with Kakao
-
provider for state management
-
flutter_riverpod for state management
-
get for creating custom snackbar
-
rxdart for streams (observables)
-
algolia for search with Algolia
-
mixpanel_flutter for using Mixpanel analytics
-
flutter_slidable for implementing slidable list item
-
fl_chart for creating aesthetic looking charts
-
smooth_page_indicator for creating page indicators
-
circular_countdown_timer for countdown timer
-
keyboard_actions for creating buttons on top of keyboards
-
flutter_rating_bar for creating a sliding rating bar
-
confetti for creating a confetti
-
numberpicker for picking numbers
-
shimmer for creating a loading widget that shimmer
-
miniplayer for creating a miniplayer
-
percent_indicator for creating a activity ring
-
table_calendar for creating a table calendar
-
material_floating_search_bar for creating a Google Map-like search bar
-
reorderables for creating a reorderable list
-
dotted_border for creating the dotted line
-
animated_text_kit for creating animated text
-
youtube_plyr_iframe for Youtube Player
-
timeago for i18ned timeago messages
-
flutter_sticky_header for creating Sticky header in Slivers