├── android ├── settings_aar.gradle ├── gradle.properties ├── .gitignore ├── app │ └── src │ │ ├── main │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-ldpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── title_left.png │ │ │ ├── title_more.png │ │ │ ├── ic_launcher.png │ │ │ ├── title_close.png │ │ │ └── title_refresh.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxhdpi │ │ │ └── icon_byte_close.png │ │ │ ├── drawable │ │ │ ├── edittext_cursor.xml │ │ │ ├── button_select.xml │ │ │ ├── edittext_select.xml │ │ │ ├── cfx_confirm_shape_dialog_bg.xml │ │ │ ├── password_shape_dialog_bg.xml │ │ │ ├── edittext_bg.xml │ │ │ ├── edittext_bg_focus.xml │ │ │ ├── item_bg.xml │ │ │ ├── button_bg.xml │ │ │ ├── button_bg_p.xml │ │ │ ├── launch_background.xml │ │ │ └── progress_style.xml │ │ │ ├── anim │ │ │ ├── slide_bottom_out.xml │ │ │ └── slide_bottom_in.xml │ │ │ └── values │ │ │ └── styles.xml │ │ ├── debug │ │ └── AndroidManifest.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── .last_build_id │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── AppIcon20x20.png │ │ │ ├── AppIcon29x29.png │ │ │ ├── AppIcon40x40.png │ │ │ ├── AppIcon76x76.png │ │ │ ├── AppIcon20x20@2x.png │ │ │ ├── AppIcon20x20@3x.png │ │ │ ├── AppIcon29x29@2x.png │ │ │ ├── AppIcon29x29@3x.png │ │ │ ├── AppIcon40x40@2x.png │ │ │ ├── AppIcon40x40@3x.png │ │ │ ├── AppIcon60x60@2x.png │ │ │ ├── AppIcon60x60@3x.png │ │ │ ├── AppIcon76x76@2x.png │ │ │ ├── AppIcon1024x1024.png │ │ │ └── AppIcon83.5x83.5@2x.png │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── Image.imageset │ │ │ └── Contents.json │ ├── AppDelegate.swift │ └── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard ├── build │ └── Pods.build │ │ └── Release-iphonesimulator │ │ ├── FMDB.build │ │ └── dgph │ │ ├── Flutter.build │ │ └── dgph │ │ ├── Toast.build │ │ └── dgph │ │ ├── share.build │ │ └── dgph │ │ ├── sqflite.build │ │ └── dgph │ │ ├── OrderedSet.build │ │ └── dgph │ │ ├── Pods-Runner.build │ │ └── dgph │ │ ├── Reachability.build │ │ └── dgph │ │ ├── fluttertoast.build │ │ └── dgph │ │ ├── image_picker.build │ │ └── dgph │ │ ├── local_auth.build │ │ └── dgph │ │ ├── package_info.build │ │ └── dgph │ │ ├── path_provider.build │ │ └── dgph │ │ ├── url_launcher.build │ │ └── dgph │ │ ├── flutter_qr_reader.build │ │ └── dgph │ │ ├── keyboard_visibility.build │ │ └── dgph │ │ ├── permission_handler.build │ │ └── dgph │ │ ├── shared_preferences.build │ │ └── dgph │ │ ├── webview_flutter.build │ │ └── dgph │ │ ├── flutter_inappwebview.build │ │ └── dgph │ │ └── flutter_keyboard_visibility.build │ │ └── dgph ├── Runner.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── .gitignore └── Podfile ├── images ├── AE.png ├── FC.png ├── qq.png ├── BTC.png ├── BTM.png ├── CFX.png ├── ETH.png ├── logo.png ├── defi_bg.png ├── home_bg.png ├── no_data.png ├── no_net.png ├── search.png ├── swap_my.png ├── tab_app.png ├── tether.png ├── twitter.png ├── weibo.png ├── weixin.png ├── base_logo.png ├── card_top.png ├── chain_add.png ├── defi_info.png ├── defi_list.png ├── defi_logo.png ├── home_aens.png ├── home_game.png ├── home_logo.png ├── home_nft.png ├── home_send.png ├── home_swap.png ├── ic_aeknow.png ├── index_bg1.png ├── index_bg2.png ├── index_bg4.png ├── nav_home.png ├── no_record.png ├── swap_send.png ├── tab_app_p.png ├── tab_home.png ├── tab_swap.png ├── telegram.png ├── together.png ├── token_add.png ├── account_copy.png ├── aepp_forum.png ├── apps_wetrue.png ├── card_bottom.png ├── home_names.png ├── home_receive.png ├── home_record.png ├── home_search.png ├── home_serach.png ├── home_token.png ├── ic_browser.png ├── login_logo.png ├── name_point.png ├── nav_profile.png ├── nav_wallet.png ├── place_holder.png ├── profile_info.png ├── ranking_logo.png ├── ranking_one.png ├── ranking_text.png ├── ranking_two.png ├── setting_node.png ├── setting_save.png ├── splasn_logo.png ├── tab_home_p.png ├── tab_swap_p.png ├── token_send.png ├── wallet_card.png ├── account_create.png ├── account_import.png ├── aepp_superhero.png ├── home_financial.png ├── home_logo_left.png ├── home_settings.png ├── ic_status_defi.png ├── logo_superhero.png ├── name_transfer.png ├── profile_banner.png ├── profile_lanuge.png ├── profile_lines.png ├── profile_wallet.png ├── ranking_three.png ├── token_receive.png ├── wetrue_logo_h.png ├── apple-touch-icon.png ├── check_box_normal.png ├── check_box_select.png ├── home_send_token.png ├── logo_governance.png ├── main_know_icon_1.png ├── main_know_icon_2.png ├── main_know_icon_3.png ├── nav_home_active.png ├── nav_wallet_active.png ├── profile_backups.png ├── profile_connect.png ├── profile_network.png ├── setting_lanuage.png ├── setting_version.png ├── wallet_card_blue.png ├── home_receive_token.png ├── nav_profile_active.png ├── wallet_select_copy.png ├── wallet_select_edit.png ├── profile_reset_password.png ├── wallet_select_confrim.png ├── wallet_select_delete.png ├── profile_display_currency.png ├── profile_account_permissions.png ├── wallet_select_account_add.png └── animation_khzuiqgg.json ├── assets └── fonts │ ├── Ubuntu-Bold.ttf │ ├── Ubuntu-Italic.ttf │ ├── Ubuntu-Light.ttf │ ├── Ubuntu-Medium.ttf │ ├── Ubuntu-Regular.ttf │ ├── Ubuntu-BoldItalic.ttf │ ├── Ubuntu-LightItalic.ttf │ ├── Ubuntu-MediumItalic.ttf │ └── ZCOOLXiaoWei-Regular.ttf ├── .metadata ├── .vscode └── launch.json ├── lib ├── model │ ├── conflux │ │ ├── cfx_nft_token_model.dart │ │ ├── cfx_balance_model.dart │ │ ├── cfx_rpc_model.dart │ │ ├── cfx_nft_preview_model.dart │ │ ├── cfx_nft_balance_model.dart │ │ └── cfx_dapp_list_model.dart │ └── aeternity │ │ ├── chains_model.dart │ │ ├── tx_broadcast_model.dart │ │ ├── block_top_model.dart │ │ ├── th_hash_model.dart │ │ ├── allowance_model.dart │ │ ├── we_true_praise_model.dart │ │ ├── contract_decode_model.dart │ │ ├── banner_model.dart │ │ ├── contract_call_model.dart │ │ ├── contract_balance_model.dart │ │ ├── account_info_model.dart │ │ ├── msg_sign_model.dart │ │ ├── app_store_model.dart │ │ ├── name_owner_model.dart │ │ ├── user_model.dart │ │ ├── ct_token_model.dart │ │ ├── swap_model.dart │ │ ├── swap_coin_model.dart │ │ ├── token_list_model.dart │ │ ├── version_model.dart │ │ ├── contract_info_model.dart │ │ ├── swap_coin_my_model.dart │ │ ├── swap_coin_account_model.dart │ │ ├── base_name_data_model.dart │ │ ├── contract_record_model.dart │ │ ├── name_reverse_model.dart │ │ ├── price_model.dart │ │ ├── swap_order_model.dart │ │ ├── contract_ranking_model.dart │ │ ├── aens_page_model.dart │ │ └── swap_coin_order_model.dart ├── dao │ ├── aeternity │ │ ├── block_top_dao.dart │ │ ├── base_data_dao.dart │ │ ├── aens_info_dao.dart │ │ ├── version_dao.dart │ │ ├── ae_account_error_list_dao.dart │ │ ├── node_test_dao.dart │ │ ├── base_name_data_dao.dart │ │ ├── price_model.dart │ │ ├── banner_dao.dart │ │ ├── user_register_dao.dart │ │ ├── app_store_dao.dart │ │ ├── token_list_dao.dart │ │ ├── swap_coin_dao.dart │ │ ├── swap_my_dao.dart │ │ ├── name_owner_dao.dart │ │ ├── user_login_dao.dart │ │ ├── swap_dao.dart │ │ ├── contract_ranking_dao.dart │ │ ├── swap_coin_account_dao.dart │ │ ├── account_info_dao.dart │ │ ├── swap_my_buy_dao.dart │ │ ├── swap_my_sell_dao.dart │ │ ├── swap_coin_my_dao.dart │ │ ├── wallet_record_dao.dart │ │ ├── aens_register_dao.dart │ │ ├── aens_update_dao.dart │ │ ├── aens_preclaim_dao.dart │ │ ├── contract_balance_dao.dart │ │ ├── contract_info_dao.dart │ │ ├── swap_coin_order_dao.dart │ │ ├── token_record_dao.dart │ │ ├── name_reverse_dao.dart │ │ ├── wetrue_topic_dao.dart │ │ ├── token_send_dao.dart │ │ ├── wetrue_praise_dao.dart │ │ ├── tx_broadcast_dao.dart │ │ ├── th_hash_dao.dart │ │ ├── allowance_dao.dart │ │ ├── wetrue_config_dao.dart │ │ ├── contract_transfer_call_dao.dart │ │ ├── wetrue_comment_list_dao.dart │ │ ├── aens_page_dao.dart │ │ ├── wetrue_list_dao.dart │ │ ├── contract_record_dao.dart │ │ ├── contract_decode_dao.dart │ │ └── contract_call_dao.dart │ └── conflux │ │ ├── cfx_dapp_list_dao.dart │ │ ├── cfx_balance_dao.dart │ │ ├── cfx_token_list_dao.dart │ │ ├── cfx_nft_balance_dao.dart │ │ ├── cfx_token_address_dao.dart │ │ ├── cfx_transfer_hash_dao.dart │ │ ├── cfx_nft_token_dao.dart │ │ ├── cfx_transfer_dao.dart │ │ ├── cfx_nft_preview_dao.dart │ │ └── cfx_crc20_transfer_dao.dart ├── event │ └── language_event.dart ├── manager │ ├── plugin_manager.dart │ └── ct_token_manager.dart ├── widget │ ├── password_widget.dart │ └── custom_b_t_route.dart ├── page │ ├── aeternity │ │ └── ae_swaps_page.dart │ └── general │ │ ├── photo_page.dart │ │ └── scan_page.dart ├── utils │ └── RelativeDateFormat.dart └── generated │ └── intl │ └── messages_all.dart ├── README.md ├── test └── widget_test.dart └── .gitignore /android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /ios/Flutter/.last_build_id: -------------------------------------------------------------------------------- 1 | 6fb6e884f755786f1db0a91deb6b54b1 -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /images/AE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/AE.png -------------------------------------------------------------------------------- /images/FC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/FC.png -------------------------------------------------------------------------------- /images/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/qq.png -------------------------------------------------------------------------------- /images/BTC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/BTC.png -------------------------------------------------------------------------------- /images/BTM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/BTM.png -------------------------------------------------------------------------------- /images/CFX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/CFX.png -------------------------------------------------------------------------------- /images/ETH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/ETH.png -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/logo.png -------------------------------------------------------------------------------- /images/defi_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/defi_bg.png -------------------------------------------------------------------------------- /images/home_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_bg.png -------------------------------------------------------------------------------- /images/no_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/no_data.png -------------------------------------------------------------------------------- /images/no_net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/no_net.png -------------------------------------------------------------------------------- /images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/search.png -------------------------------------------------------------------------------- /images/swap_my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/swap_my.png -------------------------------------------------------------------------------- /images/tab_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/tab_app.png -------------------------------------------------------------------------------- /images/tether.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/tether.png -------------------------------------------------------------------------------- /images/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/twitter.png -------------------------------------------------------------------------------- /images/weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/weibo.png -------------------------------------------------------------------------------- /images/weixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/weixin.png -------------------------------------------------------------------------------- /images/base_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/base_logo.png -------------------------------------------------------------------------------- /images/card_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/card_top.png -------------------------------------------------------------------------------- /images/chain_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/chain_add.png -------------------------------------------------------------------------------- /images/defi_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/defi_info.png -------------------------------------------------------------------------------- /images/defi_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/defi_list.png -------------------------------------------------------------------------------- /images/defi_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/defi_logo.png -------------------------------------------------------------------------------- /images/home_aens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_aens.png -------------------------------------------------------------------------------- /images/home_game.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_game.png -------------------------------------------------------------------------------- /images/home_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_logo.png -------------------------------------------------------------------------------- /images/home_nft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_nft.png -------------------------------------------------------------------------------- /images/home_send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_send.png -------------------------------------------------------------------------------- /images/home_swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_swap.png -------------------------------------------------------------------------------- /images/ic_aeknow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/ic_aeknow.png -------------------------------------------------------------------------------- /images/index_bg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/index_bg1.png -------------------------------------------------------------------------------- /images/index_bg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/index_bg2.png -------------------------------------------------------------------------------- /images/index_bg4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/index_bg4.png -------------------------------------------------------------------------------- /images/nav_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/nav_home.png -------------------------------------------------------------------------------- /images/no_record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/no_record.png -------------------------------------------------------------------------------- /images/swap_send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/swap_send.png -------------------------------------------------------------------------------- /images/tab_app_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/tab_app_p.png -------------------------------------------------------------------------------- /images/tab_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/tab_home.png -------------------------------------------------------------------------------- /images/tab_swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/tab_swap.png -------------------------------------------------------------------------------- /images/telegram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/telegram.png -------------------------------------------------------------------------------- /images/together.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/together.png -------------------------------------------------------------------------------- /images/token_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/token_add.png -------------------------------------------------------------------------------- /images/account_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/account_copy.png -------------------------------------------------------------------------------- /images/aepp_forum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/aepp_forum.png -------------------------------------------------------------------------------- /images/apps_wetrue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/apps_wetrue.png -------------------------------------------------------------------------------- /images/card_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/card_bottom.png -------------------------------------------------------------------------------- /images/home_names.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_names.png -------------------------------------------------------------------------------- /images/home_receive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_receive.png -------------------------------------------------------------------------------- /images/home_record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_record.png -------------------------------------------------------------------------------- /images/home_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_search.png -------------------------------------------------------------------------------- /images/home_serach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_serach.png -------------------------------------------------------------------------------- /images/home_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_token.png -------------------------------------------------------------------------------- /images/ic_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/ic_browser.png -------------------------------------------------------------------------------- /images/login_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/login_logo.png -------------------------------------------------------------------------------- /images/name_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/name_point.png -------------------------------------------------------------------------------- /images/nav_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/nav_profile.png -------------------------------------------------------------------------------- /images/nav_wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/nav_wallet.png -------------------------------------------------------------------------------- /images/place_holder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/place_holder.png -------------------------------------------------------------------------------- /images/profile_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_info.png -------------------------------------------------------------------------------- /images/ranking_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/ranking_logo.png -------------------------------------------------------------------------------- /images/ranking_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/ranking_one.png -------------------------------------------------------------------------------- /images/ranking_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/ranking_text.png -------------------------------------------------------------------------------- /images/ranking_two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/ranking_two.png -------------------------------------------------------------------------------- /images/setting_node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/setting_node.png -------------------------------------------------------------------------------- /images/setting_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/setting_save.png -------------------------------------------------------------------------------- /images/splasn_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/splasn_logo.png -------------------------------------------------------------------------------- /images/tab_home_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/tab_home_p.png -------------------------------------------------------------------------------- /images/tab_swap_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/tab_swap_p.png -------------------------------------------------------------------------------- /images/token_send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/token_send.png -------------------------------------------------------------------------------- /images/wallet_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/wallet_card.png -------------------------------------------------------------------------------- /images/account_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/account_create.png -------------------------------------------------------------------------------- /images/account_import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/account_import.png -------------------------------------------------------------------------------- /images/aepp_superhero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/aepp_superhero.png -------------------------------------------------------------------------------- /images/home_financial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_financial.png -------------------------------------------------------------------------------- /images/home_logo_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_logo_left.png -------------------------------------------------------------------------------- /images/home_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_settings.png -------------------------------------------------------------------------------- /images/ic_status_defi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/ic_status_defi.png -------------------------------------------------------------------------------- /images/logo_superhero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/logo_superhero.png -------------------------------------------------------------------------------- /images/name_transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/name_transfer.png -------------------------------------------------------------------------------- /images/profile_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_banner.png -------------------------------------------------------------------------------- /images/profile_lanuge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_lanuge.png -------------------------------------------------------------------------------- /images/profile_lines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_lines.png -------------------------------------------------------------------------------- /images/profile_wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_wallet.png -------------------------------------------------------------------------------- /images/ranking_three.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/ranking_three.png -------------------------------------------------------------------------------- /images/token_receive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/token_receive.png -------------------------------------------------------------------------------- /images/wetrue_logo_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/wetrue_logo_h.png -------------------------------------------------------------------------------- /assets/fonts/Ubuntu-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/assets/fonts/Ubuntu-Bold.ttf -------------------------------------------------------------------------------- /images/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/apple-touch-icon.png -------------------------------------------------------------------------------- /images/check_box_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/check_box_normal.png -------------------------------------------------------------------------------- /images/check_box_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/check_box_select.png -------------------------------------------------------------------------------- /images/home_send_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_send_token.png -------------------------------------------------------------------------------- /images/logo_governance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/logo_governance.png -------------------------------------------------------------------------------- /images/main_know_icon_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/main_know_icon_1.png -------------------------------------------------------------------------------- /images/main_know_icon_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/main_know_icon_2.png -------------------------------------------------------------------------------- /images/main_know_icon_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/main_know_icon_3.png -------------------------------------------------------------------------------- /images/nav_home_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/nav_home_active.png -------------------------------------------------------------------------------- /images/nav_wallet_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/nav_wallet_active.png -------------------------------------------------------------------------------- /images/profile_backups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_backups.png -------------------------------------------------------------------------------- /images/profile_connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_connect.png -------------------------------------------------------------------------------- /images/profile_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_network.png -------------------------------------------------------------------------------- /images/setting_lanuage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/setting_lanuage.png -------------------------------------------------------------------------------- /images/setting_version.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/setting_version.png -------------------------------------------------------------------------------- /images/wallet_card_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/wallet_card_blue.png -------------------------------------------------------------------------------- /assets/fonts/Ubuntu-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/assets/fonts/Ubuntu-Italic.ttf -------------------------------------------------------------------------------- /assets/fonts/Ubuntu-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/assets/fonts/Ubuntu-Light.ttf -------------------------------------------------------------------------------- /assets/fonts/Ubuntu-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/assets/fonts/Ubuntu-Medium.ttf -------------------------------------------------------------------------------- /images/home_receive_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/home_receive_token.png -------------------------------------------------------------------------------- /images/nav_profile_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/nav_profile_active.png -------------------------------------------------------------------------------- /images/wallet_select_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/wallet_select_copy.png -------------------------------------------------------------------------------- /images/wallet_select_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/wallet_select_edit.png -------------------------------------------------------------------------------- /assets/fonts/Ubuntu-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/assets/fonts/Ubuntu-Regular.ttf -------------------------------------------------------------------------------- /images/profile_reset_password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_reset_password.png -------------------------------------------------------------------------------- /images/wallet_select_confrim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/wallet_select_confrim.png -------------------------------------------------------------------------------- /images/wallet_select_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/wallet_select_delete.png -------------------------------------------------------------------------------- /assets/fonts/Ubuntu-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/assets/fonts/Ubuntu-BoldItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/Ubuntu-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/assets/fonts/Ubuntu-LightItalic.ttf -------------------------------------------------------------------------------- /images/profile_display_currency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_display_currency.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /assets/fonts/Ubuntu-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/assets/fonts/Ubuntu-MediumItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/ZCOOLXiaoWei-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/assets/fonts/ZCOOLXiaoWei-Regular.ttf -------------------------------------------------------------------------------- /images/profile_account_permissions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/profile_account_permissions.png -------------------------------------------------------------------------------- /images/wallet_select_account_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/images/wallet_select_account_add.png -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/mipmap-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/title_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/title_left.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/title_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/title_more.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/title_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/title_close.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/FMDB.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/title_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/title_refresh.png -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/Flutter.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/Toast.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/share.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/sqflite.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/icon_byte_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/android/app/src/main/res/drawable-xxhdpi/icon_byte_close.png -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/OrderedSet.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/Pods-Runner.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/Reachability.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/fluttertoast.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/image_picker.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/local_auth.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/package_info.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/path_provider.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/url_launcher.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon20x20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon20x20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon29x29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon29x29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon40x40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon76x76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/flutter_qr_reader.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/keyboard_visibility.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/permission_handler.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/shared_preferences.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/webview_flutter.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon76x76@2x.png -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/flutter_inappwebview.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon1024x1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/build/Pods.build/Release-iphonesimulator/flutter_keyboard_visibility.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.04 Jun 8 202114:00:05/Users sunbaixin DocumentsgitBox-aepp-mobileiosPods -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunbx/box-aepp-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/edittext_cursor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/button_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/edittext_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/cfx_confirm_shape_dialog_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: b041144f833e05cf463b8887fa12efdec9493488 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/password_shape_dialog_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/edittext_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/edittext_bg_focus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/item_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/button_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/button_bg_p.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Flutter", 9 | "program": "lib/main.dart", 10 | "request": "launch", 11 | "type": "dart" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/anim/slide_bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/anim/slide_bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /lib/model/conflux/cfx_nft_token_model.dart: -------------------------------------------------------------------------------- 1 | class CfxNftTokenModel { 2 | int code; 3 | List data; 4 | 5 | CfxNftTokenModel({this.code, this.data}); 6 | 7 | CfxNftTokenModel.fromJson(Map json) { 8 | code = json['code']; 9 | data = json['data'].cast(); 10 | } 11 | 12 | Map toJson() { 13 | final Map data = new Map(); 14 | data['code'] = this.code; 15 | data['data'] = this.data; 16 | return data; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/model/aeternity/chains_model.dart: -------------------------------------------------------------------------------- 1 | class ChainsModel { 2 | String name; 3 | String nameFull; 4 | bool isSelect = false; 5 | 6 | ChainsModel({this.name, this.nameFull}); 7 | 8 | ChainsModel.fromJson(Map json) { 9 | name = json['name']; 10 | nameFull = json['name_full']; 11 | isSelect = json['is_select']; 12 | } 13 | 14 | Map toJson() { 15 | final Map data = new Map(); 16 | data['name'] = this.name; 17 | data['is_select'] = this.isSelect; 18 | return data; 19 | } 20 | } -------------------------------------------------------------------------------- /lib/dao/aeternity/block_top_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/block_top_model.dart'; 5 | import 'package:dio/dio.dart'; 6 | 7 | class BlockTopDao { 8 | static Future fetch() async { 9 | Response response = await Dio().post(BLOCK_TOP); 10 | if (response.statusCode == 200) { 11 | var data = jsonDecode(response.toString()); 12 | BlockTopModel model = BlockTopModel.fromJson(data); 13 | return model; 14 | } else { 15 | throw Exception('Failed to load BlockTopModel.json'); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/event/language_event.dart: -------------------------------------------------------------------------------- 1 | import 'package:event_bus/event_bus.dart'; 2 | /// 创建EventBus 3 | EventBus eventBus = EventBus(); 4 | 5 | class SwapEvent { 6 | SwapEvent(); 7 | } 8 | 9 | class AddNewAccount { 10 | AddNewAccount(); 11 | } 12 | 13 | class AddImportAccount { 14 | AddImportAccount(); 15 | } 16 | 17 | 18 | 19 | class LanguageEvent { 20 | LanguageEvent(); 21 | } 22 | class DefiEvent { 23 | DefiEvent(); 24 | } 25 | 26 | class AccountUpdateEvent { 27 | AccountUpdateEvent(); 28 | } 29 | 30 | class AccountUpdateNameEvent { 31 | AccountUpdateNameEvent(); 32 | } 33 | 34 | 35 | class NameEvent { 36 | NameEvent(); 37 | } -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /lib/dao/aeternity/base_data_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/base_data_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:dio/dio.dart'; 7 | 8 | class BaseDataDao { 9 | static Future fetch() async { 10 | Response response = await Dio().post(BASE_DATA); 11 | if (response.statusCode == 200) { 12 | var data = jsonDecode(response.toString()); 13 | BaseDataModel model = BaseDataModel.fromJson(data); 14 | return model; 15 | } else { 16 | throw Exception('Failed to load BaseDataModel.json'); 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /lib/dao/aeternity/aens_info_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/aens_info_model.dart'; 5 | import 'package:dio/dio.dart'; 6 | 7 | class AensInfoDao { 8 | static Future fetch(String name) async { 9 | Map params = new Map(); 10 | params['name'] = name; 11 | Response response = await Dio().post(NAME_INFO, queryParameters: params); 12 | if (response.statusCode == 200) { 13 | var data = jsonDecode(response.toString()); 14 | AensInfoModel model = AensInfoModel.fromJson(data); 15 | return model; 16 | } else { 17 | throw Exception('Failed to load AensInfoModel.json'); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/dao/aeternity/version_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/base_data_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/version_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | class VersionDao { 10 | static Future fetch() async { 11 | Response response = await Dio().post(VERSION); 12 | if (response.statusCode == 200) { 13 | var data = jsonDecode(response.toString()); 14 | VersionModel model = VersionModel.fromJson(data); 15 | return model; 16 | } else { 17 | throw Exception('Failed to load VersionModel.json'); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /lib/dao/aeternity/ae_account_error_list_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:box/model/conflux/cfx_dapp_list_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | 11 | class AeAccountErrorListDao { 12 | static Future fetch() async { 13 | Response response = await Dio().get(ACCOUNT_ERROR_LIST+"account_error.json"); 14 | if (response.statusCode == 200) { 15 | return response.toString(); 16 | } else { 17 | throw Exception('Failed to load CfxDappListModel.json'); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/dao/aeternity/node_test_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:dio/dio.dart'; 7 | 8 | import '../../main.dart'; 9 | 10 | class NodeTestDao { 11 | static Future fetch(String nodeUrl, String compilerUrl) async { 12 | Response responseNode = await Dio().get(nodeUrl + "/v2/blocks/top"); 13 | if (responseNode.statusCode != 200) { 14 | return false; 15 | } 16 | 17 | Response responseCompiler = await Dio().get(compilerUrl + "/version"); 18 | if (responseCompiler.statusCode != 200) { 19 | return false; 20 | } 21 | return true; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /lib/dao/aeternity/base_name_data_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/base_data_model.dart'; 5 | import 'package:box/model/aeternity/base_name_data_model.dart'; 6 | import 'package:box/model/aeternity/block_top_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | class BaseNameDataDao { 10 | static Future fetch() async { 11 | Response response = await Dio().post(BASE_NAME_DATA); 12 | if (response.statusCode == 200) { 13 | var data = jsonDecode(response.toString()); 14 | BaseNameDataModel model = BaseNameDataModel.fromJson(data); 15 | return model; 16 | } else { 17 | throw Exception('Failed to load BaseNameDataModel.json'); 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /lib/dao/aeternity/price_model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/base_data_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/price_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | class PriceDao { 10 | static Future fetch(String ids, String type) async { 11 | Response response = await Dio().get(PRICE + "?ids=" + ids + "&vs_currencies=" + type); 12 | if (response.statusCode == 200) { 13 | var data = jsonDecode(response.toString()); 14 | PriceModel model = PriceModel.fromJson(data); 15 | return model; 16 | } else { 17 | throw Exception('Failed to load PriceModel.json'); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/dao/aeternity/banner_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/aens_info_model.dart'; 5 | import 'package:box/model/aeternity/banner_model.dart'; 6 | import 'package:box/model/aeternity/token_list_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | class BannerDao { 10 | static Future fetch() async { 11 | Map params = new Map(); 12 | Response response = await Dio().post(BANNER, queryParameters: params); 13 | if (response.statusCode == 200) { 14 | var data = jsonDecode(response.toString()); 15 | BannerModel model = BannerModel.fromJson(data); 16 | return model; 17 | } else { 18 | throw Exception('Failed to load BannerModel.json'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/dao/aeternity/user_register_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/user_model.dart'; 5 | import 'package:box/model/aeternity/account_info_model.dart'; 6 | import 'package:box/model/aeternity/block_top_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | 10 | class UserRegisterDao { 11 | static Future fetch() async { 12 | Map params = new Map(); 13 | Response response = await Dio().post(USER_REGISTER, queryParameters: params); 14 | if (response.statusCode == 200) { 15 | var data = jsonDecode(response.toString()); 16 | UserModel model = UserModel.fromJson(data); 17 | return model; 18 | } else { 19 | throw Exception('Failed to load UserRegisterModel.json'); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/dao/aeternity/app_store_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_info_model.dart'; 6 | import 'package:box/model/aeternity/app_store_model.dart'; 7 | import 'package:box/model/aeternity/swap_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | class AppStoreDao { 11 | static Future fetch() async { 12 | Map params = new Map(); 13 | Response response = await Dio().post(APP_STORE, queryParameters: params); 14 | if (response.statusCode == 200) { 15 | var data = jsonDecode(response.toString()); 16 | AppStoreModel model = AppStoreModel.fromJson(data); 17 | return model; 18 | } else { 19 | throw Exception('Failed to load AppStoreModel.json'); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/progress_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /lib/dao/aeternity/token_list_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/aens_info_model.dart'; 5 | import 'package:box/model/aeternity/token_list_model.dart'; 6 | import 'package:dio/dio.dart'; 7 | 8 | class TokenListDao { 9 | static Future fetch(String address,String type) async { 10 | Map params = new Map(); 11 | params['address'] = address; 12 | params['type'] = type; 13 | Response response = await Dio().post(TOKEN_LIST, queryParameters: params); 14 | if (response.statusCode == 200) { 15 | var data = jsonDecode(response.toString()); 16 | TokenListModel model = TokenListModel.fromJson(data); 17 | return model; 18 | } else { 19 | throw Exception('Failed to load TokenListModel.json'); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/dao/aeternity/swap_coin_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/swap_coin_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | import '../../main.dart'; 10 | 11 | class SwapCoinDao { 12 | static Future fetch() async { 13 | Map params = new Map(); 14 | Response response = await Dio().post(SWAP_COIN_LIST,queryParameters: params); 15 | if (response.statusCode == 200) { 16 | var data = jsonDecode(response.toString()); 17 | SwapCoinModel model = SwapCoinModel.fromJson(data); 18 | return model; 19 | } else { 20 | throw Exception('Failed to load SwapCoinModel.json'); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/dao/aeternity/swap_my_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_info_model.dart'; 6 | import 'package:box/model/aeternity/swap_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | class SwapMyDao { 10 | static Future fetch() async { 11 | Map params = new Map(); 12 | params['ct_id'] = BoxApp.SWAP_CONTRACT; 13 | params['address'] =await BoxApp.getAddress(); 14 | Response response = await Dio().post(SWAP_MY_LIST, queryParameters: params); 15 | if (response.statusCode == 200) { 16 | var data = jsonDecode(response.toString()); 17 | SwapModel model = SwapModel.fromJson(data); 18 | return model; 19 | } else { 20 | throw Exception('Failed to load SwapModel.json'); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/dao/conflux/cfx_dapp_list_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:box/model/conflux/cfx_dapp_list_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | 11 | class CfxDappListDao { 12 | static Future fetch(String language) async { 13 | Response response = await Dio().get(CFX_DAPP_LIST+"cfx_dapp_"+language+".json"); 14 | if (response.statusCode == 200) { 15 | var data = jsonDecode(response.toString()); 16 | CfxDappListModel model = CfxDappListModel.fromJson(data); 17 | return model; 18 | } else { 19 | throw Exception('Failed to load CfxDappListModel.json'); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/dao/aeternity/name_owner_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_info_model.dart'; 6 | import 'package:box/model/aeternity/name_owner_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | class NameOwnerDao { 10 | static Future fetch(String name) async { 11 | String nodeUrl = await BoxApp.getNodeUrl(); 12 | if (nodeUrl.isEmpty) { 13 | nodeUrl = "https://node.aeasy.io"; 14 | } 15 | Response response = await Dio().get(nodeUrl+NAME_OWNER + name); 16 | if (response.statusCode == 200) { 17 | var data = jsonDecode(response.toString()); 18 | NameOwnerModel model = NameOwnerModel.fromJson(data); 19 | return model; 20 | } else { 21 | throw Exception('Failed to load NameOwnerModel.json'); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/dao/aeternity/user_login_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/user_model.dart'; 5 | import 'package:box/model/aeternity/account_info_model.dart'; 6 | import 'package:box/model/aeternity/block_top_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | import '../../main.dart'; 10 | 11 | class UserLoginDao { 12 | static Future fetch(String mnemonic) async { 13 | Map params = new Map(); 14 | params["mnemonic"] = mnemonic; 15 | Response response = await Dio().post(USER_LOGIN, queryParameters: params); 16 | if (response.statusCode == 200) { 17 | var data = jsonDecode(response.toString()); 18 | UserModel model = UserModel.fromJson(data); 19 | return model; 20 | } else { 21 | throw Exception('Failed to load UserLoginDao'); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ![Alt text](https://github.com/sunbx/Box-aepp-mobile/blob/master/images/logo.png) 3 | # Box aepp 4 | 5 | The ecological entry of infinite possibilities 6 | 7 | 8 | ## Getting Started 9 | 10 | Box AEPP is the Flutter project, so please follow the Flutter environment before running. After successful installation, you can directly compile, open and run. JS-SDK is nested inside the app, so the app is completely de-centered without any security problems 11 | 12 | Support AE transfer, check the balance 13 | Support AEX9 ABC(AEX-9 token) transfer 14 | Support domain display latest, about to expire, etc 15 | Support AENS registration, update, bidding 16 | Support Defi pledge extraction and V1-V2 technical solution to produce ABC 17 | Support account transaction record view 18 | Support cold wallet, mnemonic word generation, mnemonic word login 19 | 20 | account 283122529@qq.com 21 | @Biaxin 22 | 23 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/manager/plugin_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | 3 | class PluginManager { 4 | static const MethodChannel _channel = 5 | const MethodChannel('BOX_DART_TO_NAV'); 6 | 7 | static Future pushActivity(Map params) async { 8 | String resultStr = await _channel.invokeMethod('jumpToActivity', params); 9 | return resultStr; 10 | } 11 | static Future getGasCFX(Map params) async { 12 | String resultStr = await _channel.invokeMethod('getGasCFX', params); 13 | return resultStr; 14 | } 15 | static Future signTransaction(Map params) async { 16 | String resultStr = await _channel.invokeMethod('signTransaction', params); 17 | return resultStr; 18 | } 19 | static Future signTransactionError(Map params) async { 20 | String resultStr = await _channel.invokeMethod('signTransactionError', params); 21 | return resultStr; 22 | } 23 | } -------------------------------------------------------------------------------- /lib/dao/aeternity/swap_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_info_model.dart'; 6 | import 'package:box/model/aeternity/swap_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | class SwapDao { 10 | static Future fetch(String coinAdress) async { 11 | Map params = new Map(); 12 | params['ct_id'] = BoxApp.SWAP_CONTRACT; 13 | params['coin_address'] = coinAdress; 14 | params['address'] =await BoxApp.getAddress(); 15 | Response response = await Dio().post(SWAP_LIST, queryParameters: params); 16 | if (response.statusCode == 200) { 17 | var data = jsonDecode(response.toString()); 18 | SwapModel model = SwapModel.fromJson(data); 19 | return model; 20 | } else { 21 | throw Exception('Failed to load SwapModel.json'); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/dao/aeternity/contract_ranking_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/contract_ranking_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | import '../../main.dart'; 10 | 11 | class ContractRankingDao { 12 | static Future fetch() async { 13 | Map params = new Map(); 14 | params['ct_id'] = BoxApp.ABC_CONTRACT_AEX9; 15 | Response response = await Dio().post(CONTRACT_RANKING,queryParameters: params); 16 | if (response.statusCode == 200) { 17 | var data = jsonDecode(response.toString()); 18 | RankingModel model = RankingModel.fromJson(data); 19 | return model; 20 | } else { 21 | throw Exception('Failed to load RankingModel.json'); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/dao/aeternity/swap_coin_account_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/swap_coin_account_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | import '../../main.dart'; 10 | 11 | class SwapCoinAccountDao { 12 | static Future fetch(String ctId) async { 13 | Map params = new Map(); 14 | params["ct_id"] = ctId; 15 | Response response = await Dio().post(SWAP_COIN_ACCOUNT,queryParameters: params); 16 | if (response.statusCode == 200) { 17 | var data = jsonDecode(response.toString()); 18 | SwapCoinAccountModel model = SwapCoinAccountModel.fromJson(data); 19 | return model; 20 | } else { 21 | throw Exception('Failed to load SwapCoinAccountModel.json'); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/dao/conflux/cfx_balance_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | import '../../main.dart'; 10 | 11 | class CfxBalanceDao { 12 | static Future fetch() async { 13 | Map params = new Map(); 14 | var address = await BoxApp.getAddress(); 15 | params["address"] = address; 16 | Response response = await Dio().post(CFX_BALANCE,queryParameters: params); 17 | if (response.statusCode == 200) { 18 | var data = jsonDecode(response.toString()); 19 | CfxBalanceModel model = CfxBalanceModel.fromJson(data); 20 | return model; 21 | } else { 22 | throw Exception('Failed to load CfxBalanceModel.json'); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/dao/aeternity/account_info_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:dio/dio.dart'; 7 | 8 | import '../../main.dart'; 9 | 10 | class AccountInfoDao { 11 | static Future fetch({String address = ''}) async { 12 | Map params = new Map(); 13 | if(address.isEmpty){ 14 | address = await BoxApp.getAddress(); 15 | } 16 | params["address"] = address; 17 | Response response = await Dio().post(ACCOUNT_INFO,queryParameters: params); 18 | if (response.statusCode == 200) { 19 | var data = jsonDecode(response.toString()); 20 | AccountInfoModel model = AccountInfoModel.fromJson(data); 21 | return model; 22 | } else { 23 | throw Exception('Failed to load AccountInfoModel.json'); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/dao/aeternity/swap_my_buy_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_info_model.dart'; 6 | import 'package:box/model/aeternity/swap_model.dart'; 7 | import 'package:box/model/aeternity/swap_order_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | class SwapMyBuyDao { 11 | static Future fetch() async { 12 | Map params = new Map(); 13 | params['ct_id'] = BoxApp.SWAP_CONTRACT; 14 | params['address'] =await BoxApp.getAddress(); 15 | Response response = await Dio().post(SWAP_MY_BUY_LIST, queryParameters: params); 16 | if (response.statusCode == 200) { 17 | var data = jsonDecode(response.toString()); 18 | SwapOrderModel model = SwapOrderModel.fromJson(data); 19 | return model; 20 | } else { 21 | throw Exception('Failed to load SwapOrderModel.json'); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/dao/aeternity/swap_my_sell_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_info_model.dart'; 6 | import 'package:box/model/aeternity/swap_model.dart'; 7 | import 'package:box/model/aeternity/swap_order_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | class SwapMySellDao { 11 | static Future fetch() async { 12 | Map params = new Map(); 13 | params['ct_id'] = BoxApp.SWAP_CONTRACT; 14 | params['address'] =await BoxApp.getAddress(); 15 | Response response = await Dio().post(SWAP_MY_SELL_LIST, queryParameters: params); 16 | if (response.statusCode == 200) { 17 | var data = jsonDecode(response.toString()); 18 | SwapOrderModel model = SwapOrderModel.fromJson(data); 19 | return model; 20 | } else { 21 | throw Exception('Failed to load SwapOrderModel.json'); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/dao/aeternity/swap_coin_my_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/swap_coin_account_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | import '../../main.dart'; 10 | 11 | class SwapCoinMyDao { 12 | static Future fetch() async { 13 | Map params = new Map(); 14 | var address = await BoxApp.getAddress(); 15 | params["address"] = address; 16 | Response response = await Dio().post(SWAP_COIN_ACCOUNT_MY, queryParameters: params); 17 | if (response.statusCode == 200) { 18 | var data = jsonDecode(response.toString()); 19 | SwapCoinAccountModel model = SwapCoinAccountModel.fromJson(data); 20 | return model; 21 | } else { 22 | throw Exception('Failed to load SwapCoinAccountModel.json'); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/dao/aeternity/wallet_record_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_page_model.dart'; 6 | import 'package:box/model/aeternity/wallet_record_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | class WalletRecordDao { 10 | static Future fetch(int page) async { 11 | Map params = new Map(); 12 | var address = await BoxApp.getAddress(); 13 | 14 | params["address"] = address; 15 | params["page"] = page.toString(); 16 | Response response = await Dio().post(WALLET_RECORD, queryParameters: params); 17 | 18 | if (response.statusCode == 200) { 19 | var data = jsonDecode(response.toString()); 20 | WalletTransferRecordModel model = WalletTransferRecordModel.fromJson(data); 21 | return model; 22 | } else { 23 | throw Exception('Failed to load WalletTransferRecordModel.json'); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/dao/aeternity/aens_register_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_register_model.dart'; 6 | import 'package:box/model/aeternity/block_top_model.dart'; 7 | import 'package:box/model/aeternity/msg_sign_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | class AensRegisterDao { 11 | static Future fetch(String name, String address,String nameSalt) async { 12 | Map params = new Map(); 13 | params['name'] = name; 14 | params['address'] = address; 15 | params['nameSalt'] = nameSalt; 16 | Response response = await Dio().post(NAME_ADD, queryParameters: params); 17 | if (response.statusCode == 200) { 18 | var data = jsonDecode(response.toString()); 19 | MsgSignModel model = MsgSignModel.fromJson(data); 20 | return model; 21 | } else { 22 | throw Exception('Failed to load AensRegisterModel.json'); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/dao/conflux/cfx_token_list_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:box/model/conflux/cfx_tokens_list_model.dart'; 8 | import 'package:box/model/conflux/cfx_transfer_model.dart'; 9 | import 'package:dio/dio.dart'; 10 | 11 | import '../../main.dart'; 12 | 13 | class CfxTokenListDao { 14 | static Future fetch() async { 15 | Map params = new Map(); 16 | Response response = await Dio().post(CFX_TOKENS, queryParameters: params); 17 | if (response.statusCode == 200) { 18 | var data = jsonDecode(response.toString()); 19 | CfxTokensListModel model = CfxTokensListModel.fromJson(data); 20 | return model; 21 | } else { 22 | throw Exception('Failed to load CfxTokensListModel.json'); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/dao/aeternity/aens_update_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_register_model.dart'; 6 | import 'package:box/model/aeternity/aens_update_model.dart'; 7 | import 'package:box/model/aeternity/block_top_model.dart'; 8 | import 'package:box/model/aeternity/msg_sign_model.dart'; 9 | import 'package:dio/dio.dart'; 10 | 11 | class AensUpdaterDao { 12 | static Future fetch(String name, String address) async { 13 | Map params = new Map(); 14 | params['name'] = name; 15 | params['address'] = address; 16 | Response response = await Dio().post(NAME_UPDATE, queryParameters: params); 17 | if (response.statusCode == 200) { 18 | var data = jsonDecode(response.toString()); 19 | MsgSignModel model = MsgSignModel.fromJson(data); 20 | return model; 21 | } else { 22 | throw Exception('Failed to load MsgSignModel.json'); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/dao/aeternity/aens_preclaim_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_register_model.dart'; 6 | import 'package:box/model/aeternity/aens_update_model.dart'; 7 | import 'package:box/model/aeternity/block_top_model.dart'; 8 | import 'package:box/model/aeternity/msg_sign_model.dart'; 9 | import 'package:dio/dio.dart'; 10 | 11 | class AensPreclaimDao { 12 | static Future fetch(String name, String address) async { 13 | Map params = new Map(); 14 | params['name'] = name; 15 | params['address'] = address; 16 | Response response = await Dio().post(NAME_PRECLAI, queryParameters: params); 17 | if (response.statusCode == 200) { 18 | var data = jsonDecode(response.toString()); 19 | MsgSignModel model = MsgSignModel.fromJson(data); 20 | return model; 21 | } else { 22 | throw Exception('Failed to load MsgSignModel.json'); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/dao/aeternity/contract_balance_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/contract_balance_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | import '../../main.dart'; 10 | 11 | class ContractBalanceDao { 12 | static Future fetch(String ctId) async { 13 | Map params = new Map(); 14 | var address = await BoxApp.getAddress(); 15 | params["address"] = address; 16 | params["ct_id"] = ctId; 17 | Response response = await Dio().post(CONTRACT_BALANCE,queryParameters: params); 18 | if (response.statusCode == 200) { 19 | var data = jsonDecode(response.toString()); 20 | ContractBalanceModel model = ContractBalanceModel.fromJson(data); 21 | return model; 22 | } else { 23 | throw Exception('Failed to load ContractBalanceModel.json'); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/dao/conflux/cfx_nft_balance_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:box/model/conflux/cfx_nft_balance_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | import '../../main.dart'; 11 | 12 | class CfxNftBalanceDao { 13 | static Future fetch() async { 14 | Map params = new Map(); 15 | var address = await BoxApp.getAddress(); 16 | params["address"] = address; 17 | Response response = await Dio().post(CFX_NFT_BALANCE,queryParameters: params); 18 | if (response.statusCode == 200) { 19 | var data = jsonDecode(response.toString()); 20 | CfxNftBalanceModel model = CfxNftBalanceModel.fromJson(data); 21 | return model; 22 | } else { 23 | throw Exception('Failed to load CfxBalanceModel.json'); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/dao/aeternity/contract_info_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/contract_balance_model.dart'; 7 | import 'package:box/model/aeternity/contract_info_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | import '../../main.dart'; 11 | 12 | class ContractInfoDao { 13 | static Future fetch() async { 14 | Map params = new Map(); 15 | var address = await BoxApp.getAddress(); 16 | params["address"] = address; 17 | Response response = await Dio().post(CONTRACT_INFO,queryParameters: params); 18 | if (response.statusCode == 200) { 19 | var data = jsonDecode(response.toString()); 20 | ContractInfoModel model = ContractInfoModel.fromJson(data); 21 | return model; 22 | } else { 23 | throw Exception('Failed to load ContractInfoModel.json'); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/dao/aeternity/swap_coin_order_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/swap_coin_order_model.dart'; 7 | import 'package:box/model/aeternity/swap_order_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | import '../../main.dart'; 11 | 12 | class SwapCoinOrderDao { 13 | static Future fetch() async { 14 | Map params = new Map(); 15 | var address = await BoxApp.getAddress(); 16 | params["address"] = address; 17 | Response response = await Dio().post(SWAP_COIN_ORDER_MY,queryParameters: params); 18 | if (response.statusCode == 200) { 19 | var data = jsonDecode(response.toString()); 20 | SwapCoinOrderModel model = SwapCoinOrderModel.fromJson(data); 21 | return model; 22 | } else { 23 | throw Exception('Failed to load SwapCoinOrderModel.json'); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/dao/conflux/cfx_token_address_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:box/model/conflux/cfx_tokens_list_model.dart'; 8 | import 'package:box/model/conflux/cfx_transfer_model.dart'; 9 | import 'package:dio/dio.dart'; 10 | 11 | import '../../main.dart'; 12 | 13 | class CfxTokenAddressDao { 14 | static Future fetch(String address) async { 15 | Map params = new Map(); 16 | params["address"] = address; 17 | Response response = await Dio().post(CFX_TOKENS_ADDRESS, queryParameters: params); 18 | if (response.statusCode == 200) { 19 | var data = jsonDecode(response.toString()); 20 | TokensData model = TokensData.fromJson(data); 21 | return model; 22 | } else { 23 | throw Exception('Failed to load TokensData.json'); 24 | } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /lib/dao/aeternity/token_record_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/token_record_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | import '../../main.dart'; 10 | 11 | 12 | class TokenRecordDao { 13 | static Future fetch(String ctId, String page) async { 14 | Map params = new Map(); 15 | var address = await BoxApp.getAddress(); 16 | params["address"] = address; 17 | params["ct_id"] = ctId; 18 | params["page"] = page; 19 | Response response = await Dio().post(AEX9_RECORD, queryParameters: params); 20 | if (response.statusCode == 200) { 21 | var data = jsonDecode(response.toString()); 22 | TokenRecordModel model = TokenRecordModel.fromJson(data); 23 | return model; 24 | } else { 25 | throw Exception('Failed to load TokenRecordModel.json'); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/dao/aeternity/name_reverse_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_info_model.dart'; 6 | import 'package:box/model/aeternity/name_reverse_model.dart'; 7 | import 'package:box/model/aeternity/swap_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | class NameReverseDao { 11 | static Future< List> fetch() async { 12 | var address = await BoxApp.getAddress(); 13 | Response response = await Dio().get(NAME + address); 14 | if (response.statusCode == 200) { 15 | List responseJson = json.decode(json.encode(response.data)); 16 | List data = new List(); 17 | responseJson.forEach((v) { 18 | data.add(new NameReverseModel.fromJson(v)); 19 | }); 20 | // List list = data.map((m) => new NameReverseModel.fromJson(m)).toList(); 21 | return data; 22 | } else { 23 | throw Exception('Failed to load NameReverseModel.json'); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/dao/conflux/cfx_transfer_hash_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:box/model/conflux/cfx_transaction_hash_model.dart'; 8 | import 'package:box/model/conflux/cfx_transfer_model.dart'; 9 | import 'package:dio/dio.dart'; 10 | 11 | import '../../main.dart'; 12 | 13 | class CfxTransactionHashDao { 14 | static Future fetch(String hash) async { 15 | Map params = new Map(); 16 | params["hash"] = hash; 17 | Response response = await Dio().post(CFX_TRANSACTION_HASH, queryParameters: params); 18 | if (response.statusCode == 200) { 19 | var data = jsonDecode(response.toString()); 20 | CfxTransactionHashModel model = CfxTransactionHashModel.fromJson(data); 21 | return model; 22 | } else { 23 | throw Exception('Failed to load CfxTransactionHashModel.json'); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/dao/aeternity/wetrue_topic_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'package:box/dao/urls.dart'; 5 | import 'package:box/main.dart'; 6 | import 'package:box/model/aeternity/aens_info_model.dart'; 7 | import 'package:box/model/aeternity/we_true_praise_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | class WeTrueTopicDao { 11 | static Future fetch(String hash) async { 12 | String url = ""; 13 | 14 | FormData formData = FormData.fromMap({ 15 | "hash": hash, 16 | }); 17 | var address = await BoxApp.getAddress(); 18 | 19 | ///创建 dio 20 | Options options = Options(); 21 | 22 | ///请求header的配置 23 | options.headers["ak-token"] = address; 24 | options.sendTimeout = 3; 25 | options.receiveTimeout = 3; 26 | url = WE_TRUE_URL + "/Submit/hash"; 27 | Response response = await Dio().post(url, data: formData, options: options); 28 | 29 | if (response.statusCode == 200) { 30 | return true; 31 | } else { 32 | return true; 33 | // throw Exception('Failed to load WeTruePraiseModel.json'); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/model/aeternity/tx_broadcast_model.dart: -------------------------------------------------------------------------------- 1 | class TxBroadcastModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | TxBroadcastModel({this.code, this.msg, this.time, this.data}); 8 | 9 | TxBroadcastModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | String hash; 30 | 31 | Data({this.hash}); 32 | 33 | Data.fromJson(Map json) { 34 | hash = json['hash']; 35 | } 36 | 37 | Map toJson() { 38 | final Map data = new Map(); 39 | data['hash'] = this.hash; 40 | return data; 41 | } 42 | } -------------------------------------------------------------------------------- /lib/dao/aeternity/token_send_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/msg_sign_model.dart'; 6 | import 'package:box/model/aeternity/aens_register_model.dart'; 7 | import 'package:box/model/aeternity/block_top_model.dart'; 8 | import 'package:box/model/aeternity/token_send_model.dart'; 9 | import 'package:dio/dio.dart'; 10 | 11 | class TokenSendDao { 12 | static Future fetch(String amount, String senderID,String recipientID) async { 13 | Map params = new Map(); 14 | params['amount'] = amount; 15 | params['senderID'] = senderID; 16 | params['recipientID'] = recipientID; 17 | params['data'] = "Box aepp"; 18 | Response response = await Dio().post(WALLET_TRANSFER, queryParameters: params); 19 | if (response.statusCode == 200) { 20 | var data = jsonDecode(response.toString()); 21 | MsgSignModel model = MsgSignModel.fromJson(data); 22 | return model; 23 | } else { 24 | throw Exception('Failed to load TokenSendModel.json'); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/model/aeternity/block_top_model.dart: -------------------------------------------------------------------------------- 1 | class BlockTopModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | BlockTopModel({this.code, this.msg, this.time, this.data}); 8 | 9 | BlockTopModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | int height; 30 | 31 | Data({this.height}); 32 | 33 | Data.fromJson(Map json) { 34 | height = json['height']; 35 | } 36 | 37 | Map toJson() { 38 | final Map data = new Map(); 39 | data['height'] = this.height; 40 | return data; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/dao/aeternity/wetrue_praise_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_info_model.dart'; 6 | import 'package:box/model/aeternity/we_true_praise_model.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | class WeTruePraiseDao { 10 | static Future fetch(String hash) async { 11 | String url = ""; 12 | 13 | FormData formData = FormData.fromMap({ 14 | "hash": hash, 15 | "type": "topic", 16 | }); var address = await BoxApp.getAddress(); 17 | ///创建 dio 18 | Options options = Options(); 19 | ///请求header的配置 20 | options.headers["ak-token"]=address; 21 | url = WE_TRUE_URL+"/Submit/praise"; 22 | Response response = await Dio().post(url, data: formData,options: options); 23 | if (response.statusCode == 200) { 24 | var data = jsonDecode(response.toString()); 25 | WeTruePraiseModel model = WeTruePraiseModel.fromJson(data); 26 | return model; 27 | } else { 28 | throw Exception('Failed to load WeTruePraiseModel.json'); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/dao/aeternity/tx_broadcast_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/msg_sign_model.dart'; 6 | import 'package:box/model/aeternity/aens_register_model.dart'; 7 | import 'package:box/model/aeternity/block_top_model.dart'; 8 | import 'package:box/model/aeternity/token_send_model.dart'; 9 | import 'package:box/model/aeternity/tx_broadcast_model.dart'; 10 | import 'package:dio/dio.dart'; 11 | 12 | class TxBroadcastDao { 13 | static Future fetch(String signature, String tx, String type) async { 14 | Map params = new Map(); 15 | params['signature'] = signature; 16 | params['tx'] = tx; 17 | params['type'] = type; 18 | Response response = await Dio().post(TX_BROADCAST, queryParameters: params); 19 | if (response.statusCode == 200) { 20 | var data = jsonDecode(response.toString()); 21 | TxBroadcastModel model = TxBroadcastModel.fromJson(data); 22 | return model; 23 | } else { 24 | throw Exception('Failed to load TxBroadcastModel.json'); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/dao/conflux/cfx_nft_token_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:box/model/conflux/cfx_nft_balance_model.dart'; 8 | import 'package:box/model/conflux/cfx_nft_token_model.dart'; 9 | import 'package:dio/dio.dart'; 10 | 11 | import '../../main.dart'; 12 | 13 | class CfxNftTokenDao { 14 | static Future fetch(String contract) async { 15 | Map params = new Map(); 16 | var address = await BoxApp.getAddress(); 17 | params["address"] = address; 18 | params["contract"] = contract; 19 | Response response = await Dio().post(CFX_NFT_TOKEN,queryParameters: params); 20 | if (response.statusCode == 200) { 21 | var data = jsonDecode(response.toString()); 22 | CfxNftTokenModel model = CfxNftTokenModel.fromJson(data); 23 | return model; 24 | } else { 25 | throw Exception('Failed to load CfxNftTokenModel.json'); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/model/aeternity/th_hash_model.dart: -------------------------------------------------------------------------------- 1 | class ThHashModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | ThHashModel({this.code, this.msg, this.time, this.data}); 8 | 9 | ThHashModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | int blockHeight; 30 | 31 | Data({this.blockHeight}); 32 | 33 | Data.fromJson(Map json) { 34 | blockHeight = json['block_height']; 35 | } 36 | 37 | Map toJson() { 38 | final Map data = new Map(); 39 | data['block_height'] = this.blockHeight; 40 | return data; 41 | } 42 | } -------------------------------------------------------------------------------- /lib/dao/conflux/cfx_transfer_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:box/model/conflux/cfx_transfer_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | import '../../main.dart'; 11 | 12 | class CfxTransferDao { 13 | static Future fetch(String page, ctAddress) async { 14 | Map params = new Map(); 15 | var address = await BoxApp.getAddress(); 16 | params["address"] = address; 17 | params["page"] = page; 18 | if(ctAddress != ""){ 19 | params["ct_address"] = ctAddress; 20 | } 21 | 22 | Response response = await Dio().post(CFX_TRANSACTION, queryParameters: params); 23 | if (response.statusCode == 200) { 24 | var data = jsonDecode(response.toString()); 25 | CfxTransfer model = CfxTransfer.fromJson(data); 26 | return model; 27 | } else { 28 | throw Exception('Failed to load CfxTransfer.json'); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/dao/aeternity/th_hash_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/contract_balance_model.dart'; 7 | import 'package:box/model/aeternity/contract_call_model.dart'; 8 | import 'package:box/model/aeternity/contract_info_model.dart'; 9 | import 'package:box/model/aeternity/contract_record_model.dart'; 10 | import 'package:box/model/aeternity/th_hash_model.dart'; 11 | import 'package:dio/dio.dart'; 12 | 13 | import '../../main.dart'; 14 | 15 | class ThHashDao { 16 | static Future fetch(String th) async { 17 | Map params = new Map(); 18 | params["th"] = th; 19 | Response response = await Dio().post(TH_HASH, queryParameters: params); 20 | if (response.statusCode == 200) { 21 | var data = jsonDecode(response.toString()); 22 | 23 | ThHashModel model = ThHashModel.fromJson(data); 24 | return model; 25 | } else { 26 | throw Exception('Failed to load ThHashModel.json'); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/model/aeternity/allowance_model.dart: -------------------------------------------------------------------------------- 1 | class AllowanceModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | AllowanceModel({this.code, this.msg, this.time, this.data}); 8 | 9 | AllowanceModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | String allowance; 30 | 31 | Data({this.allowance}); 32 | 33 | Data.fromJson(Map json) { 34 | allowance = json['allowance']; 35 | } 36 | 37 | Map toJson() { 38 | final Map data = new Map(); 39 | data['allowance'] = this.allowance; 40 | return data; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /images/animation_khzuiqgg.json: -------------------------------------------------------------------------------- 1 | {"v":"5.6.6","ip":0,"op":160,"fr":60,"w":74,"h":74,"layers":[{"ind":3897,"nm":"surface23300","ao":0,"ip":0,"op":264,"st":0,"ty":4,"ks":{"ty":"tr","o":{"k":100},"r":{"k":0},"p":{"k":[0,0]},"a":{"k":[0,0]},"s":{"k":[133.33,133.33]},"sk":{"k":0},"sa":{"k":0}},"shapes":[{"ty":"gr","hd":false,"nm":"surface23300","it":[{"ty":"gr","hd":false,"it":[{"ty":"sh","ks":{"k":{"i":[[0,0],[0,-6.7],[-12.9,0],[-19.3,0],[0,-6.7],[12.9,0],[19.3,0]],"o":[[-12.9,0],[0,6.7],[19.3,0],[12.9,-0.01],[0,6.7],[-19.31,0],[0,0]],"v":[[24.3,30],[5,50],[24.3,70],[75.7,30],[95,50],[75.7,70],[24.3,30]],"c":true}}},{"ty":"st","lc":1,"lj":1,"ml":4,"o":{"k":100},"w":{"k":7},"c":{"k":[1,0.27,0.51,1]},"hd":false},{"ty":"tr","o":{"k":100},"r":{"k":0},"p":{"k":[0,0]},"a":{"k":[0,0]},"s":{"k":[55.5,55.5]},"sk":{"k":0},"sa":{"k":0},"hd":false}]},{"ty":"tr","o":{"k":100},"r":{"k":0},"p":{"k":[0,0]},"a":{"k":[0,0]},"s":{"k":[100,100]},"sk":{"k":0},"sa":{"k":0},"hd":false}]},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.27],"y":[1]},"o":{"x":[0.5],"y":[0]},"t":0,"s":[0]},{"t":66,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"hd":false}]}],"meta":{"g":"LF SVG to Lottie"}} -------------------------------------------------------------------------------- /lib/model/aeternity/we_true_praise_model.dart: -------------------------------------------------------------------------------- 1 | class WeTruePraiseModel { 2 | int code; 3 | Data data; 4 | String msg; 5 | 6 | WeTruePraiseModel({this.code, this.data, this.msg}); 7 | 8 | WeTruePraiseModel.fromJson(Map json) { 9 | code = json['code']; 10 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 11 | msg = json['msg']; 12 | } 13 | 14 | Map toJson() { 15 | final Map data = new Map(); 16 | data['code'] = this.code; 17 | if (this.data != null) { 18 | data['data'] = this.data.toJson(); 19 | } 20 | data['msg'] = this.msg; 21 | return data; 22 | } 23 | } 24 | 25 | class Data { 26 | int praise; 27 | bool isPraise; 28 | 29 | Data({this.praise, this.isPraise}); 30 | 31 | Data.fromJson(Map json) { 32 | praise = json['praise']; 33 | isPraise = json['isPraise']; 34 | } 35 | 36 | Map toJson() { 37 | final Map data = new Map(); 38 | data['praise'] = this.praise; 39 | data['isPraise'] = this.isPraise; 40 | return data; 41 | } 42 | } -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:box/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(BoxApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/model/aeternity/contract_decode_model.dart: -------------------------------------------------------------------------------- 1 | class ContractDecodeModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | ContractDecodeModel({this.code, this.msg, this.time, this.data}); 8 | 9 | ContractDecodeModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | String tokenNumber; 30 | 31 | Data({this.tokenNumber}); 32 | 33 | Data.fromJson(Map json) { 34 | tokenNumber = json['token_number']; 35 | } 36 | 37 | Map toJson() { 38 | final Map data = new Map(); 39 | data['token_number'] = this.tokenNumber; 40 | return data; 41 | } 42 | } -------------------------------------------------------------------------------- /lib/model/aeternity/banner_model.dart: -------------------------------------------------------------------------------- 1 | class BannerModel { 2 | Cn cn; 3 | Cn en; 4 | 5 | BannerModel({this.cn, this.en}); 6 | 7 | BannerModel.fromJson(Map json) { 8 | cn = json['cn'] != null ? new Cn.fromJson(json['cn']) : null; 9 | en = json['en'] != null ? new Cn.fromJson(json['en']) : null; 10 | } 11 | 12 | Map toJson() { 13 | final Map data = new Map(); 14 | if (this.cn != null) { 15 | data['cn'] = this.cn.toJson(); 16 | } 17 | if (this.en != null) { 18 | data['en'] = this.en.toJson(); 19 | } 20 | return data; 21 | } 22 | } 23 | 24 | class Cn { 25 | String image; 26 | String title; 27 | String url; 28 | 29 | Cn({this.image, this.title, this.url}); 30 | 31 | Cn.fromJson(Map json) { 32 | image = json['image']; 33 | title = json['title']; 34 | url = json['url']; 35 | } 36 | 37 | Map toJson() { 38 | final Map data = new Map(); 39 | data['image'] = this.image; 40 | data['title'] = this.title; 41 | data['url'] = this.url; 42 | return data; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/dao/aeternity/allowance_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/allowance_model.dart'; 6 | import 'package:box/model/aeternity/msg_sign_model.dart'; 7 | import 'package:box/model/aeternity/aens_register_model.dart'; 8 | import 'package:box/model/aeternity/block_top_model.dart'; 9 | import 'package:box/model/aeternity/token_send_model.dart'; 10 | import 'package:box/model/aeternity/tx_broadcast_model.dart'; 11 | import 'package:dio/dio.dart'; 12 | 13 | class AllowanceDao { 14 | static Future fetch(String ctId) async { 15 | Map params = new Map(); 16 | var address = await BoxApp.getAddress(); 17 | params["address"] = address; 18 | params['ct_id'] = ctId; 19 | Response response = await Dio().post(AEX9_ALLOWANCE, queryParameters: params); 20 | if (response.statusCode == 200) { 21 | var data = jsonDecode(response.toString()); 22 | AllowanceModel model = AllowanceModel.fromJson(data); 23 | return model; 24 | } else { 25 | throw Exception('Failed to load AllowanceModel.json'); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/dao/aeternity/wetrue_config_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_info_model.dart'; 6 | import 'package:box/model/aeternity/we_true_praise_model.dart'; 7 | import 'package:box/model/aeternity/wetrue_config_model.dart'; 8 | import 'package:dio/dio.dart'; 9 | 10 | class WeTrueConfigDao { 11 | static Future fetch() async { 12 | String url = ""; 13 | 14 | // FormData formData = FormData.fromMap({ 15 | // "hash": hash, 16 | // "type": "topic", 17 | // }); 18 | var address = await BoxApp.getAddress(); 19 | ///创建 dio 20 | Options options = Options(); 21 | ///请求header的配置 22 | options.headers["ak-token"]=address; 23 | url = WE_TRUE_URL+"/Config/info"; 24 | Response response = await Dio().post(url,options: options); 25 | if (response.statusCode == 200) { 26 | var data = jsonDecode(response.toString()); 27 | WeTrueConfigModel model = WeTrueConfigModel.fromJson(data); 28 | return model; 29 | } else { 30 | throw Exception('Failed to load WeTrueConfigModel.json'); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/dao/conflux/cfx_nft_preview_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:box/model/conflux/cfx_nft_balance_model.dart'; 8 | import 'package:box/model/conflux/cfx_nft_preview_model.dart'; 9 | import 'package:box/model/conflux/cfx_nft_token_model.dart'; 10 | import 'package:dio/dio.dart'; 11 | 12 | import '../../main.dart'; 13 | 14 | class CfxNftPreviewDao { 15 | static Future fetch(String contract,String tokenId) async { 16 | Map params = new Map(); 17 | params["tokenId"] = tokenId; 18 | params["contract"] = contract; 19 | Response response = await Dio().post(CFX_NFT_PREVIEW,queryParameters: params); 20 | if (response.statusCode == 200) { 21 | var data = jsonDecode(response.toString()); 22 | CfxNftPreviewModel model = CfxNftPreviewModel.fromJson(data); 23 | return model; 24 | } else { 25 | throw Exception('Failed to load CfxNftPreviewModel.json'); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/model/aeternity/contract_call_model.dart: -------------------------------------------------------------------------------- 1 | class ContractCallModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | ContractCallModel({this.code, this.msg, this.time, this.data}); 8 | 9 | ContractCallModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | String function; 30 | String tx; 31 | 32 | Data({this.function, this.tx}); 33 | 34 | Data.fromJson(Map json) { 35 | function = json['function']; 36 | tx = json['tx']; 37 | } 38 | 39 | Map toJson() { 40 | final Map data = new Map(); 41 | data['function'] = this.function; 42 | data['tx'] = this.tx; 43 | return data; 44 | } 45 | } -------------------------------------------------------------------------------- /lib/model/aeternity/contract_balance_model.dart: -------------------------------------------------------------------------------- 1 | class ContractBalanceModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | ContractBalanceModel({this.code, this.msg, this.time, this.data}); 8 | 9 | ContractBalanceModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | String balance; 30 | String rate; 31 | 32 | Data({this.balance}); 33 | 34 | Data.fromJson(Map json) { 35 | balance = json['balance']; 36 | rate = json['rate']; 37 | } 38 | 39 | Map toJson() { 40 | final Map data = new Map(); 41 | data['balance'] = this.balance; 42 | data['rate'] = this.rate; 43 | return data; 44 | } 45 | } -------------------------------------------------------------------------------- /lib/model/aeternity/account_info_model.dart: -------------------------------------------------------------------------------- 1 | class AccountInfoModel { 2 | int code; 3 | Data data; 4 | String msg; 5 | int time; 6 | 7 | AccountInfoModel({this.code, this.data, this.msg, this.time}); 8 | 9 | AccountInfoModel.fromJson(Map json) { 10 | code = json['code']; 11 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 12 | msg = json['msg']; 13 | time = json['time']; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | if (this.data != null) { 20 | data['data'] = this.data.toJson(); 21 | } 22 | data['msg'] = this.msg; 23 | data['time'] = this.time; 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | String address; 30 | String balance; 31 | 32 | Data({this.address, this.balance}); 33 | 34 | Data.fromJson(Map json) { 35 | address = json['address']; 36 | balance = json['balance']; 37 | } 38 | 39 | Map toJson() { 40 | final Map data = new Map(); 41 | data['address'] = this.address; 42 | data['balance'] = this.balance; 43 | return data; 44 | } 45 | } -------------------------------------------------------------------------------- /lib/model/aeternity/msg_sign_model.dart: -------------------------------------------------------------------------------- 1 | class MsgSignModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | MsgSignModel({this.code, this.msg, this.time, this.data}); 8 | 9 | MsgSignModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | String msg; 30 | String tx; 31 | double salt; 32 | 33 | Data({this.msg, this.tx}); 34 | 35 | Data.fromJson(Map json) { 36 | msg = json['msg']; 37 | tx = json['tx']; 38 | salt = json['salt']; 39 | } 40 | 41 | Map toJson() { 42 | final Map data = new Map(); 43 | data['msg'] = this.msg; 44 | data['tx'] = this.tx; 45 | data['salt'] = this.salt; 46 | return data; 47 | } 48 | } -------------------------------------------------------------------------------- /lib/dao/conflux/cfx_crc20_transfer_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/conflux/cfx_balance_model.dart'; 7 | import 'package:box/model/conflux/cfx_crc20_transfer_model.dart'; 8 | import 'package:box/model/conflux/cfx_transfer_model.dart'; 9 | import 'package:dio/dio.dart'; 10 | 11 | import '../../main.dart'; 12 | 13 | class CfxCrc20TransferDao { 14 | static Future fetch(String page, ctAddress) async { 15 | Map params = new Map(); 16 | var address = await BoxApp.getAddress(); 17 | params["address"] = address; 18 | params["page"] = page; 19 | if(ctAddress != ""){ 20 | params["contract"] = ctAddress; 21 | } 22 | 23 | Response response = await Dio().post(CFX_CRC20_TRANSACTION_HASH, queryParameters: params); 24 | if (response.statusCode == 200) { 25 | var data = jsonDecode(response.toString()); 26 | CfxCrc20TransferModel model = CfxCrc20TransferModel.fromJson(data); 27 | return model; 28 | } else { 29 | throw Exception('Failed to load CfxCrc20TransferModel.json'); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | 23 | 24 | -------------------------------------------------------------------------------- /lib/dao/aeternity/contract_transfer_call_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/contract_balance_model.dart'; 7 | import 'package:box/model/aeternity/contract_call_model.dart'; 8 | import 'package:box/model/aeternity/contract_info_model.dart'; 9 | import 'package:box/model/aeternity/contract_record_model.dart'; 10 | import 'package:box/model/aeternity/msg_sign_model.dart'; 11 | import 'package:dio/dio.dart'; 12 | 13 | 14 | class ContractTransferCallDao { 15 | static Future fetch(String amount, String senderID,String recipientID) async { 16 | Map params = new Map(); 17 | params["senderID"] = senderID; 18 | params["recipientID"] = recipientID; 19 | params["amount"] = amount; 20 | Response response = await Dio().post(CONTRACT_TRANSFER, queryParameters: params); 21 | if (response.statusCode == 200) { 22 | var data = jsonDecode(response.toString()); 23 | 24 | MsgSignModel model = MsgSignModel.fromJson(data); 25 | return model; 26 | } else { 27 | throw Exception('Failed to load ContractCallModel.json'); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | ext.googlePlayServicesVersion = "15.0.0" 4 | repositories { 5 | maven {url 'https://maven.aliyun.com/repository/google'} 6 | maven {url 'https://maven.aliyun.com/repository/jcenter' } 7 | maven {url 'http://maven.aliyun.com/nexus/content/groups/public' } 8 | google() 9 | jcenter() 10 | } 11 | 12 | dependencies { 13 | classpath 'com.android.tools.build:gradle:4.0.1' 14 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | maven {url 'https://maven.aliyun.com/repository/google'} 21 | maven {url 'https://maven.aliyun.com/repository/jcenter' } 22 | maven {url 'http://maven.aliyun.com/nexus/content/groups/public' } 23 | google() 24 | jcenter() 25 | } 26 | } 27 | 28 | rootProject.buildDir = '../build' 29 | subprojects { 30 | project.buildDir = "${rootProject.buildDir}/${project.name}" 31 | } 32 | subprojects { 33 | project.evaluationDependsOn(':app') 34 | } 35 | 36 | task clean(type: Delete) { 37 | delete rootProject.buildDir 38 | } 39 | configurations { 40 | all*.exclude group: 'com.google.guava', module: 'listenablefuture' 41 | } 42 | 43 | -------------------------------------------------------------------------------- /lib/model/aeternity/app_store_model.dart: -------------------------------------------------------------------------------- 1 | class AppStoreModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | AppStoreModel({this.code, this.msg, this.time, this.data}); 8 | 9 | AppStoreModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | bool isOpen; 30 | String version; 31 | bool nextOpen; 32 | 33 | Data({this.isOpen, this.version, this.nextOpen}); 34 | 35 | Data.fromJson(Map json) { 36 | isOpen = json['is_open']; 37 | version = json['version']; 38 | nextOpen = json['next_open']; 39 | } 40 | 41 | Map toJson() { 42 | final Map data = new Map(); 43 | data['is_open'] = this.isOpen; 44 | data['version'] = this.version; 45 | data['next_open'] = this.nextOpen; 46 | return data; 47 | } 48 | } -------------------------------------------------------------------------------- /lib/model/aeternity/name_owner_model.dart: -------------------------------------------------------------------------------- 1 | class NameOwnerModel { 2 | String id; 3 | String owner; 4 | List pointers; 5 | int ttl; 6 | 7 | NameOwnerModel({this.id, this.owner, this.pointers, this.ttl}); 8 | 9 | NameOwnerModel.fromJson(Map json) { 10 | id = json['id']; 11 | owner = json['owner']; 12 | if (json['pointers'] != null) { 13 | pointers = new List(); 14 | json['pointers'].forEach((v) { 15 | pointers.add(new Pointers.fromJson(v)); 16 | }); 17 | } 18 | ttl = json['ttl']; 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['id'] = this.id; 24 | data['owner'] = this.owner; 25 | if (this.pointers != null) { 26 | data['pointers'] = this.pointers.map((v) => v.toJson()).toList(); 27 | } 28 | data['ttl'] = this.ttl; 29 | return data; 30 | } 31 | } 32 | 33 | class Pointers { 34 | String id; 35 | String key; 36 | 37 | Pointers({this.id, this.key}); 38 | 39 | Pointers.fromJson(Map json) { 40 | id = json['id']; 41 | key = json['key']; 42 | } 43 | 44 | Map toJson() { 45 | final Map data = new Map(); 46 | data['id'] = this.id; 47 | data['key'] = this.key; 48 | return data; 49 | } 50 | } -------------------------------------------------------------------------------- /lib/dao/aeternity/wetrue_comment_list_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/WetrueListModel.dart'; 6 | import 'package:box/model/aeternity/aens_info_model.dart'; 7 | import 'package:box/model/aeternity/swap_model.dart'; 8 | import 'package:box/model/aeternity/swap_order_model.dart'; 9 | import 'package:box/model/aeternity/wetrue_comment_model.dart'; 10 | import 'package:dio/dio.dart'; 11 | 12 | class WetrueCommentDao { 13 | static Future fetch(String hash, int page) async { 14 | String url = ""; 15 | 16 | url = WE_TRUE_URL + "/Comment/list"; 17 | FormData formData = FormData.fromMap({ 18 | "hash": hash, 19 | "page": page, 20 | "size": 30, 21 | "replyLimit": 3, 22 | }); 23 | var address = await BoxApp.getAddress(); 24 | 25 | ///创建 dio 26 | Options options = Options(); 27 | 28 | ///请求header的配置 29 | options.headers["ak-token"] = address; 30 | 31 | Response response = await Dio().post(url, data: formData, options: options); 32 | if (response.statusCode == 200) { 33 | var data = jsonDecode(response.toString()); 34 | WetrueCommentModel model = WetrueCommentModel.fromJson(data); 35 | return model; 36 | } else { 37 | throw Exception('Failed to load WetrueCommentModel.json'); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/model/aeternity/user_model.dart: -------------------------------------------------------------------------------- 1 | 2 | class UserModel { 3 | int code; 4 | Data data; 5 | String msg; 6 | int time; 7 | 8 | UserModel({this.code, this.data, this.msg, this.time}); 9 | 10 | UserModel.fromJson(Map json) { 11 | code = json['code']; 12 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 13 | msg = json['msg']; 14 | time = json['time']; 15 | } 16 | 17 | Map toJson() { 18 | final Map data = new Map(); 19 | data['code'] = this.code; 20 | if (this.data != null) { 21 | data['data'] = this.data.toJson(); 22 | } 23 | data['msg'] = this.msg; 24 | data['time'] = this.time; 25 | return data; 26 | } 27 | } 28 | 29 | class Data { 30 | String address; 31 | String mnemonic; 32 | String redirectUri; 33 | String signingKey; 34 | 35 | Data({this.address, this.mnemonic, this.redirectUri, this.signingKey}); 36 | 37 | Data.fromJson(Map json) { 38 | address = json['address']; 39 | mnemonic = json['mnemonic']; 40 | redirectUri = json['redirectUri']; 41 | signingKey = json['signingKey']; 42 | } 43 | 44 | Map toJson() { 45 | final Map data = new Map(); 46 | data['address'] = this.address; 47 | data['mnemonic'] = this.mnemonic; 48 | data['redirectUri'] = this.redirectUri; 49 | data['signingKey'] = this.signingKey; 50 | return data; 51 | } 52 | } -------------------------------------------------------------------------------- /lib/model/conflux/cfx_balance_model.dart: -------------------------------------------------------------------------------- 1 | class CfxBalanceModel { 2 | String address; 3 | String balance; 4 | String stakingBalance; 5 | String collateralForStorage; 6 | String accumulatedInterestReturn; 7 | String nonce; 8 | String admin; 9 | String codeHash; 10 | 11 | CfxBalanceModel( 12 | {this.address, 13 | this.balance, 14 | this.stakingBalance, 15 | this.collateralForStorage, 16 | this.accumulatedInterestReturn, 17 | this.nonce, 18 | this.admin, 19 | this.codeHash}); 20 | 21 | CfxBalanceModel.fromJson(Map json) { 22 | address = json['address']; 23 | balance = json['balance']; 24 | stakingBalance = json['stakingBalance']; 25 | collateralForStorage = json['collateralForStorage']; 26 | accumulatedInterestReturn = json['accumulatedInterestReturn']; 27 | nonce = json['nonce']; 28 | admin = json['admin']; 29 | codeHash = json['codeHash']; 30 | } 31 | 32 | Map toJson() { 33 | final Map data = new Map(); 34 | data['address'] = this.address; 35 | data['balance'] = this.balance; 36 | data['stakingBalance'] = this.stakingBalance; 37 | data['collateralForStorage'] = this.collateralForStorage; 38 | data['accumulatedInterestReturn'] = this.accumulatedInterestReturn; 39 | data['nonce'] = this.nonce; 40 | data['admin'] = this.admin; 41 | data['codeHash'] = this.codeHash; 42 | return data; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/dao/aeternity/aens_page_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/aens_page_model.dart'; 6 | import 'package:dio/dio.dart'; 7 | 8 | enum AensPageType { auction, price, over, my_auction, my_over } 9 | 10 | class AensPageDao { 11 | static Future fetch(AensPageType aensPageType, int page) async { 12 | Map params = new Map(); 13 | var address =await BoxApp.getAddress(); 14 | var url = ""; 15 | switch (aensPageType) { 16 | case AensPageType.auction: 17 | url = NAME_AUCTIONS; 18 | break; 19 | case AensPageType.price: 20 | url = NAME_PRICE; 21 | break; 22 | case AensPageType.over: 23 | url = NAME_OVER; 24 | break; 25 | case AensPageType.my_auction: 26 | url = NAME_MY_OVER; 27 | params["address"] = address; 28 | break; 29 | case AensPageType.my_over: 30 | url = NAME_MY_REGISTER; 31 | params["address"] = address; 32 | break; 33 | } 34 | params["page"] = page.toString(); 35 | Response response = await Dio().post(url, queryParameters: params); 36 | 37 | if (response.statusCode == 200) { 38 | var data = jsonDecode(response.toString()); 39 | AensPageModel model = AensPageModel.fromJson(data); 40 | return model; 41 | } else { 42 | throw Exception('Failed to load AensPageModel.json'); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '10.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /lib/widget/password_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | // ignore: must_be_immutable 4 | class PasswordWidget extends Dialog { 5 | String text; 6 | 7 | PasswordWidget({Key key, @required this.text}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return new Material( //创建透明层 12 | type: MaterialType.transparency, //透明类型 13 | child: new Center( //保证控件居中效果 14 | child: new SizedBox( 15 | width: 120.0, 16 | height: 120.0, 17 | child: new Container( 18 | decoration: ShapeDecoration( 19 | color: Color(0xffffffff), 20 | shape: RoundedRectangleBorder( 21 | borderRadius: BorderRadius.all( 22 | Radius.circular(8.0), 23 | ), 24 | ), 25 | ), 26 | child: new Column( 27 | mainAxisAlignment: MainAxisAlignment.center, 28 | crossAxisAlignment: CrossAxisAlignment.center, 29 | children: [ 30 | new CircularProgressIndicator(), 31 | new Padding( 32 | padding: const EdgeInsets.only( 33 | top: 20.0, 34 | ), 35 | child: new Text( 36 | text, 37 | style: new TextStyle(fontSize: 12.0), 38 | ), 39 | ), 40 | ], 41 | ), 42 | ), 43 | ), 44 | ), 45 | ); 46 | } 47 | } -------------------------------------------------------------------------------- /lib/dao/aeternity/wetrue_list_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/main.dart'; 5 | import 'package:box/model/aeternity/WetrueListModel.dart'; 6 | import 'package:box/model/aeternity/aens_info_model.dart'; 7 | import 'package:box/model/aeternity/swap_model.dart'; 8 | import 'package:box/model/aeternity/swap_order_model.dart'; 9 | import 'package:dio/dio.dart'; 10 | 11 | class WeTrueListDao { 12 | static Future fetch(int type, int page) async { 13 | String url = ""; 14 | switch (type) { 15 | case 0: 16 | // url = "https://liushao.cc:1817/Content/list"; 17 | url = WE_TRUE_URL+"/Content/list"; 18 | break; 19 | case 1: 20 | url = WE_TRUE_URL+"/Content/hotRec"; 21 | break; 22 | case 2: 23 | url = WE_TRUE_URL+"/Image/list"; 24 | break; 25 | } 26 | FormData formData = FormData.fromMap({ 27 | "page": page, 28 | "size": 30, 29 | }); var address = await BoxApp.getAddress(); 30 | ///创建 dio 31 | Options options = Options(); 32 | ///请求header的配置 33 | options.headers["ak-token"]=address; 34 | 35 | Response response = await Dio().post(url, data: formData,options: options); 36 | if (response.statusCode == 200) { 37 | var data = jsonDecode(response.toString()); 38 | WetrueListModel model = WetrueListModel.fromJson(data); 39 | return model; 40 | } else { 41 | throw Exception('Failed to load WetrueListModel.json'); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/model/aeternity/ct_token_model.dart: -------------------------------------------------------------------------------- 1 | class CtTokenModel { 2 | List tokens; 3 | 4 | CtTokenModel({this.tokens}); 5 | 6 | CtTokenModel.fromJson(Map json) { 7 | if (json['tokens'] != null) { 8 | tokens = new List(); 9 | json['tokens'].forEach((v) { 10 | tokens.add(new Tokens.fromJson(v)); 11 | }); 12 | } 13 | } 14 | 15 | Map toJson() { 16 | final Map data = new Map(); 17 | if (this.tokens != null) { 18 | data['tokens'] = this.tokens.map((v) => v.toJson()).toList(); 19 | } 20 | return data; 21 | } 22 | } 23 | 24 | class Tokens { 25 | String ctId; 26 | String name; 27 | String symbol; 28 | String quoteUrl; 29 | String iconUrl; 30 | String balance; 31 | String price; 32 | 33 | Tokens({this.ctId, this.name, this.symbol, this.quoteUrl}); 34 | 35 | Tokens.fromJson(Map json) { 36 | ctId = json['ct_id']; 37 | name = json['name']; 38 | symbol = json['symbol']; 39 | quoteUrl = json['quoteUrl']; 40 | iconUrl = json['iconUrl']; 41 | balance = json['balance']; 42 | price = json['price']; 43 | } 44 | 45 | Map toJson() { 46 | final Map data = new Map(); 47 | data['ct_id'] = this.ctId; 48 | data['name'] = this.name; 49 | data['symbol'] = this.symbol; 50 | data['quoteUrl'] = this.quoteUrl; 51 | data['iconUrl'] = this.iconUrl; 52 | data['balance'] = this.balance; 53 | data['price'] = this.price; 54 | return data; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | android/box.keystore 45 | android/key.properties 46 | assets/sdk/js/ABCLockV3Call.js 47 | assets/sdk/js/ABCLockV3Contract.js 48 | assets/sdk/js/aepp-sdk.browser-script-770.js 49 | assets/sdk/js/BaseFunctionCall.js 50 | assets/sdk/js/FungibleTokenFullCall.js 51 | assets/sdk/js/FungibleTokenFullContract.js 52 | lib/l10n/intl_cn.arb 53 | lib/l10n/intl_en.arb 54 | lib/main.dart 55 | pubspec.lock 56 | pubspec.yaml 57 | assets/sdk/js/BoxSwapContractV2.js 58 | assets/sdk/js/BoxSwapV2Call.js 59 | assets/sdk/css/app.e258e543.css 60 | assets/sdk/js/app.6c426efd.js 61 | assets/sdk/js/app.6c426efd.js.map 62 | assets/sdk/js/chunk-vendors.7f48f3fa.js 63 | assets/sdk/js/chunk-vendors.7f48f3fa.js.map 64 | assets/sdk/favicon.ico 65 | assets/sdk/index.html 66 | -------------------------------------------------------------------------------- /lib/model/aeternity/swap_model.dart: -------------------------------------------------------------------------------- 1 | class SwapModel { 2 | int code; 3 | String msg; 4 | int time; 5 | List data; 6 | 7 | SwapModel({this.code, this.msg, this.time, this.data}); 8 | 9 | SwapModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | if (json['data'] != null) { 14 | data = new List(); 15 | json['data'].forEach((v) { 16 | data.add(new Data.fromJson(v)); 17 | }); 18 | } 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['code'] = this.code; 24 | data['msg'] = this.msg; 25 | data['time'] = this.time; 26 | if (this.data != null) { 27 | data['data'] = this.data.map((v) => v.toJson()).toList(); 28 | } 29 | return data; 30 | } 31 | } 32 | 33 | class Data { 34 | String account; 35 | String ae; 36 | String coin; 37 | String count; 38 | 39 | 40 | double getPremium(){ 41 | return (double.parse(ae)) / (double.parse(count)); 42 | } 43 | Data({this.account, this.ae, this.coin, this.count}); 44 | 45 | Data.fromJson(Map json) { 46 | account = json['account']; 47 | ae = json['ae']; 48 | coin = json['coin']; 49 | count = json['count']; 50 | } 51 | 52 | Map toJson() { 53 | final Map data = new Map(); 54 | data['account'] = this.account; 55 | data['ae'] = this.ae; 56 | data['coin'] = this.coin; 57 | data['count'] = this.count; 58 | return data; 59 | } 60 | } -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/model/aeternity/swap_coin_model.dart: -------------------------------------------------------------------------------- 1 | class SwapCoinModel { 2 | int code; 3 | String msg; 4 | int time; 5 | List data; 6 | 7 | SwapCoinModel({this.code, this.msg, this.time, this.data}); 8 | 9 | SwapCoinModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | if (json['data'] != null) { 14 | data = new List(); 15 | json['data'].forEach((v) { 16 | data.add(new SwapCoinModelData.fromJson(v)); 17 | }); 18 | } 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['code'] = this.code; 24 | data['msg'] = this.msg; 25 | data['time'] = this.time; 26 | if (this.data != null) { 27 | data['data'] = this.data.map((v) => v.toJson()).toList(); 28 | } 29 | return data; 30 | } 31 | } 32 | 33 | class SwapCoinModelData { 34 | String name; 35 | String ctAddress; 36 | double lowTokenCount; 37 | double lowAeCount; 38 | 39 | SwapCoinModelData({this.name, this.ctAddress, this.lowTokenCount, this.lowAeCount}); 40 | 41 | SwapCoinModelData.fromJson(Map json) { 42 | name = json['name']; 43 | ctAddress = json['ct_address']; 44 | lowTokenCount = json['low_token_count']; 45 | lowAeCount = json['low_ae_count']; 46 | } 47 | 48 | Map toJson() { 49 | final Map data = new Map(); 50 | data['name'] = this.name; 51 | data['ct_address'] = this.ctAddress; 52 | data['low_token_count'] = this.lowTokenCount; 53 | data['low_ae_count'] = this.lowAeCount; 54 | return data; 55 | } 56 | } -------------------------------------------------------------------------------- /lib/manager/ct_token_manager.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/a.dart'; 4 | import 'package:box/model/aeternity/ct_token_model.dart'; 5 | import 'package:box/utils/utils.dart'; 6 | import 'package:shared_preferences/shared_preferences.dart'; 7 | 8 | class CtTokenManager { 9 | CtTokenManager._privateConstructor(); 10 | 11 | static final CtTokenManager instance = CtTokenManager._privateConstructor(); 12 | 13 | Future> getCfxCtTokens(String address) async { 14 | try{ 15 | var prefs = await SharedPreferences.getInstance(); 16 | var ctCfxTokens = prefs.getString('ct_cfx_tokens_' + address); 17 | if (ctCfxTokens == null || ctCfxTokens.isEmpty) { 18 | return []; 19 | } 20 | final key = Utils.generateMd5Int(b); 21 | var ctCfxTokensJson = Utils.aesDecode(ctCfxTokens, key); 22 | if (ctCfxTokensJson == null || ctCfxTokensJson.isEmpty) { 23 | return []; 24 | } 25 | var data = jsonDecode(ctCfxTokensJson.toString()); 26 | var model = CtTokenModel.fromJson(data); 27 | if (model.tokens == null) { 28 | return []; 29 | } 30 | return model.tokens; 31 | }catch(e){ 32 | return []; 33 | } 34 | 35 | } 36 | 37 | Future updateCfxCtTokens(String address, List ctTokens) async { 38 | CtTokenModel model = CtTokenModel(); 39 | model.tokens = ctTokens; 40 | var prefs = await SharedPreferences.getInstance(); 41 | if (ctTokens == null || ctTokens.isEmpty) { 42 | prefs.setString('ct_cfx_tokens_' + address, null); 43 | return true; 44 | } 45 | prefs.setString('ct_cfx_tokens_' + address, Utils.aesEncode(jsonEncode(model), Utils.generateMd5Int(b))); 46 | return true; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/model/aeternity/token_list_model.dart: -------------------------------------------------------------------------------- 1 | class TokenListModel { 2 | int code; 3 | String msg; 4 | int time; 5 | List data; 6 | 7 | TokenListModel({this.code, this.msg, this.time, this.data}); 8 | 9 | TokenListModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | if (json['data'] != null) { 14 | data = new List(); 15 | json['data'].forEach((v) { 16 | data.add(new Data.fromJson(v)); 17 | }); 18 | } 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['code'] = this.code; 24 | data['msg'] = this.msg; 25 | data['time'] = this.time; 26 | if (this.data != null) { 27 | data['data'] = this.data.map((v) => v.toJson()).toList(); 28 | } 29 | return data; 30 | } 31 | } 32 | 33 | class Data { 34 | String count; 35 | String countStr; 36 | String ctAddress; 37 | String image; 38 | String name; 39 | String type; 40 | String rate = ""; 41 | 42 | Data({this.count, this.ctAddress, this.image, this.name, this.type}); 43 | 44 | Data.fromJson(Map json) { 45 | count = json['count']; 46 | ctAddress = json['ct_address']; 47 | image = json['image']; 48 | name = json['name']; 49 | type = json['type']; 50 | rate = json['reta']; 51 | } 52 | 53 | Map toJson() { 54 | final Map data = new Map(); 55 | data['count'] = this.count; 56 | data['ct_address'] = this.ctAddress; 57 | data['image'] = this.image; 58 | data['name'] = this.name; 59 | data['type'] = this.type; 60 | data['reta'] = this.rate; 61 | return data; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/dao/aeternity/contract_record_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/contract_balance_model.dart'; 7 | import 'package:box/model/aeternity/contract_info_model.dart'; 8 | import 'package:box/model/aeternity/contract_record_model.dart'; 9 | import 'package:dio/dio.dart'; 10 | 11 | import '../../main.dart'; 12 | 13 | class ContractRecordDao { 14 | static Future fetch() async { 15 | Map params = new Map(); 16 | var address = await BoxApp.getAddress(); 17 | params["address"] = address; 18 | Response response = await Dio().post(CONTRACT_RECORD,queryParameters: params); 19 | if (response.statusCode == 200) { 20 | var data = jsonDecode(response.toString()); 21 | ContractRecordModel model = ContractRecordModel.fromJson(data); 22 | return model; 23 | } else { 24 | throw Exception('Failed to load ContractRecordModel.json'); 25 | } 26 | } 27 | 28 | static Future fetchCtID() async { 29 | Map params = new Map(); 30 | var address = await BoxApp.getAddress(); 31 | params["address"] = address; 32 | params["ct_id"] = "ct_Evidt2ZUPzYYPWhestzpGsJ8uWzB1NgMpEvHHin7GCfgWLpjv"; 33 | Response response = await Dio().post(CONTRACT_RECORD,queryParameters: params); 34 | if (response.statusCode == 200) { 35 | var data = jsonDecode(response.toString()); 36 | ContractRecordModel model = ContractRecordModel.fromJson(data); 37 | return model; 38 | } else { 39 | throw Exception('Failed to load ContractRecordModel.json'); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/model/aeternity/version_model.dart: -------------------------------------------------------------------------------- 1 | class VersionModel { 2 | int code; 3 | String msg; 4 | String time; 5 | Data data; 6 | 7 | VersionModel({this.code, this.msg, this.time, this.data}); 8 | 9 | VersionModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | String isMandatory; 30 | String urlAndroid; 31 | String urlIos; 32 | String version; 33 | String msgCN; 34 | String msgEN; 35 | String versionIos; 36 | 37 | Data({this.isMandatory, this.urlAndroid, this.urlIos, this.version}); 38 | 39 | Data.fromJson(Map json) { 40 | isMandatory = json['is_mandatory']; 41 | urlAndroid = json['url_android']; 42 | urlIos = json['url_ios']; 43 | version = json['version']; 44 | msgCN = json['msg_cn']; 45 | msgEN = json['msg_en']; 46 | versionIos = json['version_ios']; 47 | } 48 | 49 | Map toJson() { 50 | final Map data = new Map(); 51 | data['is_mandatory'] = this.isMandatory; 52 | data['url_android'] = this.urlAndroid; 53 | data['url_ios'] = this.urlIos; 54 | data['version'] = this.version; 55 | data['msg_cn'] = this.msgCN; 56 | data['msg_en'] = this.msgEN; 57 | data['version_ios'] = this.versionIos; 58 | return data; 59 | } 60 | } -------------------------------------------------------------------------------- /lib/model/conflux/cfx_rpc_model.dart: -------------------------------------------------------------------------------- 1 | class CfxRpcModel { 2 | String type; 3 | Payload payload; 4 | int resolver; 5 | 6 | CfxRpcModel({this.type, this.payload, this.resolver}); 7 | 8 | CfxRpcModel.fromJson(Map json) { 9 | type = json['type']; 10 | payload = 11 | json['payload'] != null ? new Payload.fromJson(json['payload']) : null; 12 | resolver = json['resolver']; 13 | } 14 | 15 | Map toJson() { 16 | final Map data = new Map(); 17 | data['type'] = this.type; 18 | if (this.payload != null) { 19 | data['payload'] = this.payload.toJson(); 20 | } 21 | data['resolver'] = this.resolver; 22 | return data; 23 | } 24 | } 25 | 26 | class Payload { 27 | String storageLimit; 28 | String gas; 29 | String gasPrice; 30 | String value; 31 | String from; 32 | String to; 33 | String data; 34 | 35 | Payload( 36 | {this.storageLimit, 37 | this.gas, 38 | this.gasPrice, 39 | this.value, 40 | this.from, 41 | this.to, 42 | this.data}); 43 | 44 | Payload.fromJson(Map json) { 45 | storageLimit = json['storageLimit']; 46 | gas = json['gas']; 47 | gasPrice = json['gasPrice']; 48 | value = json['value']; 49 | from = json['from']; 50 | to = json['to']; 51 | data = json['data']; 52 | } 53 | 54 | Map toJson() { 55 | final Map data = new Map(); 56 | data['storageLimit'] = this.storageLimit; 57 | data['gas'] = this.gas; 58 | data['gasPrice'] = this.gasPrice; 59 | data['value'] = this.value; 60 | data['from'] = this.from; 61 | data['to'] = this.to; 62 | data['data'] = this.data; 63 | return data; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/model/conflux/cfx_nft_preview_model.dart: -------------------------------------------------------------------------------- 1 | class CfxNftPreviewModel { 2 | int code; 3 | Data data; 4 | 5 | CfxNftPreviewModel({this.code, this.data}); 6 | 7 | CfxNftPreviewModel.fromJson(Map json) { 8 | code = json['code']; 9 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 10 | } 11 | 12 | Map toJson() { 13 | final Map data = new Map(); 14 | data['code'] = this.code; 15 | if (this.data != null) { 16 | data['data'] = this.data.toJson(); 17 | } 18 | return data; 19 | } 20 | } 21 | 22 | class Data { 23 | int imageMinHeight; 24 | String imageUri; 25 | ImageName imageName; 26 | 27 | Data({this.imageMinHeight, this.imageUri, this.imageName}); 28 | 29 | Data.fromJson(Map json) { 30 | imageMinHeight = json['imageMinHeight']; 31 | imageUri = json['imageUri']; 32 | imageName = json['imageName'] != null 33 | ? new ImageName.fromJson(json['imageName']) 34 | : null; 35 | } 36 | 37 | Map toJson() { 38 | final Map data = new Map(); 39 | data['imageMinHeight'] = this.imageMinHeight; 40 | data['imageUri'] = this.imageUri; 41 | if (this.imageName != null) { 42 | data['imageName'] = this.imageName.toJson(); 43 | } 44 | return data; 45 | } 46 | } 47 | 48 | class ImageName { 49 | String zh; 50 | String en; 51 | 52 | ImageName({this.zh, this.en}); 53 | 54 | ImageName.fromJson(Map json) { 55 | zh = json['zh']; 56 | en = json['en']; 57 | } 58 | 59 | Map toJson() { 60 | final Map data = new Map(); 61 | data['zh'] = this.zh; 62 | data['en'] = this.en; 63 | return data; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/dao/aeternity/contract_decode_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/contract_balance_model.dart'; 7 | import 'package:box/model/aeternity/contract_decode_model.dart'; 8 | import 'package:box/model/aeternity/contract_info_model.dart'; 9 | import 'package:box/model/aeternity/contract_record_model.dart'; 10 | import 'package:dio/dio.dart'; 11 | 12 | import '../../main.dart'; 13 | 14 | class ContractDecodeDao { 15 | static Future fetch(String hash, String function) async { 16 | Map params = new Map(); 17 | params["hash"] = hash; 18 | params["function"] = function; 19 | Response response = await Dio().post(CONTRACT_DECODE,queryParameters: params); 20 | if (response.statusCode == 200) { 21 | var data = jsonDecode(response.toString()); 22 | ContractDecodeModel model = ContractDecodeModel.fromJson(data); 23 | return model; 24 | } else { 25 | throw Exception('Failed to load ContractDecodeModel.json'); 26 | } 27 | } 28 | 29 | static Future fetchCbId(String hash, String function) async { 30 | Map params = new Map(); 31 | params["hash"] = hash; 32 | params["function"] = function; 33 | params["ct_id"] = "ct_Evidt2ZUPzYYPWhestzpGsJ8uWzB1NgMpEvHHin7GCfgWLpjv"; 34 | Response response = await Dio().post(CONTRACT_DECODE,queryParameters: params); 35 | if (response.statusCode == 200) { 36 | var data = jsonDecode(response.toString()); 37 | ContractDecodeModel model = ContractDecodeModel.fromJson(data); 38 | return model; 39 | } else { 40 | throw Exception('Failed to load ContractDecodeModel.json'); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/model/aeternity/contract_info_model.dart: -------------------------------------------------------------------------------- 1 | class ContractInfoModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | ContractInfoModel({this.code, this.msg, this.time, this.data}); 8 | 9 | ContractInfoModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | String account; 30 | int afterHeight; 31 | String allCount; 32 | String count; 33 | int height; 34 | int minHeight; 35 | String token; 36 | 37 | Data( 38 | {this.account, 39 | this.afterHeight, 40 | this.allCount, 41 | this.count, 42 | this.height, 43 | this.minHeight, 44 | this.token}); 45 | 46 | Data.fromJson(Map json) { 47 | account = json['account']; 48 | afterHeight = json['after_height']; 49 | allCount = json['all_count']; 50 | count = json['count']; 51 | height = json['height']; 52 | minHeight = json['min_height']; 53 | token = json['token']; 54 | } 55 | 56 | Map toJson() { 57 | final Map data = new Map(); 58 | data['account'] = this.account; 59 | data['after_height'] = this.afterHeight; 60 | data['all_count'] = this.allCount; 61 | data['count'] = this.count; 62 | data['height'] = this.height; 63 | data['min_height'] = this.minHeight; 64 | data['token'] = this.token; 65 | return data; 66 | } 67 | } -------------------------------------------------------------------------------- /lib/model/aeternity/swap_coin_my_model.dart: -------------------------------------------------------------------------------- 1 | class SwapCoinAccountModel { 2 | int code; 3 | String msg; 4 | int time; 5 | List data; 6 | 7 | SwapCoinAccountModel({this.code, this.msg, this.time, this.data}); 8 | 9 | SwapCoinAccountModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | if (json['data'] != null) { 14 | data = new List(); 15 | json['data'].forEach((v) { 16 | data.add(new Data.fromJson(v)); 17 | }); 18 | } 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['code'] = this.code; 24 | data['msg'] = this.msg; 25 | data['time'] = this.time; 26 | if (this.data != null) { 27 | data['data'] = this.data.map((v) => v.toJson()).toList(); 28 | } 29 | return data; 30 | } 31 | } 32 | 33 | class Data { 34 | String account; 35 | String coinName; 36 | String aeCount; 37 | String tokenCount; 38 | String token; 39 | double rate; 40 | 41 | Data( 42 | {this.account, 43 | this.coinName, 44 | this.aeCount, 45 | this.tokenCount, 46 | this.token, 47 | this.rate}); 48 | 49 | Data.fromJson(Map json) { 50 | account = json['account']; 51 | coinName = json['coin_name']; 52 | aeCount = json['ae_count']; 53 | tokenCount = json['token_count']; 54 | token = json['token']; 55 | rate = json['rate']; 56 | } 57 | 58 | Map toJson() { 59 | final Map data = new Map(); 60 | data['account'] = this.account; 61 | data['coin_name'] = this.coinName; 62 | data['ae_count'] = this.aeCount; 63 | data['token_count'] = this.tokenCount; 64 | data['token'] = this.token; 65 | data['rate'] = this.rate; 66 | return data; 67 | } 68 | } -------------------------------------------------------------------------------- /lib/model/aeternity/swap_coin_account_model.dart: -------------------------------------------------------------------------------- 1 | class SwapCoinAccountModel { 2 | int code; 3 | String msg; 4 | int time; 5 | List data; 6 | 7 | SwapCoinAccountModel({this.code, this.msg, this.time, this.data}); 8 | 9 | SwapCoinAccountModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | if (json['data'] != null) { 14 | data = new List(); 15 | json['data'].forEach((v) { 16 | data.add(new Data.fromJson(v)); 17 | }); 18 | } 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['code'] = this.code; 24 | data['msg'] = this.msg; 25 | data['time'] = this.time; 26 | if (this.data != null) { 27 | data['data'] = this.data.map((v) => v.toJson()).toList(); 28 | } 29 | return data; 30 | } 31 | } 32 | 33 | class Data { 34 | String account; 35 | String coinName; 36 | String aeCount; 37 | String tokenCount; 38 | String token; 39 | String rate; 40 | 41 | Data( 42 | {this.account, 43 | this.coinName, 44 | this.aeCount, 45 | this.tokenCount, 46 | this.token, 47 | this.rate}); 48 | 49 | Data.fromJson(Map json) { 50 | account = json['account']; 51 | coinName = json['coin_name']; 52 | aeCount = json['ae_count']; 53 | tokenCount = json['token_count']; 54 | token = json['token']; 55 | rate = json['rate']; 56 | } 57 | 58 | Map toJson() { 59 | final Map data = new Map(); 60 | data['account'] = this.account; 61 | data['coin_name'] = this.coinName; 62 | data['ae_count'] = this.aeCount; 63 | data['token_count'] = this.tokenCount; 64 | data['token'] = this.token; 65 | data['rate'] = this.rate; 66 | return data; 67 | } 68 | } -------------------------------------------------------------------------------- /lib/model/conflux/cfx_nft_balance_model.dart: -------------------------------------------------------------------------------- 1 | class CfxNftBalanceModel { 2 | int code; 3 | List data; 4 | 5 | CfxNftBalanceModel({this.code, this.data}); 6 | 7 | CfxNftBalanceModel.fromJson(Map json) { 8 | code = json['code']; 9 | if (json['data'] != null) { 10 | data = new List(); 11 | json['data'].forEach((v) { 12 | data.add(new NftData.fromJson(v)); 13 | }); 14 | } 15 | } 16 | 17 | Map toJson() { 18 | final Map data = new Map(); 19 | data['code'] = this.code; 20 | if (this.data != null) { 21 | data['data'] = this.data.map((v) => v.toJson()).toList(); 22 | } 23 | return data; 24 | } 25 | } 26 | 27 | class NftData { 28 | String address; 29 | String type; 30 | Name name; 31 | String balance; 32 | 33 | NftData({this.address, this.type, this.name, this.balance}); 34 | 35 | NftData.fromJson(Map json) { 36 | address = json['address']; 37 | type = json['type']; 38 | name = json['name'] != null ? new Name.fromJson(json['name']) : null; 39 | balance = json['balance']; 40 | } 41 | 42 | Map toJson() { 43 | final Map data = new Map(); 44 | data['address'] = this.address; 45 | data['type'] = this.type; 46 | if (this.name != null) { 47 | data['name'] = this.name.toJson(); 48 | } 49 | data['balance'] = this.balance; 50 | return data; 51 | } 52 | } 53 | 54 | class Name { 55 | String zh; 56 | String en; 57 | 58 | Name({this.zh, this.en}); 59 | 60 | Name.fromJson(Map json) { 61 | zh = json['zh']; 62 | en = json['en']; 63 | } 64 | 65 | Map toJson() { 66 | final Map data = new Map(); 67 | data['zh'] = this.zh; 68 | data['en'] = this.en; 69 | return data; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /lib/page/aeternity/ae_swaps_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:box/generated/l10n.dart'; 2 | import 'package:box/page/aeternity/ae_swap_buy_sell_page.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/gestures.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | import '../../main.dart'; 8 | 9 | class AeSwapsPage extends StatefulWidget { 10 | @override 11 | _AeSwapsPageState createState() => _AeSwapsPageState(); 12 | } 13 | 14 | class _AeSwapsPageState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return DefaultTabController( 18 | length: 2, 19 | child: Scaffold( 20 | appBar: AppBar( 21 | backgroundColor: Color(0xFFfafbfc), 22 | elevation: 0, 23 | // 隐藏阴影 24 | leading: IconButton( 25 | icon: Icon( 26 | 27 | Icons.arrow_back_ios, 28 | color: Colors.black, 29 | size: 17, 30 | ), 31 | onPressed: () => Navigator.pop(context), 32 | ), 33 | title: Text( 34 | S.of(context).swap_buy_sell_order_title, 35 | style: TextStyle( 36 | fontSize: 18, 37 | color: Colors.black, 38 | fontFamily: BoxApp.language == "cn" ? "Ubuntu" : "Ubuntu", 39 | ), 40 | ), 41 | centerTitle: true, 42 | 43 | ), 44 | body: AeSwapBuySellPage() 45 | ), 46 | ); 47 | } 48 | } 49 | 50 | class CustomFloatingActionButtonLocation extends FloatingActionButtonLocation { 51 | FloatingActionButtonLocation location; 52 | double offsetX; // X方向的偏移量 53 | double offsetY; // Y方向的偏移量 54 | CustomFloatingActionButtonLocation(this.location, this.offsetX, this.offsetY); 55 | 56 | @override 57 | Offset getOffset(ScaffoldPrelayoutGeometry scaffoldGeometry) { 58 | Offset offset = location.getOffset(scaffoldGeometry); 59 | return Offset(offset.dx + offsetX, offset.dy + offsetY); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/model/aeternity/base_name_data_model.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | class BaseNameDataModel { 4 | int code; 5 | String msg; 6 | int time; 7 | Data data; 8 | 9 | BaseNameDataModel({this.code, this.msg, this.time, this.data}); 10 | 11 | BaseNameDataModel.fromJson(Map json) { 12 | code = json['code']; 13 | msg = json['msg']; 14 | time = json['time']; 15 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 16 | } 17 | 18 | Map toJson() { 19 | final Map data = new Map(); 20 | data['code'] = this.code; 21 | data['msg'] = this.msg; 22 | data['time'] = this.time; 23 | if (this.data != null) { 24 | data['data'] = this.data.toJson(); 25 | } 26 | return data; 27 | } 28 | } 29 | 30 | class Data { 31 | int count; 32 | int sum; 33 | double sumPrice; 34 | List ranking; 35 | 36 | Data({this.count, this.sum, this.sumPrice, this.ranking}); 37 | 38 | Data.fromJson(Map json) { 39 | count = json['count']; 40 | sum = json['sum']; 41 | sumPrice = json['sum_price']; 42 | 43 | } 44 | 45 | Map toJson() { 46 | final Map data = new Map(); 47 | data['count'] = this.count; 48 | data['sum'] = this.sum; 49 | data['sum_price'] = this.sumPrice; 50 | 51 | return data; 52 | } 53 | } 54 | 55 | class Ranking { 56 | String owner; 57 | int nameNum; 58 | double sumPrice; 59 | 60 | Ranking({this.owner, this.nameNum, this.sumPrice}); 61 | 62 | Ranking.fromJson(Map json) { 63 | owner = json['owner']; 64 | nameNum = json['name_num']; 65 | sumPrice = json['sum_price']; 66 | } 67 | 68 | Map toJson() { 69 | final Map data = new Map(); 70 | data['owner'] = this.owner; 71 | data['name_num'] = this.nameNum; 72 | data['sum_price'] = this.sumPrice; 73 | return data; 74 | } 75 | } -------------------------------------------------------------------------------- /lib/page/general/photo_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/widgets.dart'; 3 | import 'package:photo_view/photo_view.dart'; 4 | 5 | 6 | class PhotoPage extends StatefulWidget { 7 | final String address; 8 | 9 | const PhotoPage({Key key, this.address}) : super(key: key); 10 | 11 | @override 12 | _PhotoPageState createState() => _PhotoPageState(); 13 | } 14 | 15 | class _PhotoPageState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | backgroundColor: Colors.black, 20 | body: Container( 21 | child: Stack( 22 | children: [ 23 | Positioned( 24 | top: 0, 25 | left: 0, 26 | right: 0, 27 | bottom: 0, 28 | child: PhotoView( 29 | // imageProvider: NetworkImage("https://www.gravatar.com/avatar/" + Utils.generateMD5(DateTime.now().toIso8601String()) + "?s=1024&d=robohash&r=PG"), 30 | imageProvider: NetworkImage(widget.address), 31 | loadingBuilder: (context, _progress) => Center( 32 | child: Container( 33 | width: 40.0, 34 | height: 40.0, 35 | child: CircularProgressIndicator( 36 | valueColor: new AlwaysStoppedAnimation(Color(0xFFF22B79)), 37 | ), 38 | ), 39 | ), 40 | ), 41 | ), 42 | Positioned( 43 | //右上角关闭按钮 44 | right: 10, 45 | top: MediaQuery.of(context).padding.top, 46 | child: IconButton( 47 | icon: Icon( 48 | Icons.close, 49 | size: 20, 50 | color: Colors.white, 51 | ), 52 | onPressed: () { 53 | Navigator.of(context).pop(); 54 | }, 55 | ), 56 | ), 57 | ], 58 | )), 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/page/general/scan_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:box/generated/l10n.dart'; 2 | import 'package:box/widget/qrcode_reader_view.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/widgets.dart'; 6 | 7 | class ScanPage extends StatefulWidget { 8 | 9 | ScanPage({Key key}) : super(key: key); 10 | 11 | @override 12 | _ScanPageState createState() => _ScanPageState(); 13 | } 14 | 15 | class _ScanPageState extends State { 16 | 17 | GlobalKey _key = GlobalKey(); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | body: QrcodeReaderView( 23 | key: _key, 24 | onScan: onScan, 25 | boxLineColor:Color(0xFFFC2365), 26 | headerWidget: Container( 27 | child: AppBar( 28 | backgroundColor: Color(0x22000000), 29 | // 隐藏阴影 30 | leading: IconButton( 31 | icon: Icon( 32 | Icons.arrow_back_ios, 33 | size: 17, 34 | color: Colors.white, 35 | ), 36 | onPressed: () => Navigator.pop(context), 37 | ), 38 | 39 | 40 | 41 | ), 42 | ), 43 | helpWidget: Text( 44 | S.of(context).scan_page_content, 45 | ), 46 | ), 47 | ); 48 | } 49 | 50 | Future onScan(String data) async { 51 | if(data == null){ 52 | return; 53 | } 54 | Navigator.pop(context,data); 55 | // await showCupertinoDialog( 56 | // context: context, 57 | // builder: (context) { 58 | // 59 | // return CupertinoAlertDialog( 60 | // title: Text("扫码结果"), 61 | // content: Text(data), 62 | // actions: [ 63 | // CupertinoDialogAction( 64 | // child: Text("确认"), 65 | // onPressed: () => Navigator.pop(context), 66 | // ) 67 | // ], 68 | // ); 69 | // }, 70 | // ); 71 | // _key.currentState.startScan(); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/model/aeternity/contract_record_model.dart: -------------------------------------------------------------------------------- 1 | class ContractRecordModel { 2 | int code; 3 | String msg; 4 | int time; 5 | List data; 6 | 7 | ContractRecordModel({this.code, this.msg, this.time, this.data}); 8 | 9 | ContractRecordModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | if (json['data'] != null) { 14 | data = new List(); 15 | json['data'].forEach((v) { 16 | data.add(new Data.fromJson(v)); 17 | }); 18 | } 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['code'] = this.code; 24 | data['msg'] = this.msg; 25 | data['time'] = this.time; 26 | if (this.data != null) { 27 | data['data'] = this.data.map((v) => v.toJson()).toList(); 28 | } 29 | return data; 30 | } 31 | } 32 | 33 | class Data { 34 | String account; 35 | int continueHeight; 36 | int day; 37 | int height; 38 | String number; 39 | String tokenNumber; 40 | int unlockHeight; 41 | 42 | Data( 43 | {this.account, 44 | this.continueHeight, 45 | this.day, 46 | this.number, 47 | this.tokenNumber, 48 | this.unlockHeight}); 49 | 50 | Data.fromJson(Map json) { 51 | account = json['account']; 52 | continueHeight = json['continue_height']; 53 | day = json['day']; 54 | height = json['height']; 55 | number = json['number']; 56 | tokenNumber = json['token_number']; 57 | unlockHeight = json['unlock_height']; 58 | } 59 | 60 | Map toJson() { 61 | final Map data = new Map(); 62 | data['account'] = this.account; 63 | data['continue_height'] = this.continueHeight; 64 | data['day'] = this.day; 65 | data['height'] = this.height; 66 | data['number'] = this.number; 67 | data['token_number'] = this.tokenNumber; 68 | data['unlock_height'] = this.unlockHeight; 69 | return data; 70 | } 71 | } -------------------------------------------------------------------------------- /lib/model/aeternity/name_reverse_model.dart: -------------------------------------------------------------------------------- 1 | class NameReverseModel { 2 | String name; 3 | String nameHash; 4 | String txHash; 5 | int createdAtHeight; 6 | int auctionEndHeight; 7 | String owner; 8 | int expiresAt; 9 | List pointers; 10 | 11 | NameReverseModel( 12 | {this.name, 13 | this.nameHash, 14 | this.txHash, 15 | this.createdAtHeight, 16 | this.auctionEndHeight, 17 | this.owner, 18 | this.expiresAt, 19 | this.pointers}); 20 | 21 | NameReverseModel.fromJson(Map json) { 22 | name = json['name']; 23 | nameHash = json['name_hash']; 24 | txHash = json['tx_hash']; 25 | createdAtHeight = json['created_at_height']; 26 | auctionEndHeight = json['auction_end_height']; 27 | owner = json['owner']; 28 | expiresAt = json['expires_at']; 29 | if (json['pointers'] != null) { 30 | pointers = new List(); 31 | json['pointers'].forEach((v) { 32 | pointers.add(new Pointers.fromJson(v)); 33 | }); 34 | } 35 | } 36 | 37 | Map toJson() { 38 | final Map data = new Map(); 39 | data['name'] = this.name; 40 | data['name_hash'] = this.nameHash; 41 | data['tx_hash'] = this.txHash; 42 | data['created_at_height'] = this.createdAtHeight; 43 | data['auction_end_height'] = this.auctionEndHeight; 44 | data['owner'] = this.owner; 45 | data['expires_at'] = this.expiresAt; 46 | if (this.pointers != null) { 47 | data['pointers'] = this.pointers.map((v) => v.toJson()).toList(); 48 | } 49 | return data; 50 | } 51 | } 52 | 53 | class Pointers { 54 | String id; 55 | String key; 56 | 57 | Pointers({this.id, this.key}); 58 | 59 | Pointers.fromJson(Map json) { 60 | id = json['id']; 61 | key = json['key']; 62 | } 63 | 64 | Map toJson() { 65 | final Map data = new Map(); 66 | data['id'] = this.id; 67 | data['key'] = this.key; 68 | return data; 69 | } 70 | } -------------------------------------------------------------------------------- /lib/dao/aeternity/contract_call_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:box/dao/urls.dart'; 4 | import 'package:box/model/aeternity/account_info_model.dart'; 5 | import 'package:box/model/aeternity/block_top_model.dart'; 6 | import 'package:box/model/aeternity/contract_balance_model.dart'; 7 | import 'package:box/model/aeternity/contract_call_model.dart'; 8 | import 'package:box/model/aeternity/contract_info_model.dart'; 9 | import 'package:box/model/aeternity/contract_record_model.dart'; 10 | import 'package:box/model/aeternity/msg_sign_model.dart'; 11 | import 'package:dio/dio.dart'; 12 | 13 | import '../../main.dart'; 14 | 15 | class ContractCallDao { 16 | static Future fetch(String function, String paramsValue, String address, String amount) async { 17 | Map params = new Map(); 18 | params["function"] = function; 19 | params["params"] = paramsValue; 20 | params["address"] = address; 21 | params["amount"] = amount; 22 | Response response = await Dio().post(CONTRACT_CALL, queryParameters: params); 23 | if (response.statusCode == 200) { 24 | var data = jsonDecode(response.toString()); 25 | 26 | MsgSignModel model = MsgSignModel.fromJson(data); 27 | return model; 28 | } else { 29 | throw Exception('Failed to load ContractCallModel.json'); 30 | } 31 | } 32 | static Future fetchCtID(String function, String paramsValue, String address, String amount) async { 33 | Map params = new Map(); 34 | params["function"] = function; 35 | params["ct_id"] = "ct_Evidt2ZUPzYYPWhestzpGsJ8uWzB1NgMpEvHHin7GCfgWLpjv"; 36 | params["params"] = paramsValue; 37 | params["address"] = address; 38 | params["amount"] = amount; 39 | Response response = await Dio().post(CONTRACT_CALL, queryParameters: params); 40 | if (response.statusCode == 200) { 41 | var data = jsonDecode(response.toString()); 42 | 43 | MsgSignModel model = MsgSignModel.fromJson(data); 44 | return model; 45 | } else { 46 | throw Exception('Failed to load ContractCallModel.json'); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/model/aeternity/price_model.dart: -------------------------------------------------------------------------------- 1 | class PriceModel { 2 | Aeternity aeternity; 3 | Conflux conflux; 4 | Tether tether; 5 | 6 | PriceModel({this.aeternity}); 7 | 8 | PriceModel.fromJson(Map json) { 9 | aeternity = json['aeternity'] != null ? new Aeternity.fromJson(json['aeternity']) : null; 10 | conflux = json['conflux-token'] != null ? new Conflux.fromJson(json['conflux-token']) : null; 11 | tether = json['tether'] != null ? new Tether.fromJson(json['tether']) : null; 12 | } 13 | 14 | Map toJson() { 15 | final Map data = new Map(); 16 | if (this.aeternity != null) { 17 | data['aeternity'] = this.aeternity.toJson(); 18 | data['conflux-token'] = this.conflux.toJson(); 19 | data['Tether'] = this.tether.toJson(); 20 | } 21 | return data; 22 | } 23 | } 24 | 25 | class Aeternity { 26 | double usd; 27 | double cny; 28 | 29 | Aeternity({this.usd, this.cny}); 30 | 31 | Aeternity.fromJson(Map json) { 32 | usd = json['usd']; 33 | cny = json['cny']; 34 | } 35 | 36 | Map toJson() { 37 | final Map data = new Map(); 38 | data['usd'] = this.usd; 39 | data['cny'] = this.cny; 40 | return data; 41 | } 42 | } 43 | 44 | class Conflux { 45 | double usd; 46 | double cny; 47 | 48 | Conflux({this.usd, this.cny}); 49 | 50 | Conflux.fromJson(Map json) { 51 | usd = json['usd']; 52 | cny = json['cny']; 53 | } 54 | 55 | Map toJson() { 56 | final Map data = new Map(); 57 | data['usd'] = this.usd; 58 | data['cny'] = this.cny; 59 | return data; 60 | } 61 | } 62 | 63 | class Tether { 64 | double usd; 65 | double cny; 66 | 67 | Tether({this.usd, this.cny}); 68 | 69 | Tether.fromJson(Map json) { 70 | usd = json['usd']; 71 | cny = json['cny']; 72 | } 73 | 74 | Map toJson() { 75 | final Map data = new Map(); 76 | data['usd'] = this.usd; 77 | data['cny'] = this.cny; 78 | return data; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/utils/RelativeDateFormat.dart: -------------------------------------------------------------------------------- 1 | class RelativeDateFormat { 2 | static final num ONE_MINUTE = 60000; 3 | static final num ONE_HOUR = 3600000; 4 | static final num ONE_DAY = 86400000; 5 | static final num ONE_WEEK = 604800000; 6 | 7 | static final String ONE_SECOND_AGO = "秒前"; 8 | static final String ONE_MINUTE_AGO = "分钟前"; 9 | static final String ONE_HOUR_AGO = "小时前"; 10 | static final String ONE_DAY_AGO = "天前"; 11 | static final String ONE_MONTH_AGO = "月前"; 12 | static final String ONE_YEAR_AGO = "年前"; 13 | 14 | //时间转换 15 | static String format(int date) { 16 | 17 | num delta = (DateTime.now().millisecondsSinceEpoch - date); 18 | if (delta < 1 * ONE_MINUTE) { 19 | num seconds = toSeconds(delta); 20 | return (seconds <= 0 ? 1 : seconds).toInt().toString() + ONE_SECOND_AGO; 21 | } 22 | if (delta < 45 * ONE_MINUTE) { 23 | num minutes = toMinutes(delta); 24 | return (minutes <= 0 ? 1 : minutes).toInt().toString() + ONE_MINUTE_AGO; 25 | } 26 | if (delta < 24 * ONE_HOUR) { 27 | num hours = toHours(delta); 28 | return (hours <= 0 ? 1 : hours).toInt().toString() + ONE_HOUR_AGO; 29 | } 30 | if (delta < 48 * ONE_HOUR) { 31 | return "昨天"; 32 | } 33 | if (delta < 30 * ONE_DAY) { 34 | num days = toDays(delta); 35 | return (days <= 0 ? 1 : days).toInt().toString() + ONE_DAY_AGO; 36 | } 37 | if (delta < 12 * 4 * ONE_WEEK) { 38 | num months = toMonths(delta); 39 | return (months <= 0 ? 1 : months).toInt().toString() + ONE_MONTH_AGO; 40 | } else { 41 | num years = toYears(delta); 42 | return (years <= 0 ? 1 : years).toInt().toString() + ONE_YEAR_AGO; 43 | } 44 | } 45 | 46 | static num toSeconds(num date) { 47 | return date / 1000; 48 | } 49 | 50 | static num toMinutes(num date) { 51 | return toSeconds(date) / 60; 52 | } 53 | 54 | static num toHours(num date) { 55 | return toMinutes(date) / 60; 56 | } 57 | 58 | static num toDays(num date) { 59 | return toHours(date) / 24; 60 | } 61 | 62 | static num toMonths(num date) { 63 | return toDays(date) / 30; 64 | } 65 | 66 | static num toYears(num date) { 67 | return toMonths(date) / 365; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /lib/model/aeternity/swap_order_model.dart: -------------------------------------------------------------------------------- 1 | class SwapOrderModel { 2 | int code; 3 | String msg; 4 | int time; 5 | List data; 6 | 7 | SwapOrderModel({this.code, this.msg, this.time, this.data}); 8 | 9 | SwapOrderModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | if (json['data'] != null) { 14 | data = new List(); 15 | json['data'].forEach((v) { 16 | data.add(new Data.fromJson(v)); 17 | }); 18 | } 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['code'] = this.code; 24 | data['msg'] = this.msg; 25 | data['time'] = this.time; 26 | if (this.data != null) { 27 | data['data'] = this.data.map((v) => v.toJson()).toList(); 28 | } 29 | return data; 30 | } 31 | } 32 | 33 | class Data { 34 | String ae; 35 | String buyAddress; 36 | int cHeight; 37 | int cTime; 38 | String coin; 39 | String count; 40 | int pHeight; 41 | int pTime; 42 | String sellAddress; 43 | 44 | Data( 45 | {this.ae, 46 | this.buyAddress, 47 | this.cHeight, 48 | this.cTime, 49 | this.coin, 50 | this.count, 51 | this.pHeight, 52 | this.pTime, 53 | this.sellAddress}); 54 | 55 | Data.fromJson(Map json) { 56 | ae = json['ae']; 57 | buyAddress = json['buy_address']; 58 | cHeight = json['c_height']; 59 | cTime = json['c_time']; 60 | coin = json['coin']; 61 | count = json['count']; 62 | pHeight = json['p_height']; 63 | pTime = json['p_time']; 64 | sellAddress = json['sell_address']; 65 | } 66 | 67 | Map toJson() { 68 | final Map data = new Map(); 69 | data['ae'] = this.ae; 70 | data['buy_address'] = this.buyAddress; 71 | data['c_height'] = this.cHeight; 72 | data['c_time'] = this.cTime; 73 | data['coin'] = this.coin; 74 | data['count'] = this.count; 75 | data['p_height'] = this.pHeight; 76 | data['p_time'] = this.pTime; 77 | data['sell_address'] = this.sellAddress; 78 | return data; 79 | } 80 | } -------------------------------------------------------------------------------- /lib/model/conflux/cfx_dapp_list_model.dart: -------------------------------------------------------------------------------- 1 | class CfxDappListModel { 2 | int code; 3 | String msg; 4 | int time; 5 | List data; 6 | 7 | CfxDappListModel({this.code, this.msg, this.time, this.data}); 8 | 9 | CfxDappListModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | if (json['data'] != null) { 14 | data = new List(); 15 | json['data'].forEach((v) { 16 | data.add(new Data.fromJson(v)); 17 | }); 18 | } 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['code'] = this.code; 24 | data['msg'] = this.msg; 25 | data['time'] = this.time; 26 | if (this.data != null) { 27 | data['data'] = this.data.map((v) => v.toJson()).toList(); 28 | } 29 | return data; 30 | } 31 | } 32 | 33 | class Data { 34 | String type; 35 | List dataList; 36 | 37 | Data({this.type, this.dataList}); 38 | 39 | Data.fromJson(Map json) { 40 | type = json['type']; 41 | if (json['data_list'] != null) { 42 | dataList = new List(); 43 | json['data_list'].forEach((v) { 44 | dataList.add(new DataList.fromJson(v)); 45 | }); 46 | } 47 | } 48 | 49 | Map toJson() { 50 | final Map data = new Map(); 51 | data['type'] = this.type; 52 | if (this.dataList != null) { 53 | data['data_list'] = this.dataList.map((v) => v.toJson()).toList(); 54 | } 55 | return data; 56 | } 57 | } 58 | 59 | class DataList { 60 | String name; 61 | String url; 62 | String icon; 63 | String content; 64 | List tabs; 65 | 66 | DataList({this.name, this.url, this.icon, this.content, this.tabs}); 67 | 68 | DataList.fromJson(Map json) { 69 | name = json['name']; 70 | url = json['url']; 71 | icon = json['icon']; 72 | content = json['content']; 73 | tabs = json['tabs'].cast(); 74 | } 75 | 76 | Map toJson() { 77 | final Map data = new Map(); 78 | data['name'] = this.name; 79 | data['url'] = this.url; 80 | data['icon'] = this.icon; 81 | data['content'] = this.content; 82 | data['tabs'] = this.tabs; 83 | return data; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/model/aeternity/contract_ranking_model.dart: -------------------------------------------------------------------------------- 1 | class RankingModel { 2 | int code; 3 | String msg; 4 | int time; 5 | Data data; 6 | 7 | RankingModel({this.code, this.msg, this.time, this.data}); 8 | 9 | RankingModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | data = json['data'] != null ? new Data.fromJson(json['data']) : null; 14 | } 15 | 16 | Map toJson() { 17 | final Map data = new Map(); 18 | data['code'] = this.code; 19 | data['msg'] = this.msg; 20 | data['time'] = this.time; 21 | if (this.data != null) { 22 | data['data'] = this.data.toJson(); 23 | } 24 | return data; 25 | } 26 | } 27 | 28 | class Data { 29 | String outCount; 30 | List ranking; 31 | 32 | Data({this.outCount, this.ranking}); 33 | 34 | Data.fromJson(Map json) { 35 | outCount = json['out_count']; 36 | if (json['ranking'] != null) { 37 | ranking = new List(); 38 | json['ranking'].forEach((v) { 39 | ranking.add(new Ranking.fromJson(v)); 40 | }); 41 | } 42 | } 43 | 44 | Map toJson() { 45 | final Map data = new Map(); 46 | data['out_count'] = this.outCount; 47 | if (this.ranking != null) { 48 | data['ranking'] = this.ranking.map((v) => v.toJson()).toList(); 49 | } 50 | return data; 51 | } 52 | } 53 | 54 | class Ranking { 55 | String address; 56 | String count; 57 | String outCount; 58 | String proportion; 59 | 60 | Ranking({this.address, this.count, this.outCount, this.proportion}); 61 | 62 | Ranking.fromJson(Map json) { 63 | address = json['address']; 64 | count = json['count']; 65 | outCount = json['OutCount']; 66 | proportion = json['proportion']; 67 | } 68 | 69 | Map toJson() { 70 | final Map data = new Map(); 71 | data['address'] = this.address; 72 | data['count'] = this.count; 73 | data['OutCount'] = this.outCount; 74 | data['proportion'] = this.proportion; 75 | return data; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/model/aeternity/aens_page_model.dart: -------------------------------------------------------------------------------- 1 | class AensPageModel { 2 | int code; 3 | List data; 4 | String msg; 5 | int time; 6 | 7 | AensPageModel({this.code, this.data, this.msg, this.time}); 8 | 9 | AensPageModel.fromJson(Map json) { 10 | code = json['code']; 11 | if (json['data'] != null) { 12 | data = new List(); 13 | json['data'].forEach((v) { 14 | data.add(new Data.fromJson(v)); 15 | }); 16 | } 17 | msg = json['msg']; 18 | time = json['time']; 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['code'] = this.code; 24 | if (this.data != null) { 25 | data['data'] = this.data.map((v) => v.toJson()).toList(); 26 | } 27 | data['msg'] = this.msg; 28 | data['time'] = this.time; 29 | return data; 30 | } 31 | } 32 | 33 | class Data { 34 | int currentHeight; 35 | String currentPrice; 36 | int endHeight; 37 | int length; 38 | String name; 39 | int overHeight; 40 | String owner; 41 | String price; 42 | int startHeight; 43 | String thHash; 44 | 45 | Data( 46 | {this.currentHeight, 47 | this.currentPrice, 48 | this.endHeight, 49 | this.length, 50 | this.name, 51 | this.overHeight, 52 | this.owner, 53 | this.price, 54 | this.startHeight, 55 | this.thHash}); 56 | 57 | Data.fromJson(Map json) { 58 | currentHeight = json['current_height']; 59 | currentPrice = json['current_price']; 60 | endHeight = json['end_height']; 61 | length = json['length']; 62 | name = json['name']; 63 | overHeight = json['over_height']; 64 | owner = json['owner']; 65 | price = json['price']; 66 | startHeight = json['start_height']; 67 | thHash = json['th_hash']; 68 | } 69 | 70 | Map toJson() { 71 | final Map data = new Map(); 72 | data['current_height'] = this.currentHeight; 73 | data['current_price'] = this.currentPrice; 74 | data['end_height'] = this.endHeight; 75 | data['length'] = this.length; 76 | data['name'] = this.name; 77 | data['over_height'] = this.overHeight; 78 | data['owner'] = this.owner; 79 | data['price'] = this.price; 80 | data['start_height'] = this.startHeight; 81 | data['th_hash'] = this.thHash; 82 | return data; 83 | } 84 | } -------------------------------------------------------------------------------- /lib/widget/custom_b_t_route.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | class CustomBTRoute extends PageRouteBuilder{ 3 | final Widget widget; 4 | 5 | CustomBTRoute(this.widget) 6 | :super( 7 | // 设置过度时间 8 | transitionDuration:Duration(milliseconds: 300), 9 | // 构造器 10 | pageBuilder:( 11 | // 上下文和动画 12 | BuildContext context, 13 | Animation animaton1, 14 | Animation animaton2, 15 | ){ 16 | return widget; 17 | }, 18 | transitionsBuilder:( 19 | BuildContext context, 20 | Animation animaton1, 21 | Animation animaton2, 22 | Widget child, 23 | ){ 24 | 25 | // 需要什么效果把注释打开就行了 26 | // 渐变效果 27 | // return FadeTransition( 28 | // // 从0开始到1 29 | // opacity: Tween(begin: 0.0,end: 1.0) 30 | // .animate(CurvedAnimation( 31 | // // 传入设置的动画 32 | // parent: animaton1, 33 | // // 设置效果,快进漫出 这里有很多内置的效果 34 | // curve: Curves.fastOutSlowIn, 35 | // )), 36 | // child: child, 37 | // ); 38 | 39 | // 缩放动画效果 40 | // return ScaleTransition( 41 | // scale: Tween(begin: 0.0,end: 1.0).animate(CurvedAnimation( 42 | // parent: animaton1, 43 | // curve: Curves.fastOutSlowIn 44 | // )), 45 | // child: child, 46 | // ); 47 | 48 | // 旋转加缩放动画效果 49 | // return RotationTransition( 50 | // turns: Tween(begin: 0.0,end: 1.0) 51 | // .animate(CurvedAnimation( 52 | // parent: animaton1, 53 | // curve: Curves.fastOutSlowIn, 54 | // )), 55 | // child: ScaleTransition( 56 | // scale: Tween(begin: 0.0,end: 1.0) 57 | // .animate(CurvedAnimation( 58 | // parent: animaton1, 59 | // curve: Curves.fastOutSlowIn 60 | // )), 61 | // child: child, 62 | // ), 63 | // ); 64 | 65 | // 左右滑动动画效果 66 | return SlideTransition( 67 | position: Tween( 68 | // 设置滑动的 X , Y 轴 69 | begin: Offset(1.0, -0.0), 70 | end: Offset(0.0,0.0) 71 | ).animate(CurvedAnimation( 72 | parent: animaton1, 73 | curve: Curves.fastOutSlowIn 74 | )), 75 | child: child, 76 | ); 77 | } 78 | ); 79 | } -------------------------------------------------------------------------------- /lib/generated/intl/messages_all.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT. This is code generated via package:intl/generate_localized.dart 2 | // This is a library that looks up messages for specific locales by 3 | // delegating to the appropriate library. 4 | 5 | // Ignore issues from commonly used lints in this file. 6 | // ignore_for_file:implementation_imports, file_names, unnecessary_new 7 | // ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering 8 | // ignore_for_file:argument_type_not_assignable, invalid_assignment 9 | // ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases 10 | // ignore_for_file:comment_references 11 | 12 | import 'dart:async'; 13 | 14 | import 'package:intl/intl.dart'; 15 | import 'package:intl/message_lookup_by_library.dart'; 16 | import 'package:intl/src/intl_helpers.dart'; 17 | 18 | import 'messages_cn.dart' as messages_cn; 19 | import 'messages_en.dart' as messages_en; 20 | 21 | typedef Future LibraryLoader(); 22 | Map _deferredLibraries = { 23 | 'cn': () => new Future.value(null), 24 | 'en': () => new Future.value(null), 25 | }; 26 | 27 | MessageLookupByLibrary _findExact(String localeName) { 28 | switch (localeName) { 29 | case 'cn': 30 | return messages_cn.messages; 31 | case 'en': 32 | return messages_en.messages; 33 | default: 34 | return null; 35 | } 36 | } 37 | 38 | /// User programs should call this before using [localeName] for messages. 39 | Future initializeMessages(String localeName) async { 40 | var availableLocale = Intl.verifiedLocale( 41 | localeName, 42 | (locale) => _deferredLibraries[locale] != null, 43 | onFailure: (_) => null); 44 | if (availableLocale == null) { 45 | return new Future.value(false); 46 | } 47 | var lib = _deferredLibraries[availableLocale]; 48 | await (lib == null ? new Future.value(false) : lib()); 49 | initializeInternalMessageLookup(() => new CompositeMessageLookup()); 50 | messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor); 51 | return new Future.value(true); 52 | } 53 | 54 | bool _messagesExistFor(String locale) { 55 | try { 56 | return _findExact(locale) != null; 57 | } catch (e) { 58 | return false; 59 | } 60 | } 61 | 62 | MessageLookupByLibrary _findGeneratedMessagesFor(String locale) { 63 | var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, 64 | onFailure: (_) => null); 65 | if (actualLocale == null) return null; 66 | return _findExact(actualLocale); 67 | } 68 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/model/aeternity/swap_coin_order_model.dart: -------------------------------------------------------------------------------- 1 | class SwapCoinOrderModel { 2 | int code; 3 | String msg; 4 | int time; 5 | List data; 6 | 7 | SwapCoinOrderModel({this.code, this.msg, this.time, this.data}); 8 | 9 | SwapCoinOrderModel.fromJson(Map json) { 10 | code = json['code']; 11 | msg = json['msg']; 12 | time = json['time']; 13 | if (json['data'] != null) { 14 | data = new List(); 15 | json['data'].forEach((v) { 16 | data.add(new Data.fromJson(v)); 17 | }); 18 | } 19 | } 20 | 21 | Map toJson() { 22 | final Map data = new Map(); 23 | data['code'] = this.code; 24 | data['msg'] = this.msg; 25 | data['time'] = this.time; 26 | if (this.data != null) { 27 | data['data'] = this.data.map((v) => v.toJson()).toList(); 28 | } 29 | return data; 30 | } 31 | } 32 | 33 | class Data { 34 | String aeCount; 35 | String buyAddress; 36 | String coinName; 37 | int createHeight; 38 | int createTime; 39 | int currentHeight; 40 | int payHeight; 41 | int payTime; 42 | String sellAddress; 43 | String tokenCount; 44 | 45 | Data( 46 | {this.aeCount, 47 | this.buyAddress, 48 | this.coinName, 49 | this.createHeight, 50 | this.createTime, 51 | this.currentHeight, 52 | this.payHeight, 53 | this.payTime, 54 | this.sellAddress, 55 | this.tokenCount}); 56 | 57 | Data.fromJson(Map json) { 58 | aeCount = json['ae_count']; 59 | buyAddress = json['buy_address']; 60 | coinName = json['coin_name']; 61 | createHeight = json['create_height']; 62 | createTime = json['create_time']; 63 | currentHeight = json['current_height']; 64 | payHeight = json['pay_height']; 65 | payTime = json['pay_time']; 66 | sellAddress = json['sell_address']; 67 | tokenCount = json['token_count']; 68 | } 69 | 70 | Map toJson() { 71 | final Map data = new Map(); 72 | data['ae_count'] = this.aeCount; 73 | data['buy_address'] = this.buyAddress; 74 | data['coin_name'] = this.coinName; 75 | data['create_height'] = this.createHeight; 76 | data['create_time'] = this.createTime; 77 | data['current_height'] = this.currentHeight; 78 | data['pay_height'] = this.payHeight; 79 | data['pay_time'] = this.payTime; 80 | data['sell_address'] = this.sellAddress; 81 | data['token_count'] = this.tokenCount; 82 | return data; 83 | } 84 | } --------------------------------------------------------------------------------