Updating application Colors
Open scanner project folder navigate to "lib/shared/constants.dart" , in this file you will find few shared constants
Adjust these shared constants based on your needs
static String appTitle = 'Free QR Code Scanner - Barcode Scanner 2020';static double headerHeight = 228.5; // default header heightstatic double mainPadding = 20.0; // Default main Paddingstatic double secondaryPadding = 10.0; // Default secondary paddingstatic Color primaryColor = Color(0xFFFF7D54); // The orange Color that dominates most the appplicationstatic Color textColor = Color(0xFF1E1E1E); // Text black faded color used on most textsstatic Color greyColor = Color(0xFFA0A0A0); // Grey color used ass accent color in the application
Bottom navigation bar
Navigate to the files highlighted by red color
To change menu style go to bottom_navigation.dart in which BottomNavigation in there you will be able to change to your desired menus in this application it used a custom menu bar found in "widgets/nav_bar.dart". Simply update the implementation in bottomNavigation bar from line 53 and add your desired navigation bar.
Tab navigation, to update how pages are navigated check in tab_navigation.dart, in this page you will be able to update which pages are navigated based on navigator index. In this page you will find a Map of Tabindex and widgetBuilder
Map<TabIndex, WidgetBuilder> _routeBuilders(BuildContext context) {return {TabIndex.scan: (context) => ScannerPage(settings),TabIndex.setting: (context) => SettingsPage(callback),TabIndex.history: (context) => HistoryPage(settings),};}
which is assigned to
var routeBuilders = _routeBuilders(context);
identifying which page to serve when menu item is clicked, the application used TabIndex found in bottom_navigation.dart
enum TabIndex { scan, history, setting }class TabIndexHelper {static TabIndex item({int index}) {switch (index) {case 0:return TabIndex.scan;case 1:return TabIndex.history;// case 2:// return TabIndex.create;case 2:return TabIndex.setting;}return TabIndex.scan;}static index(TabIndex tabIndex) {switch (tabIndex) {case TabIndex.scan:return 0;case TabIndex.history:return 1;// case TabIndex.create:// return 2;case TabIndex.setting:return 2;}}}