diff --git a/lib/ui/historyScreen.dart b/lib/ui/historyScreen.dart
index 3f305d3fbf2d9f2d19c86b916acad9cbcb26af0b..69506f40e5005fff71f2f50dced873f174a870a1 100644
--- a/lib/ui/historyScreen.dart
+++ b/lib/ui/historyScreen.dart
@@ -20,15 +20,8 @@ class HistoryScreen extends StatefulWidget {
 }
 
 class HistoryScreenState extends State<HistoryScreen> {
-  int currentIndex = 0;
   Widget currentScreen;
 
-  void onTabTapped(int index) {
-    setState(() {
-      currentIndex = index;
-    });
-  }
-
   Uint8List bytes = Uint8List(0);
   final TextEditingController _outputPubkey = new TextEditingController();
   final nRepositories = 20;
@@ -235,12 +228,14 @@ class HistoryScreenState extends State<HistoryScreen> {
           stackTrace: stack,
         );
       }
+      return 'false';
     }
     // this._outputPubkey.text = "";
     if (barcode != null) {
       this._outputPubkey.text = barcode;
       isPubkey(barcode);
-      onTabTapped(0);
+    } else {
+      return 'false';
     }
     return barcode;
   }
diff --git a/lib/ui/home.dart b/lib/ui/home.dart
index cd8e81674e6650b4131641beb649227fc3d4dd33..65897771cf4ace3b20f9ce5bc13777235a205f1b 100644
--- a/lib/ui/home.dart
+++ b/lib/ui/home.dart
@@ -12,18 +12,18 @@ class HomeScreen extends StatefulWidget {
   final List<Widget> screens;
 
   @override
-  _HomeScreenState createState() => _HomeScreenState();
+  HomeScreenState createState() => HomeScreenState();
 }
 
-class _HomeScreenState extends State<HomeScreen> {
+class HomeScreenState extends State<HomeScreen> {
   GlobalKey<HistoryScreenState> _keyHistory = GlobalKey();
 
-  int _currentIndex = 0;
+  int currentIndex = 0;
   Widget currentScreen;
 
   void onTabTapped(int index) {
     setState(() {
-      _currentIndex = index;
+      currentIndex = index;
     });
   }
 
@@ -36,7 +36,7 @@ class _HomeScreenState extends State<HomeScreen> {
       backgroundColor: Colors.grey[300],
       body: SafeArea(
         child: IndexedStack(
-          index: _currentIndex,
+          index: currentIndex,
           children: <Widget>[
             HistoryScreen(
               keyHistory: _keyHistory,
@@ -51,7 +51,13 @@ class _HomeScreenState extends State<HomeScreen> {
         width: 80.0,
         child: FittedBox(
           child: FloatingActionButton(
-            onPressed: () => _keyHistory.currentState.scan(),
+            onPressed: () async {
+              final resultScan = await _keyHistory.currentState.scan();
+              print(resultScan);
+              if (resultScan != 'false') {
+                onTabTapped(0);
+              }
+            },
             child: Container(
                 height: 40.0,
                 width: 40.0,
@@ -64,7 +70,7 @@ class _HomeScreenState extends State<HomeScreen> {
         fixedColor: Colors.black,
         type: BottomNavigationBarType.fixed,
         onTap: onTabTapped,
-        currentIndex: _currentIndex,
+        currentIndex: currentIndex,
         items: [
           BottomNavigationBarItem(
             icon: new Icon(Icons.format_list_bulleted),
diff --git a/pubspec.yaml b/pubspec.yaml
index 31126b9e4e2382491bf7722930e2d2025dd16006..29917e695e01d43af18ed2fea3ec9e8d72b5270c 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -5,7 +5,7 @@ description: A new Flutter project.
 # pub.dev using `pub publish`. This is preferred for private packages.
 publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 
-version: 0.0.0+5
+version: 0.0.0+7
 
 environment:
   sdk: ">=2.7.0 <3.0.0"