Skip to content
Open
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
81 changes: 45 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,54 @@ some mason bricks that we use for our internal workflow
> Note that we use `bdaya_flutter_common` as a base library for the generated code
> We also need `build_runner` as a dev dependency.

* [bdaya_form](https://brickhub.dev/bricks/bdaya_form)
- generate a form using `reactive_forms_annotations` + `reactive_forms_generator`
* [bdaya_page](https://brickhub.dev/bricks/bdaya_page)
- generate a simple page (view + controller)
* [bdaya_route](https://brickhub.dev/bricks/bdaya_route)
- generate a page that reacts to route changes from `go_router`

- [bdaya_form](https://brickhub.dev/bricks/bdaya_form)
- generate a form using `reactive_forms_annotations` + `reactive_forms_generator`
- [bdaya_page](https://brickhub.dev/bricks/bdaya_page)
- generate a simple page (view + controller)
- [bdaya_route](https://brickhub.dev/bricks/bdaya_route)
- generate a page that reacts to route changes from `go_router`
- [bdaya_new_flutter_app](https://brickhub.dev/bricks/bdaya_new_flutter_app)
- generate a new bdaya flutter app.

## Usage on git

1. Activate [mason_cli](https://pub.dev/packages/mason_cli)
- `dart pub global activate mason_cli`
- `dart pub global activate mason_cli`
2. Add Bricks
- bdaya_form
```
mason add bdaya_form --git-url https://github.com/Bdaya-Dev/bricks --git-path bdaya_form
```
- bdaya_route
```
mason add bdaya_route --git-url https://github.com/Bdaya-Dev/bricks --git-path bdaya_route
```
- bdaya_page
```
mason add bdaya_page --git-url https://github.com/Bdaya-Dev/bricks --git-path bdaya_page
```
- bdaya_form
```
mason add bdaya_form --git-url https://github.com/Bdaya-Dev/bricks --git-path bdaya_form
```
- bdaya_route
```
mason add bdaya_route --git-url https://github.com/Bdaya-Dev/bricks --git-path bdaya_route
```
- bdaya_page
```
mason add bdaya_page --git-url https://github.com/Bdaya-Dev/bricks --git-path bdaya_page
```
- bdaya_new_flutter_app
```
mason add bdaya_new_flutter_app --git-url https://github.com/Bdaya-Dev/bricks --git-path bdaya_new_flutter_app
```
3. `mason get`
4. Make
- bdaya_form:
```
mason make bdaya_form -o lib/src/dialogs --name EditUser
```
> Note that `bdaya_form` requires some dependencies, which you can add using this command:
>
> `dart pub add reactive_forms_annotations --dev reactive_forms_generator`
- bdaya_route:
```
mason make bdaya_route -o lib/src/pages --name UserDetails
```
- bdaya_page:
```
mason make bdaya_page -o lib/src/pages --name Users
```

- bdaya_form:
```
mason make bdaya_form -o lib/src/dialogs --name EditUser
```
> Note that `bdaya_form` requires some dependencies, which you can add using this command:
>
> `dart pub add reactive_forms_annotations --dev reactive_forms_generator`
- bdaya_route:
```
mason make bdaya_route -o lib/src/pages --name UserDetails
```
- bdaya_page:
```
mason make bdaya_page -o lib/src/pages --name Users
```
- bdaya_new_flutter_app:
```
mason make bdaya_new_flutter_app -o "your/projects/path"
```
12 changes: 12 additions & 0 deletions bdaya_new_flutter_app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.DS_Store
.atom/
.idea/*
.vscode/*

# Files and directories created by pub
.dart_tool/
.packages
pubspec.lock

# Conventional directory for build outputs
build/
3 changes: 3 additions & 0 deletions bdaya_new_flutter_app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 0.0.1

- feat: initial release 🎉
21 changes: 21 additions & 0 deletions bdaya_new_flutter_app/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Bdaya Development

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
89 changes: 89 additions & 0 deletions bdaya_new_flutter_app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Bdaya New Flutter App

Inspired from [very_good_core][very_good_core_link] 🦄.

Developed with 💙 by [Bdaya Development][bdaya_development_link].

[![License: MIT][license_badge]][license_link]
[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason)

A Bdaya New Flutter App created by [Bdaya Development][bdaya_development_link].

## What's Included ✨

Out of the box, Bdaya New Flutter App includes:

- ✅ [Cross Platform Support][flutter_cross_platform_link] - Built-in support for iOS, Android, Web, and Windows (MacOS/Linux coming soon!)
- ✅ [Build Flavors][flutter_flavors_link] - Multiple flavor support for development, staging, and production
- ✅ [Internationalization Support][internationalization_link] - Internationalization support using synthetic code generation to streamline the development process
- ✅ [Sound Null-Safety][null_safety_link] - No more null-dereference exceptions at runtime. Develop with a sound, static type system.
- ✅ [bdaya_flutter_common][bdaya_flutter_common] - A library to combine and standarize the common code we use in our projects into a single package.
- ✅ [get_it][get_it_link] - Integrated get_it architecture for scalable, testable code which offers a simple Service Locator for bdaya app services,and controllers.
- ✅ [bdaya_shared_value][bdaya_shared_value_link] - An opinionated fork of the original package [shared_value][shared_value_link] that is a wrapper over [InheritedModel][InheritedModel_link] , this module allows you to easily manage global state in flutter apps. At a high level, SharedValue puts your variables in an intelligent "container" that is flutter-aware. It can be viewed as a low-boilerplate generalization of the Provider state management solution.
- ✅ [Testing][testing_link] - Unit and Widget Tests with 100% line coverage (Integration Tests coming soon!)
- ✅ [Logging][logging_link] - Built-in, extensible logging to capture uncaught Flutter and Dart Exceptions

## Output 📦

```sh
├── .gitignore
├── .idea
│ └── runConfigurations
│ ├── development.xml
│ ├── production.xml
│ └── staging.xml
├── .vscode
│ ├── extensions.json
│ └── launch.json
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android
├── coverage_badge.svg
├── ios
├── l10n.yaml
├── lib
│ ├── app
│ │ ├── app.dart
│ │ └── view
│ ├── bootstrap.dart
│ ├── counter
│ │ ├── counter.dart
│ │ ├── cubit
│ │ └── view
│ ├── l10n
│ │ ├── arb
│ │ └── l10n.dart
│ ├── main_development.dart
│ ├── main_production.dart
│ └── main_staging.dart
├── pubspec.lock
├── pubspec.yaml
├── test
│ ├── app
│ │ └── view
│ ├── counter
│ │ ├── cubit
│ │ └── view
│ └── helpers
│ ├── helpers.dart
│ └── pump_app.dart
├── web
└── windows
```

[bdaya_flutter_common]: https://pub.dev/packages/bdaya_flutter_common
[get_it_link]: https://pub.dev/packages/get_it
[bdaya_shared_value_link]: https://pub.dev/packages/bdaya_shared_value
[shared_value_link]: https://pub.dev/packages/shared_value
[InheritedModel_link]: https://api.flutter.dev/flutter/widgets/InheritedModel-class.html
[flutter_cross_platform_link]: https://flutter.dev/docs/development/tools/sdk/release-notes/supported-platforms
[flutter_flavors_link]: https://flutter.dev/docs/deployment/flavors
[internationalization_link]: https://flutter.dev/docs/development/accessibility-and-localization/internationalization
[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
[license_link]: https://opensource.org/licenses/MIT
[logging_link]: https://api.flutter.dev/flutter/dart-developer/log.html
[null_safety_link]: https://flutter.dev/docs/null-safety
[testing_link]: https://flutter.dev/docs/testing
[bdaya_development_link]: https://bdaya-dev.com/
[very_good_core_link]: https://github.com/VeryGoodOpenSource/very_good_templates/tree/main/very_good_core
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Blank file

This File should be removed, If you are reading this, please remove it.
4 changes: 4 additions & 0 deletions bdaya_new_flutter_app/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
analyzer:
exclude:
- __brick__/**
- lib/template/**
29 changes: 29 additions & 0 deletions bdaya_new_flutter_app/brick.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: bdaya_new_flutter_app
description: A Bdaya New Flutter app created by Bdaya Development.
repository: https://github.com/Bdaya-Dev/bricks/tree/main/bdaya_new_flutter_app
version: 0.0.1

environment:
mason: ^0.1.0

vars:
project_name:
type: string
description: The project name
default: my_app
prompt: What is the project name?
org_name:
type: string
description: The organization name
default: com.example
prompt: What is the organization name?
application_id:
type: string
description: The application id on Android, Bundle ID on iOS and company name on Windows. If omitted value will be formed by org_name + . + project_name.
default: example.com
prompt: What is the application id?
description:
type: string
description: A short project description
default: A Bdaya Development App
prompt: What is the project description?
6 changes: 6 additions & 0 deletions bdaya_new_flutter_app/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"project_name": "test_app",
"org_name": "bdaya_development",
"application_id": "bdaya.dev.test",
"description": "bdaya_new_flutter_app test configuration"
}
20 changes: 20 additions & 0 deletions bdaya_new_flutter_app/coverage_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions bdaya_new_flutter_app/hooks/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include: package:flutter_lints/flutter.yaml
analyzer:
exclude:
- template/**
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'src/_exports.dart';
1 change: 1 addition & 0 deletions bdaya_new_flutter_app/hooks/lib/src/_exports.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'models/_exports.dart';
38 changes: 38 additions & 0 deletions bdaya_new_flutter_app/hooks/lib/src/consts.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const kSdk = '>=3.4.0 <4.0.0';
const kFlutter = '>=3.0.0';

const kDep = [
'async',
'bdaya_flutter_common',
'collection',
'go_router',
'grpc',
'logging',
];

const kDevDep = [
'build_runner',
'flutter_lints',
'injectable_generator',
'mocktail',
];

final kDirs = [
'extensions',
'gen',
'l10n',
'mixins',
'models',
'pages',
'services',
'utils',
'widgets',
];

final kFiles = [
'bootstrap.dart',
'common.dart',
'get_it_config.dart',
'injectable_module.dart',
'routes.dart',
];
7 changes: 7 additions & 0 deletions bdaya_new_flutter_app/hooks/lib/src/models/_exports.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export 'android_application_id.dart';
export 'android_namespace.dart';
export 'apple_application_id.dart';
export 'exceptions.dart';
export 'bdaya_new_flutter_app_configuration.dart';
export 'windows_application_id.dart';
export 'progress_args.dart';
Loading