From 9f24dd92addf1e1036e9f391da78dcb922f0814c Mon Sep 17 00:00:00 2001 From: Utpal Barman Date: Sat, 26 Oct 2024 02:21:03 +0600 Subject: [PATCH 1/2] docs: Updated README.md --- README.md | 40 ++++++++++++------- lib/config/dart_define.dart | 4 +- .../common/assets_cache_manager.dart | 2 +- .../resources/app_color_palette.dart | 2 +- lib/presentation/resources/app_fonts.dart | 2 +- lib/presentation/resources/app_theme.dart | 2 +- .../resources/app_ui_constants.dart | 2 +- pubspec.yaml | 4 +- 8 files changed, 35 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index cc5fe5a..7b85751 100644 --- a/README.md +++ b/README.md @@ -6,22 +6,35 @@ This project serves as a template project for Flutter applications. You can gene ## 🔧 Setup and Installation -- Execute `$ flutter doctor` to verify installations -- Execute `$ pub get` to pull project dependencies -- Execute a run configuration of choice - - `$ flutter run --flavor development -t lib/main_development.dart --dart-define-from-file=lib/config/dart_define_keys/dart_define_development_keys.json` - - `$ flutter run --flavor staging -t lib/main_staging.dart --dart-define-from-file=lib/config/dart_define_keys/dart_define_staging_keys.json` - -⚠️ **Running the Production Flavor** - -It is **not recommended** to run the production flavor directly from the IDE -(VS Code or Android Studio) as it may be run by mistake. For ease and accuracy, -it is advised to run flavors via the **VS Code launch menu** or the **Android -Studio Run menu** instead. +1. Execute `$ flutter doctor` to verify installations. +2. Execute `$ pub get` to pull project dependencies. +3. Execute a run configuration of your choice: + + ```sh + flutter run --flavor development -t lib/main_development.dart --dart-define-from-file=lib/config/dart_define_keys/dart_define_development_keys.json + ``` + + ```sh + flutter run --flavor staging -t lib/main_staging.dart --dart-define-from-file=lib/config/dart_define_keys/dart_define_staging_keys.json` + ``` + +> [!IMPORTANT] +>⚠️ **Running the Production Flavor** +> +>It is **not recommended** to run the production flavor directly from the IDE +>(VS Code or Android Studio) as it may be run by mistake. For ease and >accuracy, +>it is advised to run flavors via the **VS Code launch menu** or the **Android +>Studio Run menu** instead. +> +>To use the build runner, use this command: +> +>```sh +>dart run build_runner build --delete-conflicting-outputs +>``` ## 🌲 Branches -- `master` - Latest version in the app store. +- `main` - Latest version in the app store. - `develop` - Default. Feature branches are merged in when complete and then deleted. ## 🔗 Useful links @@ -32,4 +45,3 @@ Studio Run menu** instead. - [OpenAPI Specification](https://TODO) - [NStack](https://TODO) - [Figma Design](https://TODO) -- [UI Manifesto](https://github.com/monstar-lab-oss/ui-manifesto) diff --git a/lib/config/dart_define.dart b/lib/config/dart_define.dart index eb2667d..6ac6527 100644 --- a/lib/config/dart_define.dart +++ b/lib/config/dart_define.dart @@ -1,5 +1,5 @@ -// This class is declared as an `abstract interface` to restrict inheritance +// This class is declared as an `abstract final` to restrict inheritance // and prevent instantiation outside the library. -abstract interface class DartDefine { +abstract final class DartDefine { static const apiBaseUrl = String.fromEnvironment('API_BASE_URL'); } diff --git a/lib/presentation/common/assets_cache_manager.dart b/lib/presentation/common/assets_cache_manager.dart index d463d59..fcf74ac 100644 --- a/lib/presentation/common/assets_cache_manager.dart +++ b/lib/presentation/common/assets_cache_manager.dart @@ -1,4 +1,4 @@ -abstract interface class AssetsCachingManager { +abstract final class AssetsCachingManager { /// Caches only the animations required at the initial app startup, /// specifically for the splash screen. /// diff --git a/lib/presentation/resources/app_color_palette.dart b/lib/presentation/resources/app_color_palette.dart index ab60fe7..8230b70 100644 --- a/lib/presentation/resources/app_color_palette.dart +++ b/lib/presentation/resources/app_color_palette.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; /// Defines color palette for the application. /// /// Consider using the color name that is mentioned in Figma. -abstract interface class AppColorPalette { +abstract final class AppColorPalette { const AppColorPalette._(); static const alpha = Colors.transparent; diff --git a/lib/presentation/resources/app_fonts.dart b/lib/presentation/resources/app_fonts.dart index 7a76f05..51299e5 100644 --- a/lib/presentation/resources/app_fonts.dart +++ b/lib/presentation/resources/app_fonts.dart @@ -1,6 +1,6 @@ import 'package:flutter_template/gen/fonts.gen.dart'; -abstract interface class AppFonts { +abstract final class AppFonts { AppFonts._(); static const roboto = FontFamily.roboto; diff --git a/lib/presentation/resources/app_theme.dart b/lib/presentation/resources/app_theme.dart index 501b177..3744b8d 100644 --- a/lib/presentation/resources/app_theme.dart +++ b/lib/presentation/resources/app_theme.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_template/presentation/extensions/color_extensions.dart'; import 'package:flutter_template/presentation/resources/resources.dart'; -abstract interface class AppTheme { +abstract final class AppTheme { const AppTheme._(); static ThemeData fromBrightness(Brightness brightness) { diff --git a/lib/presentation/resources/app_ui_constants.dart b/lib/presentation/resources/app_ui_constants.dart index a6a4f4b..02032a7 100644 --- a/lib/presentation/resources/app_ui_constants.dart +++ b/lib/presentation/resources/app_ui_constants.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; /// /// This class contains non-sensitive information and is designed to maintain consistency /// across the app's UI elements. -abstract interface class AppUiConstants { +abstract final class AppUiConstants { AppUiConstants._(); // Animations diff --git a/pubspec.yaml b/pubspec.yaml index 686d546..bb878bb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,8 +14,8 @@ dependencies: # UI & Design cupertino_icons: ^1.0.8 - flutter_svg: 2.0.9 # Change with caution - lottie: 1.4.3 # Change with caution + flutter_svg: 2.0.9 # ⚠️ Change with caution (reason: nstack) + lottie: 3.0.0 # ⚠️ Change with caution (reason: nstack -> http) flutter_sticky_header: ^0.7.0 auto_size_text: ^3.0.0 theme_tailor_annotation: ^3.0.1 From e5b8ef4ce023e5c81f989d332211bc29d6285354 Mon Sep 17 00:00:00 2001 From: Utpal Barman Date: Sat, 26 Oct 2024 02:24:41 +0600 Subject: [PATCH 2/2] nit --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7b85751..9e24319 100644 --- a/README.md +++ b/README.md @@ -19,18 +19,19 @@ This project serves as a template project for Flutter applications. You can gene ``` > [!IMPORTANT] ->⚠️ **Running the Production Flavor** +> ⚠️ **Running the Production Flavor** > ->It is **not recommended** to run the production flavor directly from the IDE ->(VS Code or Android Studio) as it may be run by mistake. For ease and >accuracy, ->it is advised to run flavors via the **VS Code launch menu** or the **Android ->Studio Run menu** instead. +> It is **not recommended** to run the production flavor directly from the IDE +> (VS Code or Android Studio) as it may be run by mistake. For ease and +> accuracy, +> it is advised to run flavors via the **VS Code launch menu** or the +> **Android Studio Run menu** instead. > ->To use the build runner, use this command: +> To use the build runner, use this command: > ->```sh ->dart run build_runner build --delete-conflicting-outputs ->``` +> ```sh +> dart run build_runner build --delete-conflicting-outputs +> ``` ## 🌲 Branches