搜索插件、代码仓与 APP 分类

GitHub 代码仓enescerrahoglu/template_app_bloc

template_app_bloc

一个具有基本功能并基于 bloc 架构的模板 Flutter 项目。

template_app_bloc 项目封面
星标
181
复刻
43
最近推送(UTC)
2024年10月7日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

Template App with flutter_bloc

This project provides an application template using the bloc state management method with Flutter. The project includes user CRUD (Create, Read, Update, Delete) operations and authentication, serving as a realistic example for real-world scenarios. In order to prove that native-looking applications can be developed with Flutter if desired, Cupertino widgets were preferred instead of Material widgets in the user interface of the project.
The current latest version of Flutter [3.24.3] was used during the development process.

TEMPLATE APP

Getting Started

API Integration

A Rest API is used for user operations, and the API code is not included in this repository. You can develop API endpoints according to the UserModel class in the project to make it suitable for use. You need to update the BASE_URL value in the '.env' file content to match your API structure. You can find the naming used for CRUD and authentication endpoints in the UserService class, and you may need to revise it according to your API structure.

Firebase Integration

The project uses Storage for uploading images and accessing them via URL, Extensions and Firestore Database for email infrastructure and Functions for triggering email sending. Therefore, you will need a Firebase project. Since the firebase_options.dart file is not included in the Template App project content, it will throw an error when you clone the repo. Perform Firebase integration to add this file to the project.

Firebase Trigger Email Extension Integration

For email verification, a verification code is sent to the email address provided by the user. The Firebase Trigger Email extension is used for email infrastructure. You need to activate this extension via the Firebase console. Besides verification code sending, the email infrastructure is used for different scenarios as well. Email sending is triggered by Firebase Cloud Functions.

Firebase Cloud Functions Integration

The project already includes the functions folder and firebase.json file to be added with Cloud Functions. If you specify that the functions/index.js file should be overwritten while integrating cloud functions, you will delete the cloud functions that you need to deploy for the email infrastructure from the file. You can skip the overwrite step with the "No" option, or if it is overwritten, you can copy and deploy the functions again from the relevant file in this Github repo.

Screenshoots

Hover the mouse cursor over the images for explanations.
Login Screen Forgot Password Screen Register Screen Verificaton Code Screen Verification code and welcome emails Update Profile Screen View/Edit Profile Photo Screen Home Screen Settings Screen Change app theme Change app language

Problems you may encounter

To prevent [...lowerCamelCase identifier] problems caused by the easy_localization package, it will be sufficient to add the [constant_identifier_names: false] definition under the [rules:] statement in the analysis_options.yaml file in the project directory.

problem_1

Things to know

After adding new string definitions to the [language-code].json (such as en.json, tr.json) file, run the following codes in the terminal one by one so that the easy_localization structure can recognize these changes:

dart run easy_localization:generate --source-dir assets/translations
dart run easy_localization:generate -S assets/translations -f keys -o locale_keys.g.dart
Enes Cerrahoğlu GitHub avatar
GitHub 作者

Enes Cerrahoğlu ↗

Tech Entrepreneur | Software Engineer | Flutter Developer

Istanbul
语言DartC++CMakeRubySwiftHTMLJavaScriptCKotlinObjective-C

分类

使用的依赖

依赖清单 24 项

所在榜单

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗