diff --git a/assets/images/gov/Commonwealth.png b/assets/images/gov/Commonwealth.png deleted file mode 100644 index 6bd1575e..00000000 Binary files a/assets/images/gov/Commonwealth.png and /dev/null differ diff --git a/assets/images/gov/Polkascan.png b/assets/images/gov/Polkascan.png deleted file mode 100644 index eff18154..00000000 Binary files a/assets/images/gov/Polkascan.png and /dev/null differ diff --git a/assets/images/gov/Polkassembly.png b/assets/images/gov/Polkassembly.png deleted file mode 100644 index 0e52a71e..00000000 Binary files a/assets/images/gov/Polkassembly.png and /dev/null differ diff --git a/assets/images/gov/SubSquare.png b/assets/images/gov/SubSquare.png deleted file mode 100644 index d31f3cff..00000000 Binary files a/assets/images/gov/SubSquare.png and /dev/null differ diff --git a/assets/images/gov/Subscan.png b/assets/images/gov/Subscan.png deleted file mode 100644 index 860dbe8d..00000000 Binary files a/assets/images/gov/Subscan.png and /dev/null differ diff --git a/lib/pages/governanceNew/govExternalLinks.dart b/lib/pages/governanceNew/govExternalLinks.dart deleted file mode 100644 index 83af5be1..00000000 --- a/lib/pages/governanceNew/govExternalLinks.dart +++ /dev/null @@ -1,50 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:polkawallet_ui/utils/index.dart'; - -class GovExternalLinks extends StatelessWidget { - GovExternalLinks(this.links); - - final List? links; - - Widget buildItem(dynamic data, BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - UI.launchURL(data['link']); - }, - child: Padding( - padding: EdgeInsets.only(left: 15), - child: Column( - children: [ - Container( - width: 40, - height: 40, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4)), - color: Color.fromARGB(255, 84, 85, 86), - ), - alignment: Alignment.center, - child: Image.asset( - "packages/polkawallet_plugin_acala/assets/images/gov/${data['name']}.png", - height: 28), - ), - Text( - data['name'], - style: Theme.of(context).textTheme.headline5?.copyWith( - color: Colors.white, - fontSize: UI.getTextSize(10, context), - fontWeight: FontWeight.w300), - ) - ], - ))); - } - - @override - Widget build(BuildContext context) { - return Row( - mainAxisAlignment: MainAxisAlignment.end, - mainAxisSize: MainAxisSize.min, - children: (links ?? []).map((e) => buildItem(e, context)).toList(), - ); - } -} diff --git a/lib/pages/governanceNew/governancePage.dart b/lib/pages/governanceNew/governancePage.dart index 6d8766fd..4ca775d5 100644 --- a/lib/pages/governanceNew/governancePage.dart +++ b/lib/pages/governanceNew/governancePage.dart @@ -1,7 +1,6 @@ import 'package:card_swiper/card_swiper.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; -import 'package:polkawallet_plugin_acala/pages/governanceNew/govExternalLinks.dart'; import 'package:polkawallet_plugin_acala/pages/governanceNew/proposalPanel.dart'; import 'package:polkawallet_plugin_acala/pages/governanceNew/referendumPanel.dart'; import 'package:polkawallet_plugin_acala/polkawallet_plugin_acala.dart'; @@ -14,6 +13,7 @@ import 'package:polkawallet_sdk/utils/i18n.dart'; import 'package:polkawallet_ui/components/addressIcon.dart'; import 'package:polkawallet_ui/components/connectionChecker.dart'; import 'package:polkawallet_ui/components/infoItemRow.dart'; +import 'package:polkawallet_ui/components/v3/plugin/govExternalLinks.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginAccountInfoAction.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginButton.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginInfoItem.dart';