Browse Source

fix Bug #7962

master
daivph 5 years ago
parent
commit
f978892ae6
4 changed files with 163 additions and 170 deletions
  1. +1
    -1
      ios/Flutter/.last_build_id
  2. +6
    -6
      ios/Runner.xcodeproj/project.pbxproj
  3. +155
    -162
      lib/presentation/screens/plot_detail/sc_plot_information.dart
  4. +1
    -1
      pubspec.yaml

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

@@ -1 +1 @@
440505e9ea1eee7043d2cbfeb318f6bc
48197743e3d78b3769f70bac9a76e7e0

+ 6
- 6
ios/Runner.xcodeproj/project.pbxproj View File

@@ -374,7 +374,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = C3DTD2JH94;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -391,7 +391,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 0.15.0;
MARKETING_VERSION = 0.16.0;
PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.tpfarm;
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -516,7 +516,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = C3DTD2JH94;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -533,7 +533,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 0.15.0;
MARKETING_VERSION = 0.16.0;
PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.tpfarm;
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -550,7 +550,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = C3DTD2JH94;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -567,7 +567,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 0.15.0;
MARKETING_VERSION = 0.16.0;
PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.tpfarm;
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

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

@@ -100,169 +100,162 @@ class _PlotInformationScreenState extends State<PlotInformationScreen>

@override
Widget build(BuildContext context) => KeyboardDismisser(
gestures: [
GestureType.onTap,
GestureType.onPanUpdateDownDirection,
],
child: Container(
color: AppColors.ITEM_BG,
child: SafeArea(
top: false,
bottom: true,
child: Scaffold(
appBar: widget.isShowAppbar
? AppBarWidget()
: PreferredSize(
preferredSize: Size(0, 0),
child: SizedBox(),
),
key: _scaffoldKey,
body: KeyboardDismisser(
child: StreamBuilder(
stream: getPlotInfoBloc.actions,
builder: (BuildContext context,
AsyncSnapshot<dynamic> snapshot) {
if (snapshot.hasData) {
return Form(
key: _formKey,
autovalidate: _autoValidate,
child: SingleChildScrollView(
padding: EdgeInsets.all(8.0),
child: Column(
children: <Widget>[
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Mã lô',
value:
'${cropPlot.tbCropDTO.code}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Trạng thái',
value: '$statusCrop'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Nhà màng',
value:
'${cropPlot.tbCropDTO.netHouseName ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Giống',
value:
'${cropPlot.tbCropDTO.suppliesName ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Ngày gieo trồng',
value:
'${cropPlot.sowingDate.format_DDMMYY_HHmm() ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Thời gian ngâm hạt',
value:
'${cropPlot.soakSeedsTime ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Ngày vô khây ươm',
value:
'${cropPlot.seedIncubationTime ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Số lượng cây trồng',
value:
'${cropPlot.numberPlants ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Số lượng cây hiện tại',
value:
'${cropPlot.numberCurrentPlants ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Ngày kết thúc canh tác',
value:
'${cropPlot.tbCropDTO.endDate.format_DDMMYY_HHmm() ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Kỹ sư trực tiếp',
value: '$technicians'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Diện tích (m\u00B2)',
value:
'${cropPlot.tbCropDTO.areaM2.formatNumtoStringDecimal()}'),
SizedBox(
height: 8,
),
_descriptionField(),
SizedBox(
height: 16,
),
GetBuilder<
DescriptionChangeControler>(
builder: (_) {
return SizedBox(
width: double.infinity,
height: 55,
child: FlatButton(
onPressed:
controller.isChanged ==
false
? () {}
: () {
FocusScopeNode
currentFocus =
FocusScope.of(
context);
if (!currentFocus
.hasPrimaryFocus) {
currentFocus
.unfocus();
}
_validateInputs();
},
color: controller.isChanged
? AppColors.DEFAULT
: Colors.grey[400],
shape:
RoundedRectangleBorder(
borderRadius:
new BorderRadius
.circular(7.0),
),
child: Text(
'Cập nhật'
.toUpperCase(),
style: TextStyle(
fontWeight:
FontWeight.bold,
color:
AppColors.WHITE,
fontSize: 18)),
),
);
},
)
],
gestures: [GestureType.onTap],
child: Container(
color: AppColors.ITEM_BG,
child: SafeArea(
top: false,
bottom: true,
child: Scaffold(
appBar: widget.isShowAppbar
? AppBarWidget()
: PreferredSize(
preferredSize: Size(0, 0),
child: SizedBox(),
),
key: _scaffoldKey,
body: KeyboardDismisser(
child: StreamBuilder(
stream: getPlotInfoBloc.actions,
builder: (BuildContext context,
AsyncSnapshot<dynamic> snapshot) {
if (snapshot.hasData) {
return Form(
key: _formKey,
autovalidate: _autoValidate,
child: SingleChildScrollView(
padding: EdgeInsets.all(8.0),
child: Column(
children: <Widget>[
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Mã lô',
value:
'${cropPlot.tbCropDTO.code}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Trạng thái',
value: '$statusCrop'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Nhà màng',
value:
'${cropPlot.tbCropDTO.netHouseName ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Giống',
value:
'${cropPlot.tbCropDTO.suppliesName ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Ngày gieo trồng',
value:
'${cropPlot.sowingDate.format_DDMMYY_HHmm() ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Thời gian ngâm hạt',
value:
'${cropPlot.soakSeedsTime ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Ngày vô khây ươm',
value:
'${cropPlot.seedIncubationTime ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Số lượng cây trồng',
value:
'${cropPlot.numberPlants ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Số lượng cây hiện tại',
value:
'${cropPlot.numberCurrentPlants ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Ngày kết thúc canh tác',
value:
'${cropPlot.tbCropDTO.endDate.format_DDMMYY_HHmm() ?? '--'}'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.1),
name: 'Kỹ sư trực tiếp',
value: '$technicians'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT
.withOpacity(0.3),
name: 'Diện tích (m\u00B2)',
value:
'${cropPlot.tbCropDTO.areaM2.formatNumtoStringDecimal()}'),
SizedBox(
height: 8,
),
));
} else if (snapshot.hasError) {
return Center(
child: Text(snapshot.error.toString()),
);
} else {
return LoadingListPage();
}
}))))));
_descriptionField(),
SizedBox(
height: 16,
),
GetBuilder<DescriptionChangeControler>(
builder: (_) {
return SizedBox(
width: double.infinity,
height: 55,
child: FlatButton(
onPressed:
controller.isChanged ==
false
? () {}
: () {
FocusScopeNode
currentFocus =
FocusScope.of(
context);
if (!currentFocus
.hasPrimaryFocus) {
currentFocus
.unfocus();
}
_validateInputs();
},
color: controller.isChanged
? AppColors.DEFAULT
: Colors.grey[400],
shape: RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(
7.0),
),
child: Text(
'Cập nhật'.toUpperCase(),
style: TextStyle(
fontWeight:
FontWeight.bold,
color: AppColors.WHITE,
fontSize: 18)),
),
);
},
)
],
),
));
} else if (snapshot.hasError) {
return Center(
child: Text(snapshot.error.toString()),
);
} else {
return LoadingListPage();
}
}))))));

@override
void dispose() {

+ 1
- 1
pubspec.yaml View File

@@ -2,7 +2,7 @@ name: farm_tpf
description: A new Flutter project.

publish_to: 'none'
version: 0.15.0+1
version: 0.16.0+1

environment:
sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save