A comprehensive demonstration of the event_log Flutter plugin capabilities. This example showcases real-time event monitoring, historical queries, advanced filtering, and all plugin features in a beautiful Material Design 3 interface.
- ✅ Channel Listing - Browse all Windows Event Log channels
- ✅ Channel Information - View detailed channel metadata
- ✅ Historical Queries - Query past events with pagination
- ✅ Event Filtering - Filter by severity, time, event ID
- ✅ Live Monitoring - Subscribe to real-time events
- ✅ Event Details - View all event properties in expandable cards
- Modern Material Design 3 interface
- Real-time status indicators
- Expandable event cards with detailed information
- Loading states and error handling
- Responsive layout
- Flutter SDK ≥ 3.3.0
- Windows 10/11
- Visual Studio 2019 or later (for Windows development)
-
Clone the repository
git clone https://github.com/AppSolves/flutter_event_log.git cd flutter_event_log/example -
Install dependencies
flutter pub get
-
Run the app
flutter run -d windows
Use the dropdown at the top to select which Windows Event Log channel to monitor (System, Application, Security, etc.).
- All Events: Click "Query Events" to fetch the last 50 events
- Errors Only: Click "Query Errors" to filter by error and critical events
- Click "Start Live Monitoring" to subscribe to real-time events
- New events appear at the top of the list automatically
- Click "Stop Monitoring" to unsubscribe
Click on any event card to expand and see all properties:
- Event ID and Record ID
- Timestamp and level
- Provider information
- Process/Thread IDs
- User SID
- Full XML representation
final events = await EventLog.query(
EventFilter(
channel: _selectedChannel,
maxEvents: 50,
reverse: true,
),
);final subscription = await EventLog.subscribe(
EventFilter(channel: _selectedChannel),
);
subscription.listen(
(event) {
setState(() {
_liveEvents.insert(0, event);
});
},
onError: (error) {
print('Subscription error: $error');
},
);final errorEvents = await EventLog.query(
EventFilter(
channel: _selectedChannel,
levels: [EventLevel.error, EventLevel.critical],
maxEvents: 50,
),
);The example app is designed to be easily customizable:
- Modify filters: Change the
EventFilterparameters in query methods - Adjust UI: Customize colors and layouts in the widget tree
- Add features: Extend with export functionality, search, or analytics
No events showing up?
- Ensure you're running on Windows
- Try selecting different channels
- Check if events exist in Windows Event Viewer
Access denied errors?
- Some channels (like Security) require administrator privileges
- Right-click Visual Studio and "Run as administrator"
Subscription not working?
- Verify the channel is enabled in Windows Event Viewer
- Check for any error messages in the status bar
This example is part of the event_log plugin and is licensed under the Apache License 2.0.
See LICENSE for more details.
