splashkit 0.0.1
splashkit: ^0.0.1 copied to clipboard
A CLI tool to add Android native splash screen using AVD in Flutter apps.
π SplashKit #
SplashKit is a Dart CLI tool that automates the creation and configuration of native Android 12+ splash screens using Animated Vector Drawable (AVD) for Flutter apps.
π Features #
- β Adds required Android dependencies for native splash
- π Modifies
AndroidManifest.xml,styles.xml, andMainActivity.kt - π¨ Applies your custom AVD splash icon
- βοΈ Easily configurable via
pubspec.yaml
π¦ Installation #
Installation & Usage #
Run Locally (Inside Your Project) #
If you have SplashKit added as a dev dependency or are inside its folder, run:
dart run splashkit
π οΈ Install Globally (Recommended) #
windows :
To use SplashKit from anywhere in your terminal, install it globally:
1. Activate the package globally #
dart pub global activate --source=path .
(Run the above command inside your SplashKit project folder.)
2. Add Dartβs global executables folder to your system PATH #
- Open System Properties β Environment Variables
- Under User variables, find or create a variable named
Path - Add:
%USERPROFILE%\AppData\Local\Pub\Cache\bin
3. Restart your terminal #
After updating your environment variables, restart your terminal (Command Prompt, PowerShell, etc.).
β Done! #
Now, you can run SplashKit anywhere:
splashkit
macOS/Linux :
To use SplashKit from anywhere in your terminal, install it globally:
1. Activate the package globally #
dart pub global activate --source=path .
(Run the above command inside your SplashKit project folder.)
2. Add Dartβs global executables folder to your system PATH #
export PATH="$PATH:$HOME/.pub-cache/bin"
Add the above line to your shell config file (
~/.zshrc,~/.bashrc, or~/.bash_profile) to make it permanent.
3. Reload your shell configuration #
source ~/.zshrc # or source ~/.bashrc or ~/.bash_profile
β Done! #
Now, you can run SplashKit anywhere:
splashkit
π Sample AVD #
You can use this sample Animated Vector Drawable to test the plugin:
SplashKit will:
- Read config from
pubspec.yaml - Locate the AVD XML file
- Update your native Android splash screen setup
βοΈ Configuration #
Add a block to your pubspec.yaml:
avd_splash:
animated_icon: assets/animated_icon.xml
post_theme: AppTheme
package: com.example.myapp
| Key | Description |
|---|---|
animated_icon |
Path to your AVD XML file |
post_theme |
The theme to apply after the splash screen |
package_name |
Your appβs package name (as used in AndroidManifest.xml) |
β What It Edits #
android/app/build.gradleβ addsandroidx.core:core-splashscreenAndroidManifest.xmlβ sets splash themestyles.xmlβ applies post-splash themeMainActivity.ktβ invokessetTheme(...)
π§Ύ Requirements #
- Flutter app targeting Android 12 (API 31+) or newer
- A valid AVD XML file
- compileSdkVersion 35 or above
π£ Roadmap #
- β Lottie-to-AVD converter
- β Pre-Android 12 fallback
- β Web and desktop splash support
Support Me β #
If you enjoy my work, consider buying me a coffee!
π Author #
Built with β€οΈ by Jasir Bin Shihabudeen
Contributions welcome! Star βοΈ the repo and open issues/PRs to improve it!
π License #
MIT License. See LICENSE for details.