A simple Flutter overlay to monitor memory usage in real-time
- Draggable overlay widget
- Customizable colors and text
- Easily add to any screen
Add the following to your pubspec.yaml file:
dependencies:
memory_monitor_overlay: ^0.0.1import 'package:memory_monitor_overlay/memory_monitor_overlay.dart';
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Memory Monitor Demo'), elevation: 2),
body: Stack(
children: [
Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
'Memory Monitor Overlay',
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
],
),
),
// Add memory monitory overlay
const MemoryMonitorOverlay(
updateInterval: Duration(milliseconds: 500),
initialX: 20,
initialY: 100,
),
],
),
);
}