easy_in_app_notify 1.0.0
easy_in_app_notify: ^1.0.0 copied to clipboard
A beautiful Flutter package for displaying notifications as in-app overlays with smooth animations, progress indicators, and customizable styling.
Changelog #
All notable changes to the Easy In-App Notify package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 2024-01-XX #
π First Stable Release #
This is the first release of Easy In-App Notify, providing a complete solution for beautiful in-app notifications in Flutter applications.
β¨ Added #
Core Features
- In-App Overlays: Perfect for any notification system integration
- Foreground Notifications: Show notifications when app is active/foreground
- Overlay Notifications: Non-blocking notifications that appear over app content
- Auto-Dismiss: Configurable duration with automatic dismissal
- Manual Dismiss: Swipe-to-dismiss functionality for user control
- Sound Support: Built-in notification sound playback
- Single Notification Policy: Ensures only one notification is shown at a time
Animation System
- Smooth Slide Animation: Notifications slide in from the top with easing curves
- Progress Animation: Visual countdown with linear progress indicator
- Coordinated Timing: Synchronized animations for professional appearance
Customization Options
- Content Configuration: Title, message, icon, and trailing text
- Behavioral Options: Duration, progress bar visibility, swipe dismissal
- Visual Theming: Colors, spacing, dimensions, elevation, and border radius
- Material Design: Automatic integration with app's Material theme
User Experience
- Safe Area Awareness: Respects device safe areas and notches
- RTL Support: Full right-to-left language support
- Responsive Design: Adapts to different screen sizes and orientations
- Accessibility: Follows Flutter accessibility guidelines
Technical Implementation
- Provider Pattern: Efficient state management and data distribution
- Part Files: Clean modular architecture for maintainability
- Resource Management: Proper disposal of animations and timers
- Memory Optimization: Prevents memory leaks with careful cleanup
ποΈ Architecture #
Data Models
EasyInAppNotifyContent
: Notification content configurationEasyInAppNotifyOption
: Behavior and interaction settingsEasyInAppNotifyTheme
: Visual styling and appearance
View Components
_NotifyView
: Root notification widget with lifecycle management_NotifyContainer
: Positioning, animations, and user interactions_NotifyCard
: Material card structure and layout_NotificationContent
: Text content and icon display_NotificationIcon
: Styled icon with background container_NotifyProgress
: Animated progress bar indicator
Controllers
_AnimManger
: Animation coordination and timing managementEasyInAppNotify
: Global notification controller and API
π¦ Dependencies #
- flutter: SDK framework (>=1.17.0)
- provider: State management (^6.1.5+1)
- flutter_ringtone_player: Notification sounds (^4.0.0+4)
π§ Requirements #
- Dart: ^3.9.0
- Flutter: >=1.17.0
π± Platform Support #
- β Android
- β iOS
- β Web
- β macOS
- β Windows
- β Linux
π API Reference #
Main API
// Initialize notification service (call in initState)
EasyInAppNotify.init(BuildContext context)
// Show notification
EasyInAppNotify.show({
required EasyInAppNotifyContent content,
EasyInAppNotifyOption? option,
EasyInAppNotifyTheme? theme,
})
Initialization Pattern
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHomePage(), // StatefulWidget AFTER MaterialApp
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
void initState() {
super.initState();
// Initialize AFTER MaterialApp is built
WidgetsBinding.instance.addPostFrameCallback((_) {
EasyInAppNotify.init(context);
});
}
@override
Widget build(BuildContext context) {
return Scaffold(/* your content */);
}
}
Content Configuration
EasyInAppNotifyContent({
required String title,
required String message,
IconData? icon,
String? trailingText,
})
Options Configuration
EasyInAppNotifyOption({
int duration = 5,
bool showProgressBar = true,
bool swipeToDismiss = true,
})
Theme Configuration
EasyInAppNotifyTheme({
Color? color,
double margin = 5,
double padding = 10,
double radius = 10,
double elevation = 5,
double iconSize = 20,
})
π― Use Cases #
Perfect for displaying:
- π Remote notifications from any service
- π¬ Chat messages from messaging systems
- π’ Push notifications when app is foreground
- ποΈ Promotional messages from marketing services
- β οΈ Alert notifications from any backend
- β Success confirmations
- β Error messages
- βΉοΈ Information updates
- π± Status notifications
- π Event announcements
- π― Achievement unlocks
π Performance #
- Lightweight: Minimal memory footprint
- Efficient: Optimized animations and rendering
- Responsive: Smooth 60fps animations
- Resource-Aware: Proper cleanup prevents memory leaks
Future Releases #
Planned Features for v0.1.0 #
- Custom animation curves
- Multiple notification queue support
- Tap-to-action callbacks
- Custom widget content support
- Position configuration options
Roadmap #
- v0.2.0: Enhanced customization and interaction options
- v0.3.0: Advanced animation effects and transitions
- v1.0.0: Stable API with comprehensive testing
This changelog follows the Keep a Changelog format.