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

440505e9ea1eee7043d2cbfeb318f6bc
dab672e712362fdbbfa98386624f95d6

+ 3
- 0
lib/main.dart View File

cropId: value.tbCropDTO.id, cropId: value.tbCropDTO.id,
cropType: value.tbCropDTO.type, cropType: value.tbCropDTO.type,
initialIndex: 1, initialIndex: 1,
code: value.tbCropDTO.code,
areaM2: value.tbCropDTO.areaM2,
suppliesName: value.tbCropDTO.suppliesName,
)); ));
}).catchError((onError) { }).catchError((onError) {
Utils.showDialog( Utils.showDialog(

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

class PlotInformationScreen extends StatefulWidget { class PlotInformationScreen extends StatefulWidget {
final int cropId; final int cropId;
final bool isShowAppbar; final bool isShowAppbar;
PlotInformationScreen({@required this.cropId, this.isShowAppbar});
PlotInformationScreen({@required this.cropId, this.isShowAppbar = false});
@override @override
_PlotInformationScreenState createState() => _PlotInformationScreenState(); _PlotInformationScreenState createState() => _PlotInformationScreenState();
} }

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

import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';


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

class TabbarScreen extends StatefulWidget { class TabbarScreen extends StatefulWidget {
static Route route() { static Route route() {
return MaterialPageRoute<void>(builder: (_) => TabbarScreen()); return MaterialPageRoute<void>(builder: (_) => TabbarScreen());
return ControlDeviceScreen(); return ControlDeviceScreen();
break; break;
case TabBarIndex.qr: case TabBarIndex.qr:
// scan(context);
return PlotListScreen();
break; break;
case TabBarIndex.notification: case TabBarIndex.notification:
return NotificationScreen(); return NotificationScreen();
], ],
)), )),
onTap: () { 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