Browse Source

fix Bug #7965

master
daivph 5 years ago
parent
commit
8b92d78833
4 changed files with 16 additions and 13 deletions
  1. +1
    -1
      ios/Flutter/.last_build_id
  2. +8
    -4
      lib/presentation/screens/actions/util_action.dart
  3. +6
    -7
      lib/presentation/screens/plot/sc_plot.dart
  4. +1
    -1
      lib/presentation/screens/tabbar/tabbar.dart

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

7c3be5aca7ff709c59cdc638def905a4
471e09183e20ec9c20cca9b580fecc10

+ 8
- 4
lib/presentation/screens/actions/util_action.dart View File

} }


static Future<File> compressAndGetFile(File file, String targetPath) async { static Future<File> compressAndGetFile(File file, String targetPath) async {
final result = await FlutterImageCompress.compressAndGetFile(
file.absolute.path, targetPath,
quality: 50, minWidth: 1280, minHeight: 720);
return result;
try {
final result = await FlutterImageCompress.compressAndGetFile(
file.absolute.path, targetPath,
quality: 50, minWidth: 1280, minHeight: 720);
return result;
} on UnsupportedError catch (e) {
return Future.value(file);
}
} }
} }

+ 6
- 7
lib/presentation/screens/plot/sc_plot.dart View File

import 'package:farm_tpf/data/repository/user_repository.dart'; import 'package:farm_tpf/data/repository/user_repository.dart';
import 'package:farm_tpf/main.dart'; import 'package:farm_tpf/main.dart';
import 'package:farm_tpf/models/index.dart'; import 'package:farm_tpf/models/index.dart';
import 'package:farm_tpf/presentation/custom_widgets/app_bar_widget.dart';
import 'package:farm_tpf/presentation/custom_widgets/bottom_loader.dart'; import 'package:farm_tpf/presentation/custom_widgets/bottom_loader.dart';
import 'package:farm_tpf/presentation/custom_widgets/loading_list_page.dart'; import 'package:farm_tpf/presentation/custom_widgets/loading_list_page.dart';
import 'package:farm_tpf/presentation/screens/plot/widget_search.dart'; import 'package:farm_tpf/presentation/screens/plot/widget_search.dart';
import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_detail.dart'; import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_detail.dart';
import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_information.dart';
import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_parameter.dart';
import 'package:farm_tpf/utils/const_assets.dart'; import 'package:farm_tpf/utils/const_assets.dart';
import 'package:farm_tpf/utils/const_color.dart'; import 'package:farm_tpf/utils/const_color.dart';
import 'package:farm_tpf/utils/const_common.dart'; import 'package:farm_tpf/utils/const_common.dart';
noti = NotificationDTO.fromJson(message); noti = NotificationDTO.fromJson(message);
} }
if (noti.contents == "ENV_UPDATE") { if (noti.contents == "ENV_UPDATE") {
Get.to(PlotParameterScreen(
Get.to(PlotDetailScreen(
cropType: noti.type,
cropId: noti.tbCropId, cropId: noti.tbCropId,
isShowAppbar: true,
initialIndex: 0,
)); ));
} else if (noti.contents == "PIC_UPDATE") { } else if (noti.contents == "PIC_UPDATE") {
Get.to(PlotInformationScreen(
Get.to(PlotDetailScreen(
cropType: noti.type,
cropId: noti.tbCropId, cropId: noti.tbCropId,
isShowAppbar: true,
initialIndex: 1,
)); ));
} else { } else {
//Go home //Go home

+ 1
- 1
lib/presentation/screens/tabbar/tabbar.dart View File

itemsTabbar[index].index) itemsTabbar[index].index)
? AppColors.DEFAULT ? AppColors.DEFAULT
: Colors.grey, : Colors.grey,
fontSize: 10),
fontSize: 9),
), ),
) )
], ],

Loading…
Cancel
Save