Browse Source

show action with croptype

master
daivph 5 years ago
parent
commit
5dbb40e32c
6 changed files with 41 additions and 34 deletions
  1. +20
    -20
      ios/Flutter/AppFrameworkInfo.plist
  2. +6
    -6
      ios/Runner.xcodeproj/project.pbxproj
  3. +3
    -3
      ios/Runner/Info.plist
  4. +1
    -0
      lib/presentation/screens/plot/sc_plot.dart
  5. +7
    -4
      lib/presentation/screens/plot_detail/sc_plot_action.dart
  6. +4
    -1
      lib/presentation/screens/plot_detail/sc_plot_detail.dart

+ 20
- 20
ios/Flutter/AppFrameworkInfo.plist View File

@@ -2,25 +2,25 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
</dict>
</plist>

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

@@ -358,7 +358,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -393,7 +393,7 @@
);
MARKETING_VERSION = 0.1.0;
PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.tpfarm;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
@@ -448,7 +448,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -498,7 +498,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -535,7 +535,7 @@
);
MARKETING_VERSION = 0.1.0;
PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.tpfarm;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
@@ -569,7 +569,7 @@
);
MARKETING_VERSION = 0.1.0;
PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.tpfarm;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";

+ 3
- 3
ios/Runner/Info.plist View File

@@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
@@ -13,7 +11,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>farm_tpf</string>
<string>Tiên Phong Farm</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
@@ -22,6 +20,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>

+ 1
- 0
lib/presentation/screens/plot/sc_plot.dart View File

@@ -269,6 +269,7 @@ class ItemInfinityWidget extends StatelessWidget {
builder: (BuildContext context) => PlotDetailScreen(
cropId: item.id,
initialIndex: 0,
cropType: item.type,
)));
});
}

+ 7
- 4
lib/presentation/screens/plot_detail/sc_plot_action.dart View File

@@ -28,7 +28,8 @@ import 'package:get/get.dart';
class PlotActionScreen extends StatefulWidget {
int cropId;
String cropCode;
PlotActionScreen({this.cropId, this.cropCode});
int cropType;
PlotActionScreen({this.cropId, this.cropCode, this.cropType});
@override
_PlotActionScreenState createState() => _PlotActionScreenState();
}
@@ -47,14 +48,14 @@ class _PlotActionScreenState extends State<PlotActionScreen> {
}

_initActionButtons() {
//TODO: Check is nursery
if (1 == 1) {
//type: 0- Trồng, 1- ướm
if (widget.cropType == 1) {
actions.add(ActionType(
plot_action_nursery,
EditActionNurseryScreen(
cropId: widget.cropId,
)));
} else {
} else if (widget.cropType == 0) {
actions.add(ActionType(
plot_action_plant,
EditActionPlantScreen(
@@ -156,6 +157,8 @@ class _PlotActionScreenState extends State<PlotActionScreen> {

bool _showTitle(BuildContext context) {
var kExpandedHeight = MediaQuery.of(context).size.width * 0.625 + 24;
// print("height: $kExpandedHeight");
// print('offset ${_scrollController.offset}');
return _scrollController.hasClients &&
_scrollController.offset > kExpandedHeight - kToolbarHeight;
}

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

@@ -10,8 +10,10 @@ import 'package:get/get.dart';
class PlotDetailScreen extends StatefulWidget {
int cropId;
String cropCode;
int cropType;
int initialIndex;
PlotDetailScreen({this.cropId, this.initialIndex = 0, this.cropCode});
PlotDetailScreen(
{this.cropId, this.initialIndex = 0, this.cropCode, this.cropType});
@override
_PlotDetailScreenState createState() => _PlotDetailScreenState();
}
@@ -51,6 +53,7 @@ class _PlotDetailScreenState extends State<PlotDetailScreen> {
PlotActionScreen(
cropId: widget.cropId,
cropCode: widget.cropCode,
cropType: widget.cropType,
)
],
),

Loading…
Cancel
Save