Linux command
flutterfire 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Configure Firebase
flutterfire configure
Reconfigure specific
flutterfire configure --platforms=[android,ios]
Configure with specific
flutterfire configure --project=[firebase-project-id]
Update configuration
flutterfire configure --yes
说明
flutterfire is the CLI for setting up Firebase in Flutter projects. It automates the configuration process, generating platform-specific files and Dart code. The tool connects to your Firebase project and downloads configuration for selected platforms. It generates firebase_options.dart for initializing Firebase in your Flutter app. flutterfire eliminates manual copying of configuration files and ensures consistency across platforms.
参数
- configure
- Set up Firebase for Flutter project.
- --project _ID_
- Firebase project ID.
- --platforms _LIST_
- Platforms to configure.
- --yes
- Accept defaults without prompts.
- --out _FILE_
- Output configuration file path.
- --help
- Display help information.
FAQ
What is the flutterfire command used for?
flutterfire is the CLI for setting up Firebase in Flutter projects. It automates the configuration process, generating platform-specific files and Dart code. The tool connects to your Firebase project and downloads configuration for selected platforms. It generates firebase_options.dart for initializing Firebase in your Flutter app. flutterfire eliminates manual copying of configuration files and ensures consistency across platforms.
How do I run a basic flutterfire example?
Run `flutterfire configure` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does configure do in flutterfire?
Set up Firebase for Flutter project.