|
|
|
|
|
|
|
|
import 'package:get/get.dart'; |
|
|
import 'package:get/get.dart'; |
|
|
import 'package:get/state_manager.dart'; |
|
|
import 'package:get/state_manager.dart'; |
|
|
|
|
|
|
|
|
|
|
|
import '../../../main.dart'; |
|
|
|
|
|
|
|
|
class HomeDrawer extends StatefulWidget { |
|
|
class HomeDrawer extends StatefulWidget { |
|
|
const HomeDrawer( |
|
|
const HomeDrawer( |
|
|
{Key key, |
|
|
{Key key, |
|
|
|
|
|
|
|
|
splashColor: Colors.grey.withOpacity(0.1), |
|
|
splashColor: Colors.grey.withOpacity(0.1), |
|
|
highlightColor: Colors.transparent, |
|
|
highlightColor: Colors.transparent, |
|
|
onTap: () { |
|
|
onTap: () { |
|
|
currentDrawerIndex = listData.index; |
|
|
|
|
|
navigationtoScreen(listData.index); |
|
|
|
|
|
|
|
|
if (listData.index == DrawerIndex.ScanBarcode) { |
|
|
|
|
|
scan(context); |
|
|
|
|
|
navigationtoScreen(currentDrawerIndex); |
|
|
|
|
|
} else { |
|
|
|
|
|
currentDrawerIndex = listData.index; |
|
|
|
|
|
navigationtoScreen(currentDrawerIndex); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
child: Stack( |
|
|
child: Stack( |
|
|
children: <Widget>[ |
|
|
children: <Widget>[ |