# android_dpad_detector **Repository Path**: Autokaka/android_dpad_detector ## Basic Information - **Project Name**: android_dpad_detector - **Description**: No description available - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-04 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # android_dpad_detector A widget to respond to Android DPad key event. Note that this widget is only for Android TV apps. ## How to use it? Simple enough. Just wrap a whatever widget you want with AndroidDPadDetector. For example, I want to make a TextButton respond to DPad KEY_CENTER event, I could write like this: ```dart AndroidDPadDetector( onKeyCenter: () { Navigator.of(context).push( MaterialPageRoute( builder: (context) => SecondPage(), ), ); }, child: TextButton( onPressed: () {}, child: Text("Launch SecondPage"), ), ) ``` ## What is it for? It uses RegExp way to simply bypass RawKeyEvent codes in flutter service.dart, in order to make dpad key event available on Android TV apps.