Skip to content

Commit

Permalink
chore: Bump to Dart 3 and latest Flutter 3.10.5
Browse files Browse the repository at this point in the history
- Fix a few lints (new `const` constructors)
- ensure CI is building the same version
- bump dependencies that were not compatible with Dart 3

Dart 3 is a big release, that introduces many Rust-like features.
Thankfully, all our code was compatible with it, so it was trivial to bump at
this stage.

Some highlights of Dart 3:
- sound null-safety,
- destructuring,
- patterns (better switch and if statements)
- records
- sealed classes (and other class modifiers)

More info:
- https://medium.com/dartlang/announcing-dart-3-53f065a10635
- https://codewithandrea.com/articles/whats-new-dart-3-introduction/
  • Loading branch information
klochowicz committed Jun 30, 2023
1 parent 95af589 commit b919dd3
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [created]

env:
FLUTTER_VERSION: "3.7.7"
FLUTTER_VERSION: "3.10.5"
RUST_VERSION: "1.68.0"

jobs:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- uses: Swatinem/[email protected]
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.7.7"
flutter-version: "3.10.5"
channel: "stable"
- name: Install FFI bindings
run: just deps-gen
Expand All @@ -61,7 +61,7 @@ jobs:
- uses: extractions/setup-just@v1
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.7.7"
flutter-version: "3.10.5"
channel: "stable"
- name: Setup rust toolchain
run: rustup show
Expand All @@ -87,7 +87,7 @@ jobs:
- uses: Swatinem/[email protected]
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.7.7"
flutter-version: "3.10.5"
channel: "stable"
- name: Install FFI bindings
run: just deps-gen
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- uses: Swatinem/[email protected]
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.7.7"
flutter-version: "3.10.5"
channel: "stable"
- name: Install FFI bindings
run: just deps-gen
Expand Down
8 changes: 4 additions & 4 deletions mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)

EXTERNAL SOURCES:
Flutter:
Expand All @@ -29,11 +29,11 @@ EXTERNAL SOURCES:
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/ios"
:path: ".symlinks/plugins/path_provider_foundation/darwin"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/ios"
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Expand Down
1 change: 1 addition & 0 deletions mobile/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/features/trade/order_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class OrderListItem extends StatelessWidget {

return Card(
child: ListTile(
leading: Column(
leading: const Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
children: [
ContractSymbolIcon(
height: 20,
width: 20,
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/features/trade/position_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ class _PositionListItemState extends State<PositionListItem> {
await widget.onClose();
},
child: notNullPosition.positionState == PositionState.closing || isPositionExpired
? Row(
children: const [
? const Row(
children: [
SizedBox(
width: 10,
height: 10,
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/features/trade/trade_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class TradeBottomSheet extends StatelessWidget {
),
],
selectedIndex: direction == Direction.long ? 0 : 1,
topRightWidget: Row(
children: const [
topRightWidget: const Row(
children: [
Text(
"Market Order",
style: TextStyle(color: Colors.grey),
Expand Down
8 changes: 4 additions & 4 deletions mobile/lib/features/wallet/share_invoice_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ class _ShareInvoiceScreenState extends State<ShareInvoiceScreen> {
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0))),
),
child: Row(
child: const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 8.0),
child: Icon(Icons.copy),
Expand All @@ -143,9 +143,9 @@ class _ShareInvoiceScreenState extends State<ShareInvoiceScreen> {
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0))),
),
child: Row(
child: const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 8.0),
child: Icon(Icons.send),
Expand Down
6 changes: 3 additions & 3 deletions mobile/lib/features/wallet/wallet_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ class _WalletScreenState extends State<WalletScreen> {
],
);
},
body: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0, bottom: 16.0),
body: const Padding(
padding: EdgeInsets.only(left: 8.0, right: 8.0, bottom: 16.0),
child: Column(
children: const [
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 8.0),
child: BalanceRow(walletType: WalletHistoryItemDataType.lightning),
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/features/welcome/welcome_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class _WelcomeScreenState extends State<WelcomeScreen> {
Center(
child: Image.asset('assets/10101_logo_icon.png', width: 150, height: 150),
),
Column(
const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const <Widget>[
children: <Widget>[
Center(
child: Text(
"As we are in closed beta, there may be bugs. To assist with any issues, please provide your email.",
Expand Down
8 changes: 4 additions & 4 deletions mobile/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ PODS:
DEPENDENCIES:
- FlutterMacOS (from `Flutter/ephemeral`)
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)

EXTERNAL SOURCES:
FlutterMacOS:
:path: Flutter/ephemeral
package_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
share_plus:
:path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
shared_preferences_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin

SPEC CHECKSUMS:
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
Expand Down
42 changes: 21 additions & 21 deletions mobile/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: async
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.10.0"
version: "2.11.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -133,10 +133,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.3.0"
checked_yaml:
dependency: transitive
description:
Expand Down Expand Up @@ -173,10 +173,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.17.1"
colorize:
dependency: transitive
description:
Expand Down Expand Up @@ -277,10 +277,10 @@ packages:
dependency: "direct dev"
description:
name: ffigen
sha256: "4bbf1fa19723a90578e991b9a95afca43bea856809890a26609618fa29087427"
sha256: d3e76c2ad48a4e7f93a29a162006f00eba46ce7c08194a77bb5c5e97d1b5ff0a
url: "https://pub.dev"
source: hosted
version: "7.2.11"
version: "8.0.2"
file:
dependency: transitive
description:
Expand Down Expand Up @@ -468,10 +468,10 @@ packages:
dependency: transitive
description:
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.5"
version: "0.6.7"
json_annotation:
dependency: transitive
description:
Expand Down Expand Up @@ -500,10 +500,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
url: "https://pub.dev"
source: hosted
version: "0.12.13"
version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
Expand All @@ -516,10 +516,10 @@ packages:
dependency: "direct main"
description:
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.9.1"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -572,10 +572,10 @@ packages:
dependency: transitive
description:
name: path
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.2"
version: "1.8.3"
path_parsing:
dependency: transitive
description:
Expand Down Expand Up @@ -708,10 +708,10 @@ packages:
dependency: transitive
description:
name: puppeteer
sha256: dd49117259867d0ce0de33ddd95628fb70cff94581a6432c08272447b8dd1d27
sha256: f00b54703dc22af04eaace8f23a33c56008870f990684c2ad8c4115ac51b0a38
url: "https://pub.dev"
source: hosted
version: "2.24.0"
version: "3.1.1"
qr:
dependency: transitive
description:
Expand Down Expand Up @@ -929,10 +929,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
url: "https://pub.dev"
source: hosted
version: "0.4.16"
version: "0.5.1"
timeago:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1110,5 +1110,5 @@ packages:
source: hosted
version: "2.1.1"
sdks:
dart: ">=2.19.0 <3.0.0"
dart: ">=3.0.0 <4.0.0"
flutter: ">=3.7.0-0"
4 changes: 2 additions & 2 deletions mobile/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 10101 combines the power of a self-custodial on-chain and off-chain
publish_to: none
version: 1.0.20
environment:
sdk: ">=2.17.5 <3.0.0"
sdk: ">=3.0.0 <4.0.0"
dependencies:
flutter:
sdk: flutter
Expand Down Expand Up @@ -36,7 +36,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.2
ffigen: ^7.2.11
ffigen: ^8.0.0
freezed: ^2.3.5
build_runner: ^2.3.3
mockito: ^5.4.0
Expand Down

0 comments on commit b919dd3

Please sign in to comment.