Skip to content

Commit

Permalink
Added support for D-pad navigation using a Android TV remote control (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
danielz-nenda authored Jul 8, 2021
1 parent b95d0aa commit ba04998
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
import 'package:better_player_example/pages/welcome_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Better player demo',
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: [
const Locale('en', 'US'),
const Locale('pl', 'PL'),
],
theme: ThemeData(
primarySwatch: Colors.green,
accentColor: Colors.green,
),
home: WelcomePage(),
);
return Shortcuts(
shortcuts: <LogicalKeySet, Intent>{
LogicalKeySet(LogicalKeyboardKey.select): const ActivateIntent(),
},
child: MaterialApp(
title: 'Better player demo',
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: [
const Locale('en', 'US'),
const Locale('pl', 'PL'),
],
theme: ThemeData(
primarySwatch: Colors.green,
accentColor: Colors.green,
),
home: WelcomePage(),
));
}
}

0 comments on commit ba04998

Please sign in to comment.