From 73646d2fc5c92201fb70192259ed140d52b7f8ef Mon Sep 17 00:00:00 2001 From: liuchuancong Date: Mon, 16 Oct 2023 12:26:27 +0800 Subject: [PATCH] delete donate --- lib/modules/about/donate_page.dart | 135 ++++++++++++++--------------- pubspec.yaml | 2 - 2 files changed, 66 insertions(+), 71 deletions(-) diff --git a/lib/modules/about/donate_page.dart b/lib/modules/about/donate_page.dart index ab2a4ed4..fd3b937e 100644 --- a/lib/modules/about/donate_page.dart +++ b/lib/modules/about/donate_page.dart @@ -1,69 +1,66 @@ -import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; -import 'package:pure_live/common/index.dart'; - -class DonatePage extends StatelessWidget { - const DonatePage({Key? key}) : super(key: key); - - final widgets = const [AlipayItem(), WechatItem()]; - - @override - Widget build(BuildContext context) { - return LayoutBuilder(builder: (context, constraint) { - final width = constraint.maxWidth; - final crossAxisCount = width > 640 ? 2 : 1; - return Scaffold( - appBar: AppBar(title: Text(S.of(context).support_donate)), - body: MasonryGridView.count( - physics: const BouncingScrollPhysics(), - crossAxisCount: crossAxisCount, - itemCount: 2, - itemBuilder: (BuildContext context, int index) => widgets[index], - ), - ); - }); - } -} - -class AlipayItem extends StatelessWidget { - const AlipayItem({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - const SectionTitle(title: 'Alipay'), - Container( - alignment: Alignment.center, - padding: const EdgeInsets.all(12), - child: Image.asset( - 'assets/images/alipay.jpg', - fit: BoxFit.contain, - ), - ), - ], - ); - } -} - -class WechatItem extends StatelessWidget { - const WechatItem({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - const SectionTitle(title: 'Wechat'), - Container( - alignment: Alignment.center, - padding: const EdgeInsets.all(12), - child: Image.asset( - 'assets/images/wechat.png', - fit: BoxFit.contain, - ), - ), - ], - ); - } -} +import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; +import 'package:pure_live/common/index.dart'; + +class DonatePage extends StatelessWidget { + const DonatePage({Key? key}) : super(key: key); + + final widgets = const [AlipayItem(), WechatItem()]; + + @override + Widget build(BuildContext context) { + return LayoutBuilder(builder: (context, constraint) { + final width = constraint.maxWidth; + final crossAxisCount = width > 640 ? 2 : 1; + return Scaffold( + appBar: AppBar(title: Text(S.of(context).support_donate)), + body: MasonryGridView.count( + physics: const BouncingScrollPhysics(), + crossAxisCount: crossAxisCount, + itemCount: 2, + itemBuilder: (BuildContext context, int index) => widgets[index], + ), + ); + }); + } +} + +class AlipayItem extends StatelessWidget { + const AlipayItem({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + const SectionTitle(title: 'Alipay'), + Container( + alignment: Alignment.center, + padding: const EdgeInsets.all(12), + child: Image.asset( + 'assets/images/alipay.jpg', + fit: BoxFit.contain, + ), + ), + ], + ); + } +} + +class WechatItem extends StatelessWidget { + const WechatItem({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + const SectionTitle(title: 'Wechat'), + Container( + alignment: Alignment.center, + padding: const EdgeInsets.all(12), + child: Container(), + ), + ], + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 4c0dac7a..0fb2d2d6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -146,8 +146,6 @@ flutter: - assets/crypto-js.js - assets/icons/icon.png - assets/icons/icon_foreground.png - - assets/images/wechat.png - - assets/images/alipay.jpg # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware.