Skip to content

Commit

Permalink
Upgrade for Flutter 3 and Dart 2.17
Browse files Browse the repository at this point in the history
  • Loading branch information
Electric Bolt committed May 12, 2022
1 parent cabecac commit 2a14eaa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Binary file modified bin/bin2c
Binary file not shown.
Binary file modified bin/image2c
Binary file not shown.
7 changes: 3 additions & 4 deletions bin2c/bin2c/main.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// binutils. Copyright © 2016 Electric Bolt Limited. See LICENSE file
// binutils. Copyright © 2016-2022 Electric Bolt Limited. See LICENSE file

@import Foundation;

static void haltSyntax() {
fprintf(stderr, "bin2c Version 1.1.0; Copyright © 2016-2022 Electric Bolt Limited\n");
fprintf(stderr, "bin2c Version 1.1.2; Copyright © 2016-2022 Electric Bolt Limited\n");
fprintf(stderr, "Syntax: bin2c [-h|-dart] input-file-1 [input-file-2] ... [input-file-n]\n");
fprintf(stderr, " -h = output .h file\n");
fprintf(stderr, " -dart = output .dart file\n");
Expand Down Expand Up @@ -35,8 +35,7 @@ int main(int argc, const char * argv[]) {
if (outputDartFile) {
printf("// ignore_for_file: non_constant_identifier_names\n\n");
printf("import 'dart:typed_data';\n");
printf("\n");
printf("import 'package:flutter/widgets.dart';\n\n");
printf("\n\n");
}
for (int i = inputFileIndex; i < argc; i++) {
NSString* inputFile = [NSString stringWithCString: argv[i] encoding: NSUTF8StringEncoding];
Expand Down
6 changes: 3 additions & 3 deletions image2c/image2c/main.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// binutils. Copyright © 2016 Electric Bolt Limited. See LICENSE file
// binutils. Copyright © 2016-2022 Electric Bolt Limited. See LICENSE file

@import Foundation;

static void haltSyntax() {
fprintf(stderr, "image2c Version 1.1.0; Copyright © 2016-2022 Electric Bolt Limited\n");
fprintf(stderr, "image2c Version 1.1.2; Copyright © 2016-2022 Electric Bolt Limited\n");
fprintf(stderr, "Syntax: image2c [-h|-dart] category-name header-file input-file-1 [input-file-2] ... [input-file-n]\n");
fprintf(stderr, " -h = output .h file\n");
fprintf(stderr, " -dart = output .dart file\n");
Expand Down Expand Up @@ -120,7 +120,7 @@ int main(int argc, const char * argv[]) {
NSMutableString* sb = [NSMutableString new];
[sb appendFormat: @"\tstatic Image %@({double? width, double? height}) {\n", f];
if ([scales count] > 1)
[sb appendString: @"\t\tvar data = MediaQueryData.fromWindow(WidgetsBinding.instance!.window);\n\t\t"];
[sb appendString: @"\t\tvar data = MediaQueryData.fromWindow(WidgetsBinding.instance.window);\n\t\t"];
for (int i = 0; i < [scales count]; i++) {
NSString* s = [f uppercaseString];
int scale = [[scales objectAtIndex: i] intValue];
Expand Down

0 comments on commit 2a14eaa

Please sign in to comment.