diff --git a/example/lib/main.dart b/example/lib/main.dart index c3e85958c..985506b44 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,5 +1,6 @@ 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()); @@ -7,21 +8,25 @@ 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(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(), + )); } }