Myobil
A simple and elegant splash screen plugin for Flutter applications. Display beautiful loading screens while your app initializes.
Features
- Simple splash screen widget with customizable UI
- Easy-to-use API with minimal configuration
- Includes an in-app browser component for displaying web content
- iOS support (Android coming soon)
- Lightweight and performant
Platform Support
| Platform | Supported |
|---|---|
| iOS | ✅ |
| Android | 🔜 Coming soon |
Installation
Add this to your package's pubspec.yaml file:
dependencies:
myobil: ^0.0.1
Then run:
flutter pub get
Usage
Basic Splash Screen
import 'package:flutter/material.dart';
import 'package:myobil/myobil.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyobilSplashScreen(
onComplete: () {
// Navigate to your main app
Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (_) => HomeScreen()),
);
},
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
FlutterLogo(size: 100),
SizedBox(height: 24),
CircularProgressIndicator(),
],
),
),
),
);
}
}
Custom Splash Screen Design
You can fully customize the splash screen appearance:
MyobilSplashScreen(
onComplete: () {
// Your navigation logic
},
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.blue, Colors.purple],
),
),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'My App',
style: TextStyle(
fontSize: 48,
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
SizedBox(height: 24),
CircularProgressIndicator(color: Colors.white),
],
),
),
),
)
In-App Browser
Display web content within your app:
MyobilSafariScreen(
url: 'https://example.com',
loadingImageAsset: 'assets/loading.jpg', // Optional
tapToScreenText: 'Tap to reload', // Optional
)
Documentation
Check out the example directory for a complete working demo.
Requirements
- Flutter 3.3.0 or higher
- iOS 12.0 or higher
Contributing
Found a bug or want to contribute? Feel free to open an issue or submit a pull request.
License
MIT License - see LICENSE for details.