A "Talking Tom" style Flutter application featuring a central Angry Bird character (Red) that listens to the user and responds with the iconic Angry Bird scream. The character visually responds when listening and animates its beak when speaking.
Before running the application, you need to place the image and audio assets in the correct directories that were generated for you.
Place the following image files into the assets/images directory in the root of the project:
red_default.png: The default state character with a closed beak.red_listening.png: Upward/Curious look to indicate listening.red_speaking_closed.png: Identical to default, used for mouth movement.red_speaking_open.png: Identical to default, wide-open beak.app_background.png: The main background image.
Place the following audio file into the assets/audio directory:
red_scream.mp3: A high-quality MP3 recording of the iconic Angry Bird "aaaaahehaaaan" scream sound.
Because this app uses the microphone to detect "listening", you must configure Android and iOS permission wrappers depending on which device you are testing with.
Open android/app/src/main/AndroidManifest.xml and ensure the following permission is within the <manifest> tag, above the <application> tag:
<uses-permission android:name="android.permission.RECORD_AUDIO" />Open ios/Runner/Info.plist and add the following key-string pair inside the main <dict> block:
<key>NSMicrophoneUsageDescription</key>
<string>This app requires microphone access to listen to you before speaking.</string>(Note: Depending on the record package version you may also want to ensure your Podfile configuration targets a minimum iOS version of 11.0).
If you haven't already, please connect your Android or iOS device to your PC or start a simulator/emulator.
- Get Packages
In the root of the project
d:\talking_angry_bird, run:flutter pub get
- Run the App
With your target device connected, execute:
flutter run
- App Instructions
Once the app launches on your phone/emulator:
- Tap and hold the Mic icon at the bottom of the screen.
- Grant the microphone permission if it prompts.
- Watch as Red changes to his
red_listening.pngstate. - Release the Mic icon. Red will play
red_scream.mp3while rapidly alternating betweenred_speaking_closed.pngandred_speaking_open.png.
To change the app's display names and icon as requested:
Android:
Open android/app/src/main/AndroidManifest.xml and change the android:label attribute under the <application> tag:
<application
android:label="Your New App Name"iOS:
Open ios/Runner/Info.plist and change the value under CFBundleDisplayName and CFBundleName:
<key>CFBundleDisplayName</key>
<string>Your New App Name</string>There are two places to update the internal text:
- Main Screen Title: Open
lib/screens/main_screen.dartand locateText('Talk-A-Meme Bird')around line 28. Change the text string passed there. - App Background Process Title: Open
lib/main.dartand locate thetitle: 'Talk-A-Meme Bird'parameter within theMaterialAppwidget.
The easiest ad safest way to generate icons for both iOS and Android simultaneously is using the flutter_launcher_icons community package.
- Add your new icon image (e.g.
icon.png) to yourassets/images/folder. - Run this command in your terminal:
flutter pub add dev:flutter_launcher_icons
- Open
pubspec.yamland add the following at the very bottom of the file:flutter_launcher_icons: android: "launcher_icon" ios: true image_path: "assets/images/icon.png"
- Finally, run the generator tool in your terminal:
flutter pub run flutter_launcher_icons
This will automatically crop and scale your image into all the necessary App Icon sizes for both Android and iOS!