Skip to content

docs: Updated README.md #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 27 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,36 @@ 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
Expand All @@ -32,4 +46,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)
4 changes: 2 additions & 2 deletions lib/config/dart_define.dart
Original file line number Diff line number Diff line change
@@ -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');
}
2 changes: 1 addition & 1 deletion lib/presentation/common/assets_cache_manager.dart
Original file line number Diff line number Diff line change
@@ -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.
///
Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/resources/app_color_palette.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/resources/app_fonts.dart
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/resources/app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/resources/app_ui_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading