faaah 0.0.1
faaah: ^0.0.1 copied to clipboard
A funny Flutter package that plays a "FAAAAH" meme sound whenever an error occurs.
Faaah ðą #
A hilarious and iconic Flutter package that plays the legendary "FAAAAH" meme sound whenever an error occurs in your application. Perfect for developers who want to add a bit of chaotic fun to their debugging and error-handling process.
âĻ Features #
- ð Audible Debugging: Know your app crashed even if you aren't looking at the logs.
- ðĄïļ Global Error Support: Automatically trigger the sound on every Flutter framework error with one line of code.
- ⥠Manual Playback: Programmatically trigger the sound in your own
try-catchblocks. - ðĶ Package-Friendly: Correctly handles asset paths so it works as a dependency in any project.
- ðŠķ Lightweight: Minimal impact on app size and performance.
ð Installation #
Add faaah to your pubspec.yaml:
dependencies:
faaah: ^0.0.1
Then, run:
flutter pub get
ð ïļ How to Use #
1. Enable Global Sound (The Popular Way) #
Call Faaah.enableGlobalErrorSound() in your main() before runApp. This will hook into the Flutter framework's error handler.
import 'package:flutter/material.dart';
import 'package:faaah/faaah.dart';
void main() {
// ð Hear the "FAAAAH" on every UI or framework error!
Faaah.enableGlobalErrorSound();
runApp(const MyApp());
}
2. Manual Trigger #
Use this inside your custom error handlers or as a fun interaction.
import 'package:faaah/faaah.dart';
void riskyOperation() {
try {
// Some code that might fail...
} catch (e) {
Faaah.play(); // ðą Triggers the meme sound
print("Handled error: $e");
}
}
ðŪ Watch it in Action #
Check out the Example App which features a Calculator that screams "FAAAAH" when you divide by zero!
ð Important Note on Assets #
Since this is a package, the assets are managed internally. You do not need to add the .mp3 file to your own pubspec.yaml. Just import the package and it works out of the box!
ð License #
This project is licensed under the MIT License - see the LICENSE file for details.
Created with ð by Muhammad Rehan Yousaf
Check the example/ folder for a demo app showing how to use the faaah package.****