Browse Source

scan qrcode

master
daivph 5 years ago
parent
commit
7ef3ead661
4 changed files with 15 additions and 6 deletions
  1. +1
    -1
      ios/Flutter/.last_build_id
  2. +3
    -0
      lib/main.dart
  3. +1
    -1
      lib/presentation/screens/plot_detail/sc_plot_information.dart
  4. +10
    -4
      lib/presentation/screens/tabbar/tabbar.dart

+ 1
- 1
ios/Flutter/.last_build_id View File

@@ -1 +1 @@
440505e9ea1eee7043d2cbfeb318f6bc
dab672e712362fdbbfa98386624f95d6

+ 3
- 0
lib/main.dart View File

@@ -86,6 +86,9 @@ _showAlertCheckCropCode(
cropId: value.tbCropDTO.id,
cropType: value.tbCropDTO.type,
initialIndex: 1,
code: value.tbCropDTO.code,
areaM2: value.tbCropDTO.areaM2,
suppliesName: value.tbCropDTO.suppliesName,
));
}).catchError((onError) {
Utils.showDialog(

+ 1
- 1
lib/presentation/screens/plot_detail/sc_plot_information.dart View File

@@ -18,7 +18,7 @@ import 'package:farm_tpf/utils/formatter.dart';
class PlotInformationScreen extends StatefulWidget {
final int cropId;
final bool isShowAppbar;
PlotInformationScreen({@required this.cropId, this.isShowAppbar});
PlotInformationScreen({@required this.cropId, this.isShowAppbar = false});
@override
_PlotInformationScreenState createState() => _PlotInformationScreenState();
}

+ 10
- 4
lib/presentation/screens/tabbar/tabbar.dart View File

@@ -8,6 +8,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';

import '../../../main.dart';

class TabbarScreen extends StatefulWidget {
static Route route() {
return MaterialPageRoute<void>(builder: (_) => TabbarScreen());
@@ -56,8 +58,6 @@ class _TabbarScreenState extends State<TabbarScreen> {
return ControlDeviceScreen();
break;
case TabBarIndex.qr:
// scan(context);
return PlotListScreen();
break;
case TabBarIndex.notification:
return NotificationScreen();
@@ -115,8 +115,14 @@ class _TabbarScreenState extends State<TabbarScreen> {
],
)),
onTap: () {
changeTabbar
.changeIndex(itemsTabbar[index].index);
//Open scan qr code when tap icon in tabbar
if (index == 2) {
changeTabbar.changeIndex(changeTabbar.index);
scan(context);
} else {
changeTabbar
.changeIndex(itemsTabbar[index].index);
}
},
);
}),

Loading…
Cancel
Save