Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade flutter to 3.19.1 #2081

Merged
merged 4 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android-fastlane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ on:
type: string

env:
FLUTTER_VERSION: "3.13.4"
FLUTTER_VERSION: "3.19.1"

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:


env:
FLUTTER_VERSION: "3.13.4"
FLUTTER_VERSION: "3.19.1"
RUST_VERSION: "1.70.0"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
FLUTTER_VERSION: "3.13.4"
FLUTTER_VERSION: "3.19.1"

jobs:
formatting-dprint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
REGISTRY: ghcr.io
FLUTTER_VERSION: "3.13.4"
FLUTTER_VERSION: "3.19.1"

jobs:
docker:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios-fastlane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ on:
type: string

env:
FLUTTER_VERSION: "3.13.4"
FLUTTER_VERSION: "3.19.1"

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ android-release:

# Build flutter webapp for cargo run --bin webapp
build-web args="":
cd webapp/frontend && flutter build web {{args}}
cd webapp/frontend && flutter build web --web-renderer html {{args}}

build-web-release:
cd webapp/frontend && flutter build web --release
cd webapp/frontend && flutter build web --web-renderer html --release

run-web:
cd webapp/frontend && flutter run -d chrome --web-browser-flag "--disable-web-security"
Expand Down
3 changes: 3 additions & 0 deletions mobile/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

analyzer:
exclude: [lib/bridge_generated/*]

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
Expand Down
2 changes: 1 addition & 1 deletion mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ SPEC CHECKSUMS:
FirebaseCoreInternal: 2f4bee5ed00301b5e56da0849268797a2dd31fb4
FirebaseInstallations: cae95cab0f965ce05b805189de1d4c70b11c76fb
FirebaseMessaging: bb2c4f6422a753038fe137d90ae7c1af57251316
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2
Expand Down
2 changes: 1 addition & 1 deletion mobile/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 1 addition & 3 deletions mobile/lib/common/edit_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ Future<T?> showEditModal<T>(
}
},
child: SingleChildScrollView(
child: IntrinsicHeight(
child: builder(context, (newVal) => val = newVal),
),
child: builder(context, (newVal) => val = newVal),
),
))));
}).then((res) => res ?? val);
Expand Down
1 change: 1 addition & 0 deletions mobile/lib/common/poll_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class _PollWidgetState extends State<PollWidget> {
child: Stack(
children: [
ExpansionTile(
backgroundColor: Colors.white,
trailing: const SizedBox.shrink(),
title: const Text("Time for a quick survey?"),
children: [
Expand Down
3 changes: 3 additions & 0 deletions mobile/lib/common/scaffold_with_nav_bar.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get_10101/common/app_bar_wrapper.dart';
import 'package:get_10101/common/color.dart';
import 'package:get_10101/features/trade/trade_screen.dart';
import 'package:get_10101/features/wallet/wallet_screen.dart';
import 'package:get_10101/util/constants.dart';
Expand All @@ -24,6 +25,8 @@ class ScaffoldWithNavBar extends StatelessWidget {
appBar: const PreferredSize(
preferredSize: Size.fromHeight(40), child: SafeArea(child: AppBarWrapper())),
bottomNavigationBar: BottomNavigationBar(
selectedItemColor: tenTenOnePurple,
unselectedItemColor: Colors.grey,
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Container(key: tabWallet, child: const Icon(Icons.wallet)),
Expand Down
5 changes: 4 additions & 1 deletion mobile/lib/common/task_status_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ class _TaskStatusDialog extends State<TaskStatusDialog> {

// If pending, prevent use of back button
if (isPending) {
return WillPopScope(child: dialog, onWillPop: () async => false);
return PopScope(
canPop: false,
child: dialog,
);
} else {
return dialog;
}
Expand Down
77 changes: 44 additions & 33 deletions mobile/lib/features/trade/channel_configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:get_10101/common/amount_text_field.dart';
import 'package:get_10101/common/amount_text_input_form_field.dart';
import 'package:get_10101/common/application/lsp_change_notifier.dart';
import 'package:get_10101/common/color.dart';
import 'package:get_10101/common/domain/model.dart';
import 'package:get_10101/common/value_data_row.dart';
import 'package:get_10101/features/trade/domain/channel_opening_params.dart';
Expand Down Expand Up @@ -32,28 +33,30 @@ channelConfiguration({
useRootNavigator: true,
barrierColor: Colors.black.withOpacity(0),
context: context,
useSafeArea: true,
builder: (BuildContext context) {
return SafeArea(
child: Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
// the GestureDetector ensures that we can close the keyboard by tapping into the modal
child: GestureDetector(
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);

if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
},
child: SingleChildScrollView(
child: SizedBox(
height: 450,
child: ChannelConfiguration(
tradeValues: tradeValues,
onConfirmation: onConfirmation,
),
),
))));
child: Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child: GestureDetector(
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);

if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
},
child: SingleChildScrollView(
child: SizedBox(
height: 520,
child: ChannelConfiguration(
tradeValues: tradeValues,
onConfirmation: onConfirmation,
),
),
)),
),
);
});
}

Expand Down Expand Up @@ -219,19 +222,27 @@ class _ChannelConfiguration extends State<ChannelConfiguration> {
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.end,
children: [
ElevatedButton(
key: tradeScreenBottomSheetChannelConfigurationConfirmButton,
onPressed:
_formKey.currentState != null && _formKey.currentState!.validate()
? () {
GoRouter.of(context).pop();
widget.onConfirmation(ChannelOpeningParams(
coordinatorCollateral: counterpartyCollateral,
traderCollateral: ownTotalCollateral));
}
: null,
style: ElevatedButton.styleFrom(minimumSize: const Size.fromHeight(50)),
child: const Text("Confirm"),
Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
key: tradeScreenBottomSheetChannelConfigurationConfirmButton,
onPressed:
_formKey.currentState != null && _formKey.currentState!.validate()
? () {
GoRouter.of(context).pop();
widget.onConfirmation(ChannelOpeningParams(
coordinatorCollateral: counterpartyCollateral,
traderCollateral: ownTotalCollateral));
}
: null,
style: ElevatedButton.styleFrom(
minimumSize: const Size.fromHeight(50),
backgroundColor: tenTenOnePurple),
child: const Text(
"Confirm",
style: TextStyle(color: Colors.white),
),
),
),
],
)
Expand Down
5 changes: 4 additions & 1 deletion mobile/lib/features/trade/leverage_slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ class LeverageButton extends StatelessWidget {
padding: EdgeInsets.zero,
backgroundColor: tradeTheme.leverageMinusButtonColor),
onPressed: () => onPressed(),
child: Text(label)),
child: Text(
label,
style: const TextStyle(color: Colors.white),
)),
);
}
}
Expand Down
5 changes: 4 additions & 1 deletion mobile/lib/features/trade/position_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ class _PositionListItemState extends State<PositionListItem> {
Text("Closing ...")
],
)
: const Text("Close Position"),
: const Text(
"Close Position",
style: TextStyle(color: Colors.white),
),
)
],
)
Expand Down
3 changes: 1 addition & 2 deletions mobile/lib/features/trade/trade_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ tradeBottomSheet({required BuildContext context, required Direction direction})
builder: (BuildContext context) {
return SafeArea(
child: Padding(
// padding: MediaQuery.of(context).viewInsets,
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
// the GestureDetector ensures that we can close the keyboard by tapping into the modal
child: GestureDetector(
Expand All @@ -34,7 +33,7 @@ tradeBottomSheet({required BuildContext context, required Direction direction})
child: SizedBox(
// TODO: Find a way to make height dynamic depending on the children size
// This is needed because otherwise the keyboard does not push the sheet up correctly
height: 450,
height: 470,
child: TradeBottomSheet(direction: direction)),
),
),
Expand Down
5 changes: 4 additions & 1 deletion mobile/lib/features/trade/trade_bottom_sheet_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ class _TradeBottomSheetTabState extends State<TradeBottomSheetTab> {
},
style: ElevatedButton.styleFrom(
backgroundColor: color, minimumSize: const Size.fromHeight(50)),
child: Text(label)),
child: Text(
label,
style: const TextStyle(color: Colors.white),
)),
],
)
],
Expand Down
12 changes: 10 additions & 2 deletions mobile/lib/features/trade/trade_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ class TradeScreen extends StatelessWidget {
children: <Widget>[
SizedBox(
width: tradeButtonWidth,
height: 50,
child: FloatingActionButton.extended(
key: tradeScreenButtonBuy,
heroTag: "btnBuy",
Expand All @@ -224,13 +225,17 @@ class TradeScreen extends StatelessWidget {
tradeBottomSheet(context: context, direction: Direction.long);
}
},
label: const Text("Buy"),
label: const Text(
"Buy",
style: TextStyle(color: Colors.white),
),
shape: tradeButtonShape,
backgroundColor: isBuyButtonEnabled ? tradeTheme.buy : tradeTheme.disabled,
)),
const SizedBox(width: 20),
SizedBox(
width: tradeButtonWidth,
height: 50,
child: FloatingActionButton.extended(
key: tradeScreenButtonSell,
heroTag: "btnSell",
Expand All @@ -239,7 +244,10 @@ class TradeScreen extends StatelessWidget {
tradeBottomSheet(context: context, direction: Direction.short);
}
},
label: const Text("Sell"),
label: const Text(
"Sell",
style: TextStyle(color: Colors.white),
),
shape: tradeButtonShape,
backgroundColor: isBuyButtonEnabled ? tradeTheme.sell : tradeTheme.disabled,
)),
Expand Down
6 changes: 5 additions & 1 deletion mobile/lib/features/trade/trade_tabs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ class TradeTabs extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TabBar(
// Sets the divider below the tab to transparent
dividerColor: Colors.transparent,
// This stops expanding the tab-bar to the right.
// This lets us align the tab bar to wherever we want, because it's size is limited to the tabs that it contains.
isScrollable: true,

tabAlignment: TabAlignment.start,
// suppress overlay color (used for e.g. mouse-over) because it looks weird in this tab setup
overlayColor: MaterialStateColor.resolveWith((states) => Colors.transparent),

Expand All @@ -77,6 +79,8 @@ class TradeTabs extends StatelessWidget {
unselectedLabelColor: tradeTheme.tabColor,
indicator:
BoxDecoration(borderRadius: tabBorderRadius, color: tradeTheme.tabColor),
labelStyle: const TextStyle(color: Colors.white),
splashBorderRadius: BorderRadius.zero,
tabs: tabs.asMap().entries.map((entry) {
int index = entry.key;
String label = entry.value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class _TaskStatusDialog extends State<ReceiveUsdpTaskStatusDialog> {

// If pending, prevent use of back button
if (isPending) {
return WillPopScope(child: dialog, onWillPop: () async => false);
return PopScope(canPop: false, child: dialog);
} else {
return dialog;
}
Expand Down
2 changes: 1 addition & 1 deletion mobile/lib/features/wallet/wallet_history_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ abstract class WalletHistoryItem extends StatelessWidget {
style: const TextStyle(color: Colors.grey)),
])),
trailing: Padding(
padding: const EdgeInsets.only(top: 11.0, bottom: 5.0),
padding: const EdgeInsets.only(top: 11.0, bottom: 2.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
Expand Down