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

@@ -1 +1 @@
7c3be5aca7ff709c59cdc638def905a4
471e09183e20ec9c20cca9b580fecc10

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

@@ -83,9 +83,13 @@ class UtilAction {
}

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

@@ -6,13 +6,10 @@ import 'package:farm_tpf/data/repository/repository.dart';
import 'package:farm_tpf/data/repository/user_repository.dart';
import 'package:farm_tpf/main.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/loading_list_page.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_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_color.dart';
import 'package:farm_tpf/utils/const_common.dart';
@@ -112,14 +109,16 @@ class _PlotListScreenState extends State<PlotListScreen> {
noti = NotificationDTO.fromJson(message);
}
if (noti.contents == "ENV_UPDATE") {
Get.to(PlotParameterScreen(
Get.to(PlotDetailScreen(
cropType: noti.type,
cropId: noti.tbCropId,
isShowAppbar: true,
initialIndex: 0,
));
} else if (noti.contents == "PIC_UPDATE") {
Get.to(PlotInformationScreen(
Get.to(PlotDetailScreen(
cropType: noti.type,
cropId: noti.tbCropId,
isShowAppbar: true,
initialIndex: 1,
));
} else {
//Go home

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

@@ -155,7 +155,7 @@ class _TabbarScreenState extends State<TabbarScreen> {
itemsTabbar[index].index)
? AppColors.DEFAULT
: Colors.grey,
fontSize: 10),
fontSize: 9),
),
)
],

Loading…
Cancel
Save