diff --git a/lib/common/bottom_sheets/base_bottom_sheet.dart b/lib/common/bottom_sheets/base_bottom_sheet.dart deleted file mode 100644 index fd145e34..00000000 --- a/lib/common/bottom_sheets/base_bottom_sheet.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_i18n/flutter_i18n.dart'; -import 'package:mxc_ui/mxc_ui.dart'; - -Future showBaseBottomSheet({ - required BuildContext context, - bool hasCloseButton = true, - bool? closeButtonReturnValue, - /// Has translation so just pass the key - String? bottomSheetTitle, - List? widgets, - Widget? content, - bool isDismissible = true, - bool enableDrag = true, - Color? bottomSheetBackgroundColor, -}) { - assert( - ((widgets != null && bottomSheetTitle != null) || content != null) && - (!((widgets != null && bottomSheetTitle != null) && content != null)), - "Only one of content or widgets should be specified."); - String translate(String text) => FlutterI18n.translate(context, text); - - return showModalBottomSheet( - context: context, - useRootNavigator: true, - isScrollControlled: true, - isDismissible: isDismissible, - enableDrag: enableDrag, - backgroundColor: Colors.transparent, - useSafeArea: true, - builder: (BuildContext context) => ConstrainedBox( - constraints: BoxConstraints( - maxHeight: MediaQuery.of(context).size.height * 0.9, - ), - child: Container( - padding: const EdgeInsets.only( - top: 0, - bottom: Sizes.space3XLarge, - right: Sizes.spaceNormal, - left: Sizes.spaceNormal), - decoration: BoxDecoration( - color: bottomSheetBackgroundColor ?? - ColorsTheme.of(context).layerSheetBackground, - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(20), - topRight: Radius.circular(20), - ), - ), - child: Container( - padding: const EdgeInsetsDirectional.only( - start: Sizes.spaceSmall, - end: Sizes.spaceSmall, - bottom: Sizes.space2XLarge), - child: content ?? - Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - MxcAppBarEvenly.title( - titleText: translate(bottomSheetTitle!), - action: hasCloseButton - ? Container( - alignment: Alignment.centerRight, - child: InkWell( - child: const Icon(Icons.close, size: 24), - onTap: () => Navigator.of(context) - .pop(closeButtonReturnValue), - ), - ) - : null, - ), - ...widgets! - ], - ), - ), - ), - ), - ); -} diff --git a/lib/common/bottom_sheets/blueberry_rings_bottom_sheet.dart b/lib/common/bottom_sheets/blueberry_rings_bottom_sheet.dart index 8a469e02..0e4ee735 100644 --- a/lib/common/bottom_sheets/blueberry_rings_bottom_sheet.dart +++ b/lib/common/bottom_sheets/blueberry_rings_bottom_sheet.dart @@ -2,7 +2,6 @@ import 'package:moonchain_wallet/common/bottom_sheets/bottom_sheets.dart'; import 'package:moonchain_wallet/features/dapps/subfeatures/open_dapp/widgets/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_blue_plus/flutter_blue_plus.dart'; -import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:mxc_ui/mxc_ui.dart'; Future showBlueberryRingsBottomSheet( diff --git a/lib/common/bottom_sheets/bottom_sheets.dart b/lib/common/bottom_sheets/bottom_sheets.dart index b986653c..642f3154 100644 --- a/lib/common/bottom_sheets/bottom_sheets.dart +++ b/lib/common/bottom_sheets/bottom_sheets.dart @@ -1,2 +1 @@ export 'blueberry_rings_bottom_sheet.dart'; -export 'base_bottom_sheet.dart'; diff --git a/lib/common/components/recent_transactions/widgets/cancel_bottom_sheet.dart b/lib/common/components/recent_transactions/widgets/cancel_bottom_sheet.dart index 7107fc0b..d41382e4 100644 --- a/lib/common/components/recent_transactions/widgets/cancel_bottom_sheet.dart +++ b/lib/common/components/recent_transactions/widgets/cancel_bottom_sheet.dart @@ -1,6 +1,5 @@ import 'package:moonchain_wallet/common/bottom_sheets/bottom_sheets.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:mxc_ui/mxc_ui.dart'; import 'speed_up_cancel_bottom_sheet_info.dart'; diff --git a/lib/common/components/recent_transactions/widgets/speed_up_bottom_sheet.dart b/lib/common/components/recent_transactions/widgets/speed_up_bottom_sheet.dart index b62c54d5..eb6194a1 100644 --- a/lib/common/components/recent_transactions/widgets/speed_up_bottom_sheet.dart +++ b/lib/common/components/recent_transactions/widgets/speed_up_bottom_sheet.dart @@ -1,6 +1,5 @@ import 'package:moonchain_wallet/common/bottom_sheets/bottom_sheets.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:mxc_ui/mxc_ui.dart'; import 'speed_up_cancel_bottom_sheet_info.dart'; diff --git a/lib/features/dapps/subfeatures/open_dapp/domain/utils/js_channel_utils.dart b/lib/features/dapps/subfeatures/open_dapp/domain/utils/js_channel_utils.dart index 1d5b4df0..3b1cf9fe 100644 --- a/lib/features/dapps/subfeatures/open_dapp/domain/utils/js_channel_utils.dart +++ b/lib/features/dapps/subfeatures/open_dapp/domain/utils/js_channel_utils.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:mxc_logic/mxc_logic.dart'; import '../../open_dapp.dart'; diff --git a/lib/features/dapps/subfeatures/open_dapp/widgets/add_asset_dialog.dart b/lib/features/dapps/subfeatures/open_dapp/widgets/add_asset_dialog.dart index f44d67dc..bff9c67f 100644 --- a/lib/features/dapps/subfeatures/open_dapp/widgets/add_asset_dialog.dart +++ b/lib/features/dapps/subfeatures/open_dapp/widgets/add_asset_dialog.dart @@ -1,4 +1,3 @@ -import 'package:moonchain_wallet/common/bottom_sheets/bottom_sheets.dart'; import 'package:moonchain_wallet/features/dapps/subfeatures/open_dapp/widgets/add_asset_info.dart'; import 'package:flutter/material.dart'; import 'package:mxc_logic/mxc_logic.dart'; diff --git a/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_dialog.dart b/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_dialog.dart index 18d6aef8..bd83463a 100644 --- a/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_dialog.dart +++ b/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_dialog.dart @@ -1,6 +1,7 @@ import 'package:moonchain_wallet/common/bottom_sheets/bottom_sheets.dart'; import 'package:flutter/material.dart'; import 'package:mxc_logic/mxc_logic.dart'; +import 'package:mxc_ui/mxc_ui.dart'; import 'transaction_info.dart'; diff --git a/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_info.dart b/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_info.dart index c282270a..0b99a2cc 100644 --- a/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_info.dart +++ b/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_info.dart @@ -57,46 +57,43 @@ class _TransactionInfoState extends State { ), ), ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 6), - child: Column( - children: [ - amountItem(context), - SingleLineInfoItem( - title: 'balance', - value: widget.balance, - hint: widget.token.symbol, - ), - SingleLineInfoItem( - title: 'network', - value: widget.network, - ), + Column( + children: [ + amountItem(context), + SingleLineInfoItem( + title: 'balance', + value: widget.balance, + hint: widget.token.symbol, + ), + SingleLineInfoItem( + title: 'network', + value: widget.network, + ), + SingleLineInfoItem( + title: 'from', + value: widget.from, + ), + SingleLineInfoItem( + title: 'to', + value: widget.to, + ), + if (TransactionProcessType.confirm != processType) ...[ SingleLineInfoItem( - title: 'from', - value: widget.from, + title: 'estimated_fee', + value: MXCFormatter.formatNumberForUI( + widget.estimatedFee, + ), + hint: widget.networkSymbol, ), SingleLineInfoItem( - title: 'to', - value: widget.to, - ), - if (TransactionProcessType.confirm != processType) ...[ - SingleLineInfoItem( - title: 'estimated_fee', - value: MXCFormatter.formatNumberForUI( - widget.estimatedFee, - ), - hint: widget.networkSymbol, - ), - SingleLineInfoItem( - title: 'max_fee', - value: MXCFormatter.formatNumberForUI( - widget.maxFee, - ), - hint: widget.networkSymbol, + title: 'max_fee', + value: MXCFormatter.formatNumberForUI( + widget.maxFee, ), - ] - ], - ), + hint: widget.networkSymbol, + ), + ] + ], ), const SizedBox(height: 8), transactionButton(context), diff --git a/lib/features/portfolio/subfeatures/transaction_history/widgets/filter_and_sort_dialog.dart b/lib/features/portfolio/subfeatures/transaction_history/widgets/filter_and_sort_dialog.dart index 143e604f..b8ab2fbb 100644 --- a/lib/features/portfolio/subfeatures/transaction_history/widgets/filter_and_sort_dialog.dart +++ b/lib/features/portfolio/subfeatures/transaction_history/widgets/filter_and_sort_dialog.dart @@ -1,8 +1,7 @@ import 'package:moonchain_wallet/common/common.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_i18n/flutter_i18n.dart'; -import 'package:mxc_ui/mxc_ui.dart'; import 'package:mxc_logic/mxc_logic.dart'; +import 'package:mxc_ui/mxc_ui.dart'; import 'filter_and_sort_items.dart'; diff --git a/lib/features/wallet/presentation/widgets/tweet_widget.dart b/lib/features/wallet/presentation/widgets/tweet_widget.dart index dc00909c..90475bb5 100644 --- a/lib/features/wallet/presentation/widgets/tweet_widget.dart +++ b/lib/features/wallet/presentation/widgets/tweet_widget.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; diff --git a/packages/appinio_social_share/example/test/widget_test.dart b/packages/appinio_social_share/example/test/widget_test.dart index d214628f..b177b24a 100644 --- a/packages/appinio_social_share/example/test/widget_test.dart +++ b/packages/appinio_social_share/example/test/widget_test.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import '../lib/main.dart'; +import 'package:appinio_social_share_example/main.dart'; void main() { testWidgets('Verify Platform version', (WidgetTester tester) async { diff --git a/packages/shared b/packages/shared index a0153d0d..fb120b58 160000 --- a/packages/shared +++ b/packages/shared @@ -1 +1 @@ -Subproject commit a0153d0d8684f7ac3f5b00867e1c56bf3a5a6f50 +Subproject commit fb120b585963d4d6fc28e7e9b15f244a482d5313