diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index f951ce3e20b220af5839f42c8c7758d9af3d5ad3..7bf1ee64c31af8afcb8c8d1491be8e94a4e9fb83 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -11,8 +11,8 @@ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <application android:name="io.flutter.app.FlutterApplication" - android:label="gecko" - android:icon="@mipmap/ic_launcher"> + android:label="gecko"> + <!-- android:icon="@mipmap/launcher_icon"> --> <activity android:name=".MainActivity" android:launchMode="singleTop" diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a18621b26e2050d3c0abd43327e4c0b5c68e64fe Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6755bb41b0eb8c54a9774144c4b5522c3432f00e Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..bd05bf8690925426590d7d5706cfa6e7d5a569b1 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..4945891e6f3b8ea6e8fee27c9a850750db524af1 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cbd60d0cc89d9a7742230247d37c976ca668c389 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ diff --git a/assets/icon/diggeck1.png b/assets/icon/diggeck1.png new file mode 100644 index 0000000000000000000000000000000000000000..8adb24d440f912dab237583c0dbc597f6f17d09e Binary files /dev/null and b/assets/icon/diggeck1.png differ diff --git a/assets/icon/diggeck136.png b/assets/icon/diggeck136.png new file mode 100644 index 0000000000000000000000000000000000000000..127f4b82187c16fcad6a5ad7dfb253079e7802fc Binary files /dev/null and b/assets/icon/diggeck136.png differ diff --git a/assets/icon/diggeck196.png b/assets/icon/diggeck196.png new file mode 100644 index 0000000000000000000000000000000000000000..80342cfa74f2744a0696a4f16c88436900f42490 Binary files /dev/null and b/assets/icon/diggeck196.png differ diff --git a/assets/icon/gecko-bb-36.png b/assets/icon/gecko-bb-36.png new file mode 100644 index 0000000000000000000000000000000000000000..18ac82e2762ec456d4a1ac46e5bd7d65cad8f6c9 Binary files /dev/null and b/assets/icon/gecko-bb-36.png differ diff --git a/assets/icon/gecko-bb-96.png b/assets/icon/gecko-bb-96.png new file mode 100644 index 0000000000000000000000000000000000000000..b4ed61cca78c69c9f26b342e008b0c8f520360af Binary files /dev/null and b/assets/icon/gecko-bb-96.png differ diff --git a/assets/icon/gecko-bb-big.png b/assets/icon/gecko-bb-big.png new file mode 100644 index 0000000000000000000000000000000000000000..4aab61641887641e17ef3169781ce66f620b3d3c Binary files /dev/null and b/assets/icon/gecko-bb-big.png differ diff --git a/assets/icon/geckoicon36.png b/assets/icon/geckoicon36.png new file mode 100644 index 0000000000000000000000000000000000000000..5142d619f343cd2bf6c10bee2b2ef0e0205dada6 Binary files /dev/null and b/assets/icon/geckoicon36.png differ diff --git a/assets/icon/geckoicon96.png b/assets/icon/geckoicon96.png new file mode 100644 index 0000000000000000000000000000000000000000..9663e93fb3d9a3a5ab0c28d7992caeeeecc14749 Binary files /dev/null and b/assets/icon/geckoicon96.png differ diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index f5b3c153753d829723f8d7dfac60f1ec172ca24e..42976420fe2a1f131484a7f8a45cc30ba1058c3c 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -492,4 +492,4 @@ /* End XCConfigurationList section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; -} +} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index dc9ada4725e9b0ddb1deab583e5b5102493aa332..90ecf02a9edb77d3e567fe6a7105291b285b5082 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 28c6bf03016f6c994b70f38d1b7346e5831b531f..30b909c2f6f9eb1306d02183f3dbb5cb77a6e8a5 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 2ccbfd967d9697cd4b83225558af2911e9571c9b..87b7b2545308b13acc6c8454141f85654faad406 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index f091b6b0bca859a3f474b03065bef75ba58a9e4c..d92351139e835a7c30738075945e7d3caab04e81 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 4cde12118dda48d71e01fcb589a74d069c5d7cb5..7ac6db45a49fd8086b91f7ee41b939c65b303af8 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index d0ef06e7edb86cdfe0d15b4b0d98334a86163658..488718637ad0d96b2da62c4a19baf581be77634c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index dcdc2306c28505ebc0b6c3a359c4d252bf626b9f..0b116b00ee5485e5274316e71453c852426617d5 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 2ccbfd967d9697cd4b83225558af2911e9571c9b..87b7b2545308b13acc6c8454141f85654faad406 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index c8f9ed8f5cee1c98386d13b17e89f719e83555b2..d8f62058758d4919f240e4742bdf26f2698716b7 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index a6d6b8609df07bf62e5100a53a01510388bd2b22..a34e8df14b90d39de29fe792b7b2d456d88a3668 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index a6d6b8609df07bf62e5100a53a01510388bd2b22..a34e8df14b90d39de29fe792b7b2d456d88a3668 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 75b2d164a5a98e212cca15ea7bf2ab5de5108680..506fe20238bf57b1347a672bc1ec929459e6d859 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index c4df70d39da7941ef3f6dcb7f06a192d8dcb308d..20cd0675e6de6ff5e7d9478be54d82c7a6510593 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 6a84f41e14e27f4b11f16f9ee39279ac98f8d5ac..d37c49bb8e7fb544e5d538fdbca659b86a51fb6f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index d0e1f58536026aebc4f1f70e481f6993c9ff088d..288e205907d2c3f737b277c51367fc3a13cb98d8 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/lib/api.dart b/lib/api.dart index aaa0a8900c9ec061c0cbd4d2d1432198477a9416..9ba7a89aa43654875d1384567ed94ed8b426bc68 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -8,21 +8,45 @@ import "package:gql_link/gql_link.dart"; // Configure node const graphqlEndpoint = "https://g1.librelois.fr/gva"; +// // Check node connection +// Future getHttp() async { +// try { +// final client = await dio.Dio().get(graphqlEndpoint); +// print(client); +// return 0; +// } catch (e) { +// print(e); +// return e; +// } +// } + // Build queries Future buildQ(query) async { - final client = dio.Dio(); - final Link link = DioLink( + var client; + try { + client = dio.Dio(); + print(client); + } catch (e) { + print(e); + } + // final client = dio.Dio(); + Link link; + link = DioLink( graphqlEndpoint, client: client, ); - final res = await link - .request(Request( - operation: Operation(document: gqlLang.parseString(query)), - )) - .first; - - return res; + try { + final res = await link + .request(Request( + operation: Operation(document: gqlLang.parseString(query)), + )) + .first; + return res; + } catch (e) { + print("Erreur: Noeud injoingnable."); + return 2; + } } /* Requests functions */ @@ -58,12 +82,20 @@ Future getHistory(String pubkey) async { print(pubkey); var query = """{ txsHistoryBc(pubkeyOrScript: "$pubkey") { - received { - writtenTime - issuers - outputs - comment - } + received { + writtenTime + issuers + outputs + comment + } + } + txsHistoryMp(pubkey: "$pubkey") { + receiving { + writtenTime + issuers + outputs + comment + } } currentUd { amount @@ -74,9 +106,10 @@ Future getHistory(String pubkey) async { final res = await buildQ(query); // Parse history - var result; + var resBC, resMP; try { - result = res.data["txsHistoryBc"]["received"]; + resBC = res.data["txsHistoryBc"]["received"]; + resMP = res.data["txsHistoryMp"]["receiving"]; } catch (e) { print("DEBUG: " + e.toString()); print(res.data); @@ -84,32 +117,63 @@ Future getHistory(String pubkey) async { } var i = 0; // String outPubkey; - var trans = []; + var transBC = []; final currentBase = res.data['currentUd']['base']; final currentUD = res.data['currentUd']['amount'] / 100; - for (var bloc in result) { + // Get tx received + for (var bloc in resBC) { var output = bloc['outputs'][0]; // outPubkey = output.split("SIG(")[1].replaceAll(')', ''); - trans.add(i); - trans[i] = []; - trans[i].add(bloc['writtenTime']); - trans[i].add(bloc['issuers'][0]); + transBC.add(i); + transBC[i] = []; + transBC[i].add(bloc['writtenTime']); + transBC[i].add(bloc['issuers'][0]); + var amountBrut = int.parse(output.split(':')[0]); + final base = int.parse(output.split(':')[1]); + final applyBase = base - currentBase; + final amount = amountBrut * pow(10, applyBase) / 100; + transBC[i].add(amount); + final amountUD = amount / currentUD; + transBC[i].add(amountUD.toStringAsFixed(2)); + transBC[i].add(bloc['comment']); + transBC[i].add(base); + + i++; + } + + // Get tx receving + var transMP = []; + i = 0; + + for (var bloc in resMP) { + if (transMP == null) { + print("DEBUG:: " + resMP.toString()); + break; + } + var output = bloc['outputs'][0]; + var outPubkey = output.split("SIG(")[1].replaceAll(')', ''); + transMP.add(i); + transMP[i] = []; + transMP[i].add(bloc['writtenTime']); + transMP[i].add(bloc['issuers'][0]); var amountBrut = int.parse(output.split(':')[0]); final base = int.parse(output.split(':')[1]); final applyBase = base - currentBase; final amount = amountBrut * pow(10, applyBase) / 100; - trans[i].add(amount); + transMP[i].add(amount); final amountUD = amount / currentUD; - trans[i].add(amountUD.toStringAsFixed(2)); - trans[i].add(bloc['comment']); - trans[i].add(base); + transMP[i].add(amountUD.toStringAsFixed(2)); + transMP[i].add(bloc['comment']); + transMP[i].add(base); + transMP[i].add(outPubkey); i++; } // Order transactions by date - trans.sort((b, a) => Comparable.compare(a[0], b[0])); + transBC.sort((b, a) => Comparable.compare(a[0], b[0])); + transMP.sort((b, a) => Comparable.compare(a[0], b[0])); // // Keep only base if there is base change // var lastBase = 0; @@ -122,5 +186,5 @@ Future getHistory(String pubkey) async { // } // print(trans); - return trans; + return [transBC, transMP]; } diff --git a/lib/main.dart b/lib/main.dart index ce75049faa8c06ae2a8c163447c450c9a9e66d60..fd17a7b9edcbd2e4e2c3ab624d3fcebaaaa5849a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:typed_data'; +import 'dart:ui'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; // import 'package:image_gallery_saver/image_gallery_saver.dart'; @@ -8,6 +9,7 @@ import 'package:qrscan/qrscan.dart' as scanner; import 'package:intl/intl.dart'; // import 'package:flutter_html_view'; import 'api.dart'; +import "package:dio/dio.dart"; void main() { runApp(MyApp()); @@ -30,21 +32,15 @@ class _MyAppState extends State<MyApp> { this._outputPubkey = new TextEditingController(); this._outputBalance = new TextEditingController(); this._outputHistory = new TextEditingController(); + // checkNode().then((result) { + // setState(() { + // _result = result; + // }); + // }); } @override Widget build(BuildContext context) { - // final List<String> names = <String>[ - // 'Aby', - // 'Aish', - // 'Ayan', - // 'Ben', - // 'Bob', - // 'Charlie', - // 'Cook', - // 'Carline' - // ]; - // final List<int> msgCount = <int>[2, 0, 10, 6, 52, 4, 0, 2]; return MaterialApp( home: Scaffold( backgroundColor: Colors.grey[300], @@ -163,13 +159,17 @@ class _MyAppState extends State<MyApp> { ); } + Future checkNode() async { + final response = await Dio().post(graphqlEndpoint); + return response; + } + Future _scan() async { await Permission.camera.request(); String barcode = await scanner.scan(); if (barcode == null) { print('nothing return.'); } else { - print("Debug: " + barcode); this._outputPubkey.text = ""; this._outputBalance.text = ""; this._outputHistory.text = ""; @@ -183,10 +183,9 @@ class _MyAppState extends State<MyApp> { return false; } - String historyBloc = ""; + String historyBC = ""; var j = 0; - for (var i in myHistory) { - // print(i); + for (var i in myHistory[0]) { var dateBrut = i[0]; dateBrut = DateTime.fromMillisecondsSinceEpoch(dateBrut * 1000); final DateFormat formatter = DateFormat('dd-MM-yy - H:M'); @@ -195,7 +194,7 @@ class _MyAppState extends State<MyApp> { final amount = i[2]; // final amountUD = i[3]; final comment = i[4]; - historyBloc += date.toString() + + historyBC += date.toString() + " \n " + issuer.toString() + " \n " + @@ -208,7 +207,37 @@ class _MyAppState extends State<MyApp> { break; } } - this._outputHistory.text = historyBloc; + + String historyMP = ""; + j = 0; + for (var i in myHistory[1]) { + if (i == null) { + break; + } + var dateBrut = "Now"; + final issuer = i[1]; + final amount = i[2]; + // final amountUD = i[3]; + final comment = i[4]; + historyMP += "EN COURS DE RECEPTION\n" + + dateBrut.toString() + + " \n " + + issuer.toString() + + " \n " + + amount.toString() + + " Ğ1\n " + + comment.toString() + + "\n---\n"; + } + + var history; + // print(historyMP.toString()); + if (historyMP == "") { + history = historyBC; + } else { + history = historyMP + '\n' + historyBC; + } + this._outputHistory.text = history; } } diff --git a/pubspec.lock b/pubspec.lock index 3b954c792bd94fa2ad0b6eb92df2501d569f0e70..6fb880623446497f4d47bb038c7183f8d48d34ad 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,20 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.13" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.0" async: dependency: transitive description: @@ -43,13 +57,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0-nullsafety.3" - cupertino_icons: - dependency: "direct main" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive description: - name: cupertino_icons + name: crypto url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "2.1.5" dio: dependency: "direct main" description: @@ -69,6 +90,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_launcher_icons: + dependency: "direct main" + description: + name: flutter_launcher_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.1" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -123,6 +151,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.4" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.19" image_gallery_saver: dependency: "direct main" description: @@ -193,6 +228,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" plugin_platform_interface: dependency: transitive description: @@ -268,6 +310,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0-nullsafety.3" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.1" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" sdks: dart: ">=2.10.0-110 <2.11.0" flutter: ">=1.12.13+hotfix.5 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 6a1b3ca9dae2344e82ef96b0198d930d4c0f5f6c..4258c7f19b83966d9f601c280bc73e0e03504c9f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,6 +32,12 @@ dependencies: gql_exec: gql_link: intl: + flutter_launcher_icons: "^0.8.0" + +flutter_icons: + android: "launcher_icon" + ios: true + image_path: "assets/icon/gecko-bb-36.png" # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. diff --git a/scripts/build-apk.sh b/scripts/build-apk.sh index df291f0e119b7aa5a0cb821cc362ecbf262cdcaf..86bb25f5a37288770b2842b3266dba81390e51cf 100755 --- a/scripts/build-apk.sh +++ b/scripts/build-apk.sh @@ -2,3 +2,18 @@ flutter build apk --split-per-abi +APPNAME = "gecko" +VERSION="dev1" +ori_app="app.apk" + +if [[ -d $HOME/Téléchargements ]]; then + DL="$HOME/Téléchargements" +elif [[ -d $HOME/Downloads ]]; then + DL="$HOME/Downloads" +else + DL="/tmp" +fi + +mv build/app/outputs/flutter-apk/$ori_app "$DL/gecko-$VERSION" && echo "L'app se trouve ici: $DL/${APPNAME}-${VERSION}.apk" || exit 1 + +exit 0