diff --git a/CHANGELOG.md b/CHANGELOG.md index a81f290c3..613ae80a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [0.4.4] - 20220321. + +* bump polkawallet_sdk: 0.4.4. +* v3 UI update. + ## [0.3.6] - 20211101. * bump polkawallet_sdk: 0.3.7. diff --git a/lib/pages/governance.dart b/lib/pages/governance.dart deleted file mode 100644 index 52634a721..000000000 --- a/lib/pages/governance.dart +++ /dev/null @@ -1,127 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_mobx/flutter_mobx.dart'; -import 'package:polkawallet_plugin_kusama/pages/governance/council/councilPage.dart'; -import 'package:polkawallet_plugin_kusama/pages/governance/democracy/democracyPage.dart'; -import 'package:polkawallet_plugin_kusama/pages/governance/treasury/treasuryPage.dart'; -import 'package:polkawallet_plugin_kusama/utils/i18n/index.dart'; -import 'package:polkawallet_sdk/plugin/index.dart'; -import 'package:polkawallet_sdk/utils/i18n.dart'; -import 'package:polkawallet_ui/components/SkaletonList.dart'; -import 'package:polkawallet_ui/pages/dAppWrapperPage.dart'; -import 'package:polkawallet_ui/components/v3/plugin/pluginItemCard.dart'; - -class Gov extends StatelessWidget { - Gov(this.plugin); - - final PolkawalletPlugin plugin; - - @override - Widget build(BuildContext context) { - return Observer(builder: (_) { - if (plugin.sdk.api.connectedNode == null) { - return SkaletonList( - padding: EdgeInsets.zero, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - items: 4, - itemMargin: EdgeInsets.only(bottom: 16), - child: Container( - padding: EdgeInsets.fromLTRB(9, 6, 6, 11), - child: Column( - children: [ - Row( - children: [ - Container( - width: 50, - height: 18, - color: Colors.white, - ), - SizedBox(width: 6), - Container( - width: 18, - height: 18, - padding: EdgeInsets.all(2), - decoration: BoxDecoration( - borderRadius: - const BorderRadius.all(const Radius.circular(5)), - color: Colors.white, - )) - ], - ), - SizedBox(height: 7), - Container( - width: double.infinity, - height: 11, - color: Colors.white, - ), - SizedBox(height: 3), - Container( - width: double.infinity, - height: 11, - color: Colors.white, - ), - ], - ), - ), - ); - } - - final dic = I18n.of(context)!.getDic(i18n_full_dic_kusama, 'gov'); - - return Container( - child: Column( - children: [ - GestureDetector( - child: PluginItemCard( - margin: EdgeInsets.only(bottom: 16), - title: dic!['democracy']!, - describe: dic['democracy.brief']!, - icon: Image.asset( - 'packages/polkawallet_plugin_kusama/assets/images/public/icon_democracy.png', - width: 18), - ), - onTap: () => Navigator.of(context).pushNamed(DemocracyPage.route), - ), - GestureDetector( - child: PluginItemCard( - margin: EdgeInsets.only(bottom: 16), - title: dic['council']!, - describe: dic['council.brief']!, - icon: Image.asset( - 'packages/polkawallet_plugin_kusama/assets/images/public/icon_council.png', - width: 18), - ), - onTap: () => Navigator.of(context).pushNamed(CouncilPage.route), - ), - GestureDetector( - child: PluginItemCard( - margin: EdgeInsets.only(bottom: 16), - title: dic['treasury']!, - describe: dic['treasury.brief']!, - icon: Image.asset( - 'packages/polkawallet_plugin_kusama/assets/images/public/icon_treasury.png', - width: 18), - ), - onTap: () => Navigator.of(context).pushNamed(TreasuryPage.route), - ), - GestureDetector( - child: PluginItemCard( - margin: EdgeInsets.only(bottom: 16), - title: 'Polkassembly', - describe: dic['polkassembly']!, - icon: Image.asset( - 'packages/polkawallet_plugin_kusama/assets/images/public/icon_Polkassembly.png', - width: 18), - ), - onTap: () => Navigator.of(context).pushNamed( - DAppWrapperPage.route, - arguments: 'https://${plugin.basic.name}.polkassembly.io/', - // "https://polkadot.js.org/apps/", - ), - ) - ], - )); - }); - } -} diff --git a/lib/pages/governanceOld.dart b/lib/pages/governanceOld.dart deleted file mode 100644 index 957388d4e..000000000 --- a/lib/pages/governanceOld.dart +++ /dev/null @@ -1,115 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:polkawallet_plugin_kusama/pages/governance/council/councilPage.dart'; -import 'package:polkawallet_plugin_kusama/pages/governance/democracy/democracyPage.dart'; -import 'package:polkawallet_plugin_kusama/pages/governance/treasury/treasuryPage.dart'; -import 'package:polkawallet_plugin_kusama/utils/i18n/index.dart'; -import 'package:polkawallet_sdk/plugin/index.dart'; -import 'package:polkawallet_sdk/utils/i18n.dart'; -import 'package:polkawallet_ui/components/SkaletonList.dart'; -import 'package:polkawallet_ui/components/entryPageCard.dart'; -import 'package:polkawallet_ui/pages/dAppWrapperPage.dart'; - -class GovOld extends StatelessWidget { - GovOld(this.plugin); - - final PolkawalletPlugin plugin; - - @override - Widget build(BuildContext context) { - final dic = I18n.of(context)!.getDic(i18n_full_dic_kusama, 'gov'); - - return Scaffold( - backgroundColor: Colors.transparent, - body: SafeArea( - child: Column( - children: [ - Expanded( - child: plugin.sdk.api.connectedNode == null - ? SkaletonList( - items: 4, - ) - : ListView( - padding: EdgeInsets.all(16), - children: [ - Padding( - padding: EdgeInsets.only(bottom: 16), - child: GestureDetector( - child: EntryPageCard( - dic!['democracy']!, - dic['democracy.brief']!, - SvgPicture.asset( - 'packages/polkawallet_plugin_kusama/assets/images/gov/democracy.svg', - width: 96, - color: Theme.of(context).primaryColor, - ), - color: Colors.transparent, - ), - onTap: () => Navigator.of(context) - .pushNamed(DemocracyPage.route), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 16), - child: GestureDetector( - child: EntryPageCard( - dic['council']!, - dic['council.brief']!, - SvgPicture.asset( - 'packages/polkawallet_plugin_kusama/assets/images/gov/council.svg', - width: 96, - color: Theme.of(context).primaryColor, - ), - color: Colors.transparent, - ), - onTap: () => Navigator.of(context) - .pushNamed(CouncilPage.route), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 16), - child: GestureDetector( - child: EntryPageCard( - dic['treasury']!, - dic['treasury.brief']!, - SvgPicture.asset( - 'packages/polkawallet_plugin_kusama/assets/images/gov/treasury.svg', - width: 96, - color: Theme.of(context).primaryColor, - ), - color: Colors.transparent, - ), - onTap: () => Navigator.of(context) - .pushNamed(TreasuryPage.route), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 16), - child: GestureDetector( - child: EntryPageCard( - 'Polkassembly', - dic['polkassembly']!, - Image.asset( - 'packages/polkawallet_plugin_kusama/assets/images/public/polkassembly.png', - width: 48, - ), - color: Colors.transparent, - ), - onTap: () => Navigator.of(context).pushNamed( - DAppWrapperPage.route, - arguments: - 'https://${plugin.basic.name}.polkassembly.io/', - // "https://polkadot.js.org/apps/", - ), - ), - ), - ], - ), - ) - ], - ), - ), - ); - } -} diff --git a/pubspec.yaml b/pubspec.yaml index ecd880571..f00aa3a92 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: polkawallet_plugin_kusama description: The kusama/polkadot network flutter plugin for polkawallet app. -version: 0.3.6 +version: 0.4.4 homepage: environment: @@ -17,8 +17,8 @@ dependencies: flutter_svg: ^0.23.0+1 get_storage: ^2.0.3 json_annotation: ^4.0.1 - polkawallet_sdk: ^0.3.7 - polkawallet_ui: ^0.3.6 + polkawallet_sdk: ^0.4.4 + polkawallet_ui: ^0.4.4 fl_chart: ^0.40.2 sticky_headers: ^0.2.0 flutter_swiper: ^1.1.6