Skip to content

Postify-App/postify-mobile

Repository files navigation

🚀 Project Setup Guide

This guide helps you set up your Flutter project using Mason CLI and apply a modern structure with bricks, dependencies, and flavors.


🔧 Installation

1️⃣ Install Mason CLI

dart pub global activate mason_cli

2️⃣ Initialize Mason in Project

mkdir mason
cd mason
mason init

🧱 Add Bricks

Edit mason.yaml and replace the paths with your actual brick locations:

bricks:
  i18n:
    path: D:/projects/bricks/i18n (replace with real path)
  readme:
    path: D:/projects/bricks/readme (replace with real path)
  assets:
    path: D:/projects/bricks/assets (replace with real path)
  core:
    path: D:/projects/bricks/core (replace with real path)
  feature:
    path: D:/projects/bricks/feature (replace with real path)

📦 Fetch bricks

mason get

📚 Dependencies

Below is a list of default dependencies used in this project:

Category Package Purpose
🎨 UI & Animations animate_do
shimmer_animation
loading_animation_widget
carousel_slider
flutter_screenutil
smooth_page_indicator
flutter_staggered_animations
timeline_tile
Animations, responsive UI, indicators, timelines
🖼️ Media & Graphics cached_network_image
flutter_svg
flutter_svg_provider
photo_view
image_picker
mime
Image loading, SVG rendering, zoom, picker
🌍 Localization easy_localization Multi-language support
⚡ State Management flutter_bloc
equatable
dartz
Bloc/Cubit, equality, functional helpers
🌐 Networking & APIs dio
pretty_dio_logger
http
http_parser
HTTP client, interceptors, parsers
🔥 Firebase & Notifications firebase_core
firebase_messaging
flutter_local_notifications
Firebase services & push notifications
📍 Location & Maps location
geocoding
google_maps_flutter
GPS, geocoding, maps
📡 Real-time pusher_channels_flutter Real-time events
💾 Storage & Database hive
hive_flutter
Local storage
🌐 Web & Browser webview_flutter
webview_flutter_android
webview_flutter_wkwebview
WebView support
🛠️ Utilities & Helpers get_it
uuid
path
path_provider
crypto
connectivity_plus
internet_connection_checker_plus
country_picker
custom_timer
timeago
url_launcher
bot_toast
rename
change_app_package_name
flutter_widget_from_html
pinput
Dependency injection, UUID, file utils, crypto, network, pickers, timers, URL launching, toasts, renaming

⚡ Generate with Mason

🎯 Core Project Template

mason make core -o .././lib

🧩 Add New Feature (enter feature name)

mason make feature -o .././lib/features

🌍 Generate i18n

mason make i18n -o ../i18n

🖼️ Generate Assets Folder

mason make assets -o ../assets

📄 Generate README

mason make readme -o ../

🖋️ Add Assets & Fonts

in pubspec.yaml file :

assets:
  - i18n/
  - assets/
  - assets/global_icon/
  - assets/images/
  - assets/svg/

fonts:
  - family: fontName
    fonts:
      - asset: assets/fonts/fontName/fontName-Light.ttf
        weight: 300
      - asset: assets/fonts/fontName/fontName-Regular.ttf
        weight: 400
      - asset: assets/fonts/fontName/fontName-Medium.ttf
        weight: 500
      - asset: assets/fonts/fontName/fontName-Bold.ttf
        weight: 600

flutter_assets:
  assets_path: assets/
  output_path: lib/core/images/
  filename: app_images.dart
  classname: AppImages

clear mason cache

mason cache clear

create android flavors

add this to android/app/build.gradle.

  flavorDimensions += "default"

  productFlavors {
      create("development") {
          dimension = "default"
          resValue(type = "string", name = "app_name", value = "your app name")
          applicationIdSuffix = ".dev"
      }
      create("production") {
          dimension = "default"
          resValue(type = "string", name = "app_name", value = "your app name")
      }

change label in AndroidManifest.xml

android:label="@string/app_name"

generate launch file (vscode configuration)

mason make launch -o ../.vscode

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published