Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PatchAii/flutter_starter_project
https://github.com/PatchAii/flutter_starter_project
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/PatchAii/flutter_starter_project
- Owner: PatchAii
- License: mit
- Created: 2021-08-05T13:20:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-22T08:27:36.000Z (almost 3 years ago)
- Last Synced: 2024-08-03T14:09:06.538Z (3 months ago)
- Language: Dart
- Size: 6.78 MB
- Stars: 74
- Watchers: 8
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flutter starter project 🚦 📱 💻 🖥️
[![style: ficcanaso](https://img.shields.io/badge/style-ficcanaso-yellow)](https://github.com/dbbd59/ficcanaso)
## Introduction
> a template with best practices for starting a new app or becoming familiar with the architecture of our projects
Live Demo:
---
## Tools
- VSCode ().
- VSCode Extensions
- Flutter ()
- Dart ()
- Bloc ()
- Flutter-Stylizer ()
- Bracket Pair Colorizer 2 ()
- Error Lens ()---
## Installation
- Install ().
to verify proper installation
```sh
flutter doctor -v
```- add `dotenv` (filename: dotenv) file in the root of the project with:
```sh
ENDPOINT='https://graphql-pokemon2.vercel.app'
ENVIRONMENT='dev/prod/qa'
```- create a firebase project. info here:
- add `GoogleService-Info.plist` in `/ios/Runner/`:
- add `google-services.json` in `/android/app/`:---
## Architecture
## Test
```sh
brew install lcov
``````sh
flutter test
```- coverage
```sh
flutter test --coverage
flutter test --coverage && lcov --remove coverage/lcov.info '**/*.freezed.dart' '**/*.g.dart' '**/*.graphql.dart' '**/*.part.dart' '**/*.config.dart' '**/*_event.dart' '**/*_state.dart' '**/*_repo.dart' '**/core/*' '**/*_controller.dart' '**/alert/*.dart' -o coverage/lcov.info && genhtml coverage/lcov.info --output=coverage && open coverage/index.html```
- golden
```sh
flutter test --update-goldens
```---
## ✨Mago Merlino✨
- generate a new feature (bloc/repo/view) using the magic powers of mago merlino:
```sh
# install dart
brew install dart# activate ✨mago_merlino✨
dart pub global activate -sgit https://github.com/PatchAii/mago-merlino.git```
- then 🎶 listen to this:
```sh
# do some ✨magic✨
dart pub global run mago_merlino:mago_merlino create-feature --path lib/feature/abc#or
dart pub global run mago_merlino:mago_merlino create-feature abc
```---
## Translations
Update transaltions:
```sh
make localisation
```## Usefull commands
```sh
# Code generator "build_runner"
flutter pub run build_runner build# Code generator "build_runner" with confict remove
flutter pub run build_runner build --delete-conflicting-outputs
```---
## Notifications
Local and push notification are handled by **Awesome_notification**
To send a notification using FCM services, you need to send a POST to:
```sh
https://fcm.googleapis.com/fcm/send
```To avoid misbehavior on Android and IOS you should send an empty **notification** field and use only **data** field for your data.
Here's an example of a POST request **body**:
```javascript
{
"to" : "[YOUR APP FCM TOKEN]",
"mutable_content" : true,
"content_available": true,
"priority": "high",
"data" : {
"id": 100,
"channelKey": "basic_channel",
"title": "Basic message",
"body": "This is the body of a basic FCM message"
}
}
```Inside **headers** define:
```javascript
Content-type: application/json
Authorization: key=[server_key]
```---