WT 1.1.17+2 error fix utf8 in names, thick pointer

This commit is contained in:
bossanyit 2021-05-15 19:45:08 +02:00
parent 07868c6b8e
commit 7b0d15aede
5 changed files with 40 additions and 27 deletions

View File

@ -388,7 +388,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = SFJJBDCU6Z; DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -531,7 +531,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = SFJJBDCU6Z; DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -566,7 +566,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = SFJJBDCU6Z; DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (

View File

@ -42,27 +42,32 @@ class APIClient with Common, Logging {
Future<String> post(String endPoint, String body) async { Future<String> post(String endPoint, String body) async {
final url = Cache().getBaseUrl() + endPoint; final url = Cache().getBaseUrl() + endPoint;
trace(" ------------ http/post body $body - url: $url "); trace(" ------------ http/post body $body - url: $url ");
String authToken = Cache().getAuthToken(); try {
if (authToken.length == 0) { String authToken = Cache().getAuthToken();
var responseJson = await this.authenticateUser(Cache.username, Cache.password); if (authToken.length == 0) {
authToken = responseJson['token']; var responseJson = await this.authenticateUser(Cache.username, Cache.password);
Cache().authToken = authToken; authToken = responseJson['token'];
} Cache().authToken = authToken;
var uri = Uri.parse(url); }
HttpClient client = new HttpClient(); var uri = Uri.parse(url);
client.badCertificateCallback = ((X509Certificate cert, String host, int port) => true); HttpClient client = new HttpClient();
final HttpClientRequest request = await client.postUrl(uri); client.badCertificateCallback = ((X509Certificate cert, String host, int port) => true);
request.headers.set('Content-Type', 'application/json'); final HttpClientRequest request = await client.postUrl(uri);
request.headers.set('Authorization', 'Bearer $authToken'); request.headers.contentType = new ContentType("application", "json", charset: "utf-8");
request.contentLength = body.length; request.headers.set('Authorization', 'Bearer $authToken');
request.write(body); //request.contentLength = body.length;
HttpClientResponse result = await request.close(); request.write(body);
trace(" ------------post response code: " + result.statusCode.toString()); HttpClientResponse result = await request.close();
if (result.statusCode == 200) { trace(" ------------post response code: " + result.statusCode.toString());
return await result.transform(utf8.decoder).join(); if (result.statusCode == 200) {
} else if (result.statusCode == 404) { return await result.transform(utf8.decoder).join();
throw NotFoundException(message: "Not Found"); } else if (result.statusCode == 404) {
} else { throw NotFoundException(message: "Not Found");
} else {
throw Exception("Network Error, please try again later");
}
} on Exception catch (e) {
print("Post Exception: $e");
throw Exception("Network Error, please try again later"); throw Exception("Network Error, please try again later");
} }
} }

View File

@ -241,6 +241,8 @@ class CustomerModifyPage extends StatelessWidget with Trans {
), ),
LinearShapePointer( LinearShapePointer(
value: customerBloc.year!.toDouble(), value: customerBloc.year!.toDouble(),
height: 35,
width: 15,
onValueChanged: (value) => { onValueChanged: (value) => {
customerBloc.add(CustomerBirthYearChange(year: value.toInt())), customerBloc.add(CustomerBirthYearChange(year: value.toInt())),
}, },
@ -295,9 +297,13 @@ class CustomerModifyPage extends StatelessWidget with Trans {
)), )),
)), )),
NeedlePointer( NeedlePointer(
needleColor: Colors.blue[200],
knobStyle: KnobStyle(color: Colors.blue[800]),
value: customerBloc.weight.toDouble(), value: customerBloc.weight.toDouble(),
enableAnimation: true, enableAnimation: true,
enableDragging: true, enableDragging: true,
needleStartWidth: 6,
needleEndWidth: 12,
onValueChanged: (value) => {customerBloc.add(CustomerWeightChange(weight: value))}, onValueChanged: (value) => {customerBloc.add(CustomerWeightChange(weight: value))},
) )
], ],
@ -359,6 +365,8 @@ class CustomerModifyPage extends StatelessWidget with Trans {
), ),
), ),
LinearShapePointer( LinearShapePointer(
height: 15,
width: 35,
value: customerBloc.height, value: customerBloc.height,
onValueChanged: (value) => { onValueChanged: (value) => {
customerBloc.add(CustomerHeightChange(height: value.toInt())), customerBloc.add(CustomerHeightChange(height: value.toInt())),

View File

@ -110,10 +110,10 @@ class ImageButton extends StatelessWidget {
)), )),
isMarked == null || Cache().hasPurchased isMarked == null || Cache().hasPurchased
? Offstage() ? Offstage()
: Stack(alignment: Alignment.topCenter, children: [ : Stack(alignment: Alignment.center, children: [
Positioned( Positioned(
top: 10, top: 10,
left: (width / 2 - 30) / 2 - 75, left: (width / 2 - 30) / 2 - 25,
child: !isLocked! child: !isLocked!
? Offstage() ? Offstage()
: GestureDetector( : GestureDetector(

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.1.17+79 version: 1.1.17+80
environment: environment:
sdk: ">=2.12.0 <3.0.0" sdk: ">=2.12.0 <3.0.0"