diff --git a/.heroku/entrypoint.sh b/.heroku/entrypoint.sh deleted file mode 100755 index a62d42c..0000000 --- a/.heroku/entrypoint.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -set -eux - -/usr/local/bin/tox-bootstrapd --config /etc/tox-bootstrapd.conf --log-backend stdout --foreground & -/usr/local/bin/websockify -l 0.0.0.0:"$PORT" -t 127.0.0.1:33445 diff --git a/.heroku/keys b/.heroku/keys deleted file mode 100644 index 3b855c4..0000000 --- a/.heroku/keys +++ /dev/null @@ -1 +0,0 @@ -48N%o'XiJPK6 F&IvetC*ζÂqx^P \ No newline at end of file diff --git a/.heroku/wasm.cpp b/.heroku/wasm.cpp deleted file mode 100644 index 5243d75..0000000 --- a/.heroku/wasm.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include - -#include - -#include -#include - -using namespace emscripten; - -void to_hex(char *out, uint8_t const *in, int size) { - while (size--) { - if (*in >> 4 < 0xA) { - *out++ = '0' + (*in >> 4); - } else { - *out++ = 'A' + (*in >> 4) - 0xA; - } - - if ((*in & 0xf) < 0xA) { - *out++ = '0' + (*in & 0xF); - } else { - *out++ = 'A' + (*in & 0xF) - 0xA; - } - in++; - } -} - -static uint8_t const key1[] = { - 0x02, 0x80, 0x7C, 0xF4, 0xF8, 0xBB, 0x8F, 0xB3, - 0x90, 0xCC, 0x37, 0x94, 0xBD, 0xF1, 0xE8, 0x44, - 0x9E, 0x9A, 0x83, 0x92, 0xC5, 0xD3, 0xF2, 0x20, - 0x00, 0x19, 0xDA, 0x9F, 0x1E, 0x81, 0x2E, 0x46, -}; - -static uint8_t const key2[] = { - 0x3F, 0x0A, 0x45, 0xA2, 0x68, 0x36, 0x7C, 0x1B, - 0xEA, 0x65, 0x2F, 0x25, 0x8C, 0x85, 0xF4, 0xA6, - 0x6D, 0xA7, 0x6B, 0xCA, 0xA6, 0x67, 0xA4, 0x9E, - 0x77, 0x0B, 0xCC, 0x49, 0x17, 0xAB, 0x6A, 0x25, -}; - -class ToxWrapper { -public: - std::string address() const { - std::array hex_address; - tox_self_get_address(tox_, hex_address.data()); - std::string address{TOX_ADDRESS_SIZE, '\0'}; - to_hex(address.data(), hex_address.data(), TOX_ADDRESS_SIZE); - return address; - } - - void iterate() { - tox_iterate(tox_, nullptr); - } - - int connection_status() const { - return tox_self_get_connection_status(tox_); - } - - void bootstrap() { - tox_bootstrap(tox_, "78.46.73.141", 33445, key1, nullptr); - tox_bootstrap(tox_, "tox.initramfs.io", 33445, key2, nullptr); - tox_add_tcp_relay(tox_, "78.46.73.141", 33445, key1, nullptr); - tox_add_tcp_relay(tox_, "tox.initramfs.io", 33445, key2, nullptr); - } - -private: - Tox *tox_{[] { - Tox_Options *opts = tox_options_new(nullptr); - tox_options_set_udp_enabled(opts, false); - return tox_new(opts, nullptr); - }()}; -}; - -EMSCRIPTEN_BINDINGS(tox) { - function("version_major", &tox_version_major); - function("version_minor", &tox_version_minor); - function("version_patch", &tox_version_patch); - class_("Tox") - .constructor() - .function("address", &ToxWrapper::address) - .function("bootstrap", &ToxWrapper::bootstrap) - .function("connection_status", &ToxWrapper::connection_status) - .function("iterate", &ToxWrapper::iterate) - ; -} diff --git a/analysis_options.yaml b/analysis_options.yaml index 13dee7b..d8e200e 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -5,3 +5,7 @@ include: package:flutter_lints/flutter.yaml linter: rules: prefer_single_quotes: true + +analyzer: + exclude: + - '**/*.g.dart' diff --git a/heroku.yml b/heroku.yml deleted file mode 100644 index a887dcc..0000000 --- a/heroku.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -build: - docker: - web: Dockerfile diff --git a/lib/add_contact_page.dart b/lib/add_contact_page.dart index 368f3ce..f76d7d6 100644 --- a/lib/add_contact_page.dart +++ b/lib/add_contact_page.dart @@ -3,8 +3,7 @@ import 'package:flutter/material.dart'; import 'strings.dart'; class AddContactPage extends StatefulWidget { - const AddContactPage({Key? key, required this.onAddContact}) - : super(key: key); + const AddContactPage({super.key, required this.onAddContact}); final Function(String, String) onAddContact; @@ -45,7 +44,7 @@ class _AddContactPageState extends State { validator: (value) { value ??= ''; if (value.length != 76) { - return Strings.toxIdLengthError + ' (${value.length}/76)'; + return '${Strings.toxIdLengthError} (${value.length}/76)'; } return null; }, diff --git a/lib/app.dart b/lib/app.dart index 275c2a9..38f0d18 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -5,10 +5,10 @@ import 'db/database.dart'; import 'strings.dart'; class App extends StatelessWidget { - const App({Key? key, required this.database}) : super(key: key); - final Database database; + const App({super.key, required this.database}); + @override Widget build(BuildContext context) { return MaterialApp( diff --git a/lib/chat_page.dart b/lib/chat_page.dart index d165fa0..e95cc01 100644 --- a/lib/chat_page.dart +++ b/lib/chat_page.dart @@ -5,11 +5,11 @@ import 'strings.dart'; class ChatPage extends StatefulWidget { const ChatPage({ - Key? key, + super.key, required this.contact, required this.messages, required this.onSendMessage, - }) : super(key: key); + }); final Stream contact; final Stream> messages; diff --git a/lib/contact_list_page.dart b/lib/contact_list_page.dart index a030638..f9082b9 100644 --- a/lib/contact_list_page.dart +++ b/lib/contact_list_page.dart @@ -11,8 +11,8 @@ import 'settings.dart'; import 'strings.dart'; class ContactListItem extends StatelessWidget { - const ContactListItem({Key? key, required this.contact, required this.onTap}) - : super(key: key); + const ContactListItem( + {super.key, required this.contact, required this.onTap}); final Contact contact; final Function(Contact) onTap; @@ -28,8 +28,7 @@ class ContactListItem extends StatelessWidget { } class ContactListPage extends StatefulWidget { - ContactListPage({Key? key, required this.title, required this.database}) - : super(key: key); + ContactListPage({super.key, required this.title, required this.database}); final String title; final Database database; @@ -115,16 +114,14 @@ class _ContactListPageState extends State { ); }, ), - defaultTargetPlatform == TargetPlatform.android - ? ListTile( - leading: const Icon(Icons.close), - title: const Text(Strings.menuQuit), - onTap: () { - SystemChannels.platform - .invokeMethod('SystemNavigator.pop'); - }, - ) - : const SizedBox.shrink(), + if (defaultTargetPlatform == TargetPlatform.android) + ListTile( + leading: const Icon(Icons.close), + title: const Text(Strings.menuQuit), + onTap: () { + SystemChannels.platform.invokeMethod('SystemNavigator.pop'); + }, + ) ], ), ), diff --git a/lib/db/database.dart b/lib/db/database.dart index fa0a61b..565338c 100644 --- a/lib/db/database.dart +++ b/lib/db/database.dart @@ -16,7 +16,7 @@ class Messages extends Table { @DriftDatabase(tables: [Contacts, Messages]) class Database extends _$Database { - Database(QueryExecutor e) : super(e); + Database(super.e); @override int get schemaVersion => 2; diff --git a/lib/profile.dart b/lib/profile.dart index 32e64af..11a4a7e 100644 --- a/lib/profile.dart +++ b/lib/profile.dart @@ -6,7 +6,7 @@ import 'strings.dart'; class UserProfilePage extends StatefulWidget { final AppState appState; - const UserProfilePage({Key? key, required this.appState}) : super(key: key); + const UserProfilePage({super.key, required this.appState}); @override State createState() => _UserProfilePageState(); @@ -114,15 +114,15 @@ class _UserProfilePageState extends State { ), ), ElevatedButton( - child: _applyButtonPressed - ? const Text(Strings.applied) - : const Text(Strings.applyChanges), style: ElevatedButton.styleFrom( backgroundColor: _applyButtonPressed ? Colors.green : Colors.blue, foregroundColor: Colors.white, ), onPressed: () => _onValidate(), + child: _applyButtonPressed + ? const Text(Strings.applied) + : const Text(Strings.applyChanges), ), ], ), diff --git a/lib/settings.dart b/lib/settings.dart index 54dcdda..195f22c 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'strings.dart'; class SettingsPage extends StatefulWidget { - const SettingsPage({Key? key}) : super(key: key); + const SettingsPage({super.key}); @override State createState() => _SettingsPageState(); diff --git a/pubspec.lock b/pubspec.lock index 6f65236..4324bb8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,34 +5,39 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "4897882604d919befd350648c7f91926a9d5de99e67b455bf0917cc2362f4bb8" + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 url: "https://pub.dev" source: hosted - version: "47.0.0" - analyzer: + version: "72.0.0" + _macros: dependency: transitive + description: dart + source: sdk + version: "0.3.2" + analyzer: + dependency: "direct dev" description: name: analyzer - sha256: "690e335554a8385bc9d787117d9eb52c0c03ee207a607e593de3c9d71b1cfe80" + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "6.7.0" analyzer_plugin: dependency: transitive description: name: analyzer_plugin - sha256: "02b0046b8b9a4c97a238c66f70acd22eec4263dfc8d9205f9dab5cc8630c5a6f" + sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.11.3" args: dependency: transitive description: name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.6.0" async: dependency: transitive description: @@ -69,34 +74,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "687cf90a3951affac1bd5f9ecb5e3e90b60487f3d9cdc359bb310f8876bb02a6" + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.0.10" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.13" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 url: "https://pub.dev" source: hosted - version: "7.2.10" + version: "7.3.2" built_collection: dependency: transitive description: @@ -109,10 +114,10 @@ packages: dependency: transitive description: name: built_value - sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.6.1" + version: "8.9.2" characters: dependency: transitive description: @@ -141,10 +146,10 @@ packages: dependency: transitive description: name: cli_util - sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c url: "https://pub.dev" source: hosted - version: "0.3.5" + version: "0.4.2" clock: dependency: transitive description: @@ -157,66 +162,66 @@ packages: dependency: transitive description: name: code_builder - sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" url: "https://pub.dev" source: hosted - version: "4.5.0" + version: "4.10.1" collection: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.18.0" convert: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.8" dart_style: dependency: transitive description: name: dart_style - sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4" + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.3.7" drift: dependency: "direct main" description: name: drift - sha256: "43ae515270f38ffe47702dc920c04d415894bcc6ebdf3e2b6a292cb207ed8cb7" + sha256: df027d168a2985a2e9da900adeba2ab0136f0d84436592cf3cd5135f82c8579c url: "https://pub.dev" source: hosted - version: "1.7.1" + version: "2.21.0" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: "7d51538da971823a158236823cfb299731f720cd55078c6a478bfa4effb69275" + sha256: "623649abe932fc17bd32e578e7e05f7ac5e7dd0b33e6c8669a0634105d1389bf" url: "https://pub.dev" source: hosted - version: "1.7.1" + version: "2.21.2" fake_async: dependency: transitive description: @@ -229,26 +234,26 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -258,10 +263,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "5.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -271,10 +276,10 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: @@ -287,10 +292,10 @@ packages: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" http_multi_server: dependency: transitive description: @@ -319,66 +324,98 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: transitive description: name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "5.0.0" logging: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" matcher: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.15.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" package_config: dependency: transitive description: @@ -391,74 +428,74 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: "direct main" description: name: path_provider - sha256: "909b84830485dbcd0308edf6f7368bc8fd76afa26a270420f34cabea2a6467a0" + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "5d44fc3314d969b84816b569070d7ace0f1dea04bd94a83f74c4829615d22ad8" + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.12" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "1b744d3d774e5a879bb76d6cd1ecee2ba2c6960c03b1020cd35212f6aa267ac5" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: ba2b77f0c52a33db09fc8caf85b12df691bf28d983e84cf87ff6d693cfa007b3 + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: bced5679c7df11190e1ddc35f3222c858f328fff85c3942e46e7f5589bf9eb84 + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: ee0e0d164516b90ae1f970bdf29f726f1aa730d7cfc449ecc74c495378b705da + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" platform: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.1.8" pool: dependency: transitive description: @@ -479,10 +516,10 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" recase: dependency: transitive description: @@ -503,10 +540,10 @@ packages: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -516,58 +553,58 @@ packages: dependency: transitive description: name: source_gen - sha256: "2d79738b6bbf38a43920e2b8d189e9a3ce6cc201f4b8fc76be5e4fe377b1c38d" + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.2.6" + version: "1.5.0" source_span: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" sqlite3: dependency: transitive description: name: sqlite3 - sha256: "281b672749af2edf259fc801f0fcba092257425bcd32a0ce1c8237130bc934c7" + sha256: bb174b3ec2527f9c5f680f73a89af8149dd99782fbb56ea88ad0807c5638f2ed url: "https://pub.dev" source: hosted - version: "1.11.2" + version: "2.4.7" sqlite3_flutter_libs: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: "1e20a88d5c7ae8400e009f38ddbe8b001800a6dffa37832481a86a219bc904c7" + sha256: "7ae52b23366e5295005022e62fa093f64bfe190810223ea0ebf733a4cd140bce" url: "https://pub.dev" source: hosted - version: "0.5.15" + version: "0.5.26" sqlparser: dependency: transitive description: name: sqlparser - sha256: "9ed8f4a24a2a243e23ad267bb50378cb75c7de0b200b5336229b2d6096e6a5df" + sha256: d77749237609784e337ec36c979d41f6f38a7b279df98622ae23929c8eb954a4 url: "https://pub.dev" source: hosted - version: "0.22.0" + version: "0.39.2" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -596,10 +633,10 @@ packages: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.7.2" timing: dependency: transitive description: @@ -612,10 +649,10 @@ packages: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" vector_math: dependency: transitive description: @@ -624,6 +661,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" watcher: dependency: transitive description: @@ -632,30 +677,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - web_socket_channel: + web: dependency: transitive description: - name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "2.4.0" - win32: + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" + web_socket_channel: dependency: transitive description: - name: win32 - sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0 + name: web_socket_channel + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "5.0.6" + version: "3.0.1" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: f0c26453a2d47aa4c2570c6a033246a3fc62da2fe23c7ffdd0a7495086dc0247 + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" yaml: dependency: transitive description: @@ -665,5 +718,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" - flutter: ">=3.3.0" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index d83eb8f..9ae9180 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.15.1 <3.0.0" + sdk: ">=3.5.0 <4.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -32,19 +32,19 @@ dependencies: cupertino_icons: ^1.0.2 - drift: ^1.3.0 + drift: ^2.21.0 sqlite3_flutter_libs: ^0.5.0 path_provider: ^2.0.0 - path: ^1.8.0 + path: ^1.9.0 dev_dependencies: flutter_test: sdk: flutter - drift_dev: ^1.3.0 + analyzer: ^6.7.0 build_runner: ^2.1.7 - - flutter_lints: ^1.0.0 + drift_dev: ^2.21.2 + flutter_lints: ^5.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/tools/prepare b/tools/prepare index f379178..758501f 100755 --- a/tools/prepare +++ b/tools/prepare @@ -6,4 +6,4 @@ set -eux flutter pub get # Generate the database (drift) code. -flutter packages pub run build_runner build --delete-conflicting-outputs +dart run build_runner build --delete-conflicting-outputs diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt index b2e4bd8..4f2af69 100644 --- a/windows/flutter/CMakeLists.txt +++ b/windows/flutter/CMakeLists.txt @@ -9,6 +9,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -91,7 +96,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index 6e2fece..5ca5b7a 100644 --- a/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -60,14 +60,14 @@ IDI_APP_ICON ICON "resources\\app_icon.ico" // Version // -#ifdef FLUTTER_BUILD_NUMBER -#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD #else -#define VERSION_AS_NUMBER 1,0,0 +#define VERSION_AS_NUMBER 1,0,0,0 #endif -#ifdef FLUTTER_BUILD_NAME -#define VERSION_AS_STRING #FLUTTER_BUILD_NAME +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION #else #define VERSION_AS_STRING "1.0.0" #endif