-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for D-pad navigation using a Android TV remote control (#…
…586)
- Loading branch information
1 parent
b95d0aa
commit ba04998
Showing
1 changed file
with
21 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(), | ||
)); | ||
} | ||
} |