Flutter 扩展
Flutter 入门?
由 Dhiwise 使用 ❤️ 生成
一个完全使用 Dhiwise 和 Supabase 构建的 Flutter 移动应用程序,无需编写任何代码。具有 100% 系统生成的代码
这是 Flutter 应用程序的文档。它包含了您开始使用和修改应用程序所需的所有信息
此应用程序基于 MVVM 架构构建。
系统要求
Dart SDK 版本 2.12.0 或更高版本。Flutter SDK 版本 2.0.0 或更高版本。
Figma 设计指南,以提高准确性
阅读我们的指南,通过优化 Figma 设计来提高设计到代码转换的准确性。https://docs.dhiwise.com/knowledgehub/reference-guide-and-tools/figma
应用导航
在应用程序的“AppNavigation”屏幕中检查您的应用程序UI。
Supabase 配置
- 在 lib/core/utils/initial_bindings 文件中添加 supabaseUrl 和 supabasePublicKey
- 更多详情请参考https://supabase.com/docs/guides/with-flutter
项目结构
成功构建后,您的应用程序结构应如下所示
.
├── android - contains files and folders required for running the application on an Android operating system.
├── assets - contains all images and fonts of your application.
├── ios - contains files required by the application to run the dart code on iOS platforms.
├── lib - Most important folder in the project, used to write most of the dart code.
├── main.dart - starting point of the application
├── core
│ ├── app_export.dart - contains commonly used file imports
│ ├── constants - contains all constants classes
│ ├── errors - contains error handling classes
│ ├── network - contains network related classes
│ └── utils - contains common files and utilities of project
├── data
│ ├── apiClient - contains api calling methods
│ ├── models - contains request/response models
│ └── repository - network repository
├── localization - contains localization classes
├── presentation - contains all screens and screen controllers
│ └── screens - contains all screens
├── routes - contains all the routes of application
└── theme - contains app theme and decoration classes
您如何格式化代码?
- 如果您的代码未格式化,请在终端中运行以下命令来格式化代码
dart format .
如何提高代码的可读性?
解决应用程序中显示的错误和警告。
使用的库和工具
- get – 状态管理 https://pub.dev/packages/get
- connectivity_plus – 用于网络连接状态 https://pub.dev/packages/connectivity_plus
- pull_to_refresh – 用于列表功能 https://pub.dev/packages/pull_to_refresh
- cupertino_icons – 用于 iOS 图标 https://pub.dev/packages/cupertino_icons
- shared_preferences – 为简单数据提供持久化存储 https://pub.dev/packages/shared_preferences
- cached_network_image – 用于将互联网图像存储到缓存中 https://pub.dev/packages/cached_network_image
支持
如果您遇到问题或有疑问,请访问我们的 Discord 频道,我们将尽快为您提供帮助:https://discord.com/invite/rFMnCG5MZ7
