How jonbhanson/flutter_native_splash works
Project type and purpose
• This is an open-source Flutter plugin and CLI tool named flutter_native_splash.
• Purpose: read a YAML configuration, then generate and inject native splash-screen code and assets for Android, iOS, and Web in a host Flutter project.
File structure
• Top-level directories:
– bin/ (entry-point Dart scripts: create.dart, remove.dart)
– lib/ (core logic, config parsing, template definitions, platform modules)
– android/, ios/, web/ (native plugin code and podspec/package files for distribution)
– example/ (sample Flutter app demonstrating usage)
– test/ (unit tests for core logic)
– configuration and CI: .github/workflows, .travis.yml, analysis_options.yaml
• Patterns and roles:
– CLI layer (bin/) invokes core functions in lib/
– Core library splits into Config Parser, Template Engine, File Writer, Platform Modules
– Platform modules for Android, iOS, Web each modify or generate native files (XML, storyboard, CSS, index.html, asset drawables)
– Templates (lib/templates.dart) define file content and naming conventions
– Tests validate helper utils and core workflow
README for additional insights
• Describes features: dark mode support, Android 12 specifics, flavor support, preserve/remove methods
• Outlines which native files get modified on each platform
Elements
– CLI layer (e.g., yellow)
– Core engine (e.g., blue)
– Platform modules (e.g., green)
– External/CI (e.g., grey)