import '../../routes.dart'; import 'package:flutter/material.dart'; import '../../i18n/ar.i18n.dart' as ar; import '../../i18n/en.i18n.dart' as en; class AppDrawer extends StatelessWidget { ar.Ar arLang = ar.Ar(); en.En enLang = en.En(); @override Widget build(BuildContext context) { print(arLang.button.save); print(enLang.button.save); return Drawer( child: Column( children: [ AppBar( title: Text('Hi form Elham!!'), ), ListTile( title: Text('Home'), leading: Icon(Icons.tab), onTap: () { drawerNavigator(context, HOME); }, ), Divider(), ListTile( title: Text('My Schedule'), leading: Icon(Icons.tab), onTap: () { drawerNavigator(context, MY_SCHEDULE); }, ), Divider(), ListTile( title: Text('Settings'), leading: Icon(Icons.settings), onTap: () { drawerNavigator(context, SETTINGS); }, ), Divider(), ListTile( title: Text('QR Reader'), leading: Icon(Icons.photo), onTap: () { drawerNavigator(context, QR_READER); }, ), Divider(), ListTile( title: Text('Log Out'), leading: Icon(Icons.exit_to_app), onTap: () { drawerNavigator(context, LOGIN); }, ) ], ), ); } drawerNavigator(context, routeName) { Navigator.of(context).pushNamed(routeName); } }