flutter_app_config 1.0.3
flutter_app_config: ^1.0.3 copied to clipboard
Configure app name, icon, version, and splash screen directly from pubspec.yaml. Save 30-60 minutes of manual setup with automatic Android/iOS configuration. Flutter logo included. One command setup.
flutter_app_config #
Configure app name, ID, icon, and splash screen from pubspec.yaml, then run one command to update Android and iOS.
Why this package? #
- One config block in
pubspec.yaml - One command to apply Android/iOS changes
- One splash (native matches Flutter)
Quick start (3 steps) #
1) Add dependency #
dependencies:
flutter:
sdk: flutter
flutter_app_config: ^1.0.3
2) Add config at root level #
flutter_app_config:
app_name: "My App"
package_id: "com.example.myapp"
version_name: "1.0.0"
version_code: 1
custom_icon_path: "assets/icons/app_icon.png"
splash_image_path: "assets/images/splash.png" # Optional
splash_background_color: 0xFF2196F3 # Optional
Important: flutter_app_config: must be at root level, not inside dependencies:.
3) Apply config #
dart run flutter_app_config:configure
# or:
flutter pub run flutter_app_config:configure
Run it again after any config change.
Use the splash screen widget (optional) #
If you want a splash screen, add your splash asset under flutter.assets, then use:
If you don’t want a splash screen, omit splash_image_path and use your normal home widget directly.
import 'package:flutter/material.dart';
import 'package:flutter_app_config/flutter_app_config.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: SplashScreen(
config: const SplashConfig(
imagePath: 'assets/images/splash.png',
duration: Duration(seconds: 2),
backgroundColor: 0xFF2196F3,
imageFit: BoxFit.contain, // contain=centered, cover=full screen
imageWidth: 180, // optional
imageHeight: 180,
),
home: const Scaffold(
body: Center(child: Text('Home')),
),
),
);
}
}
Notes (short) #
- Single splash: Native splash uses the same image + background color, so no blank screen.
- Android icon:
custom_icon_pathis copied into Android mipmap folders. - iOS icon: Use a generator like appicon.co and replace files in
ios/Runner/Assets.xcassets/AppIcon.appiconset/. - Testing: run the app on an emulator or real device after
dart run flutter_app_config:configure.
Requirements #
- Flutter SDK >= 3.0.0
- Dart SDK >= 3.0.0