Skip to content

Commit

Permalink
v9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PGzxc committed Jul 9, 2023
1 parent 9ddddb8 commit 146a0af
Show file tree
Hide file tree
Showing 15 changed files with 368 additions and 435 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@
### v8.0
* 项目分类、项目列表数据

### v9.0—2023年07月09日升级说明

依赖库

* 删除badges
* 删除flutter_html

开发工具及版本

* gradle:gradle-7.4-all
* Flutter:3.10.5
* Dart:3.0.5


## 五 使用的指令
### 5.1 splash更新
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Binary file added assets/images/ic_share.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/image.png
Binary file not shown.
Binary file removed assets/images/image1.png
Binary file not shown.
Binary file removed assets/images/image2.png
Binary file not shown.
40 changes: 20 additions & 20 deletions lib/pages/main/controllers/main_controller.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:badges/badges.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_wanandroid/i18n/i18n_keys.dart';
Expand All @@ -10,6 +9,8 @@ import 'package:flutter_wanandroid/pages/project/views/project_view.dart';
import 'package:flutter_wanandroid/provider/base_controller.dart';
import 'package:flutter_wanandroid/widgets/keep_alive_wrapper.dart';
import 'package:get/get.dart';
import 'package:getwidget/components/badge/gf_badge.dart';
import 'package:getwidget/components/badge/gf_icon_badge.dart';
import '../../../utils/logger/logger_util.dart';
import '../../login_register/utils/login_register_utils.dart';
import '../../me/controllers/me_controller.dart';
Expand All @@ -33,7 +34,6 @@ class MainController extends BaseController {
// set messageNum(value)=>_messageNum.value=value;
// get messageNum=>_messageNum.value;


/// PageView页面控制器
late PageController pageController;

Expand Down Expand Up @@ -68,13 +68,20 @@ class MainController extends BaseController {

/// 初始静态数据
bottomTabs = <BottomNavigationBarItem>[
BottomNavigationBarItem(icon: const Icon(Icons.home_outlined, size: 20,),
BottomNavigationBarItem(
icon: const Icon(
Icons.home_outlined,
size: 20,
),
activeIcon: const Icon(Icons.home, size: 25),
label: Keys.home.tr,
),
BottomNavigationBarItem(
icon: const Icon(Icons.outlined_flag_outlined, size: 20),
activeIcon: const Icon(Icons.outlined_flag, size: 25,),
activeIcon: const Icon(
Icons.outlined_flag,
size: 25,
),
label: Keys.navigation.tr,
),
BottomNavigationBarItem(
Expand All @@ -83,18 +90,12 @@ class MainController extends BaseController {
label: Keys.project.tr,
),
BottomNavigationBarItem(
icon:Obx(() => Badge(
showBadge: messageNum>0,
badgeColor: Colors.red,
badgeContent: Text("$messageNum"),
child: const Icon(Icons.message_outlined,size: 20,),
)),
activeIcon:Obx(() => Badge(
showBadge: messageNum>0,
badgeColor: Colors.red,
badgeContent: Text("$messageNum"),
child: const Icon(Icons.message, size:25),
)),
icon: Obx(() => GFIconBadge(
counterChild: messageNum>0? GFBadge(color: Colors.red, text: "$messageNum"):const Text(""),
child: const Icon(Icons.message_outlined, size: 20))),
activeIcon: Obx(() => GFIconBadge(
counterChild: messageNum>0? GFBadge(color: Colors.red, text: "$messageNum"):const Text(""),
child: const Icon(Icons.message, size: 25))),
label: Keys.message.tr,
),
BottomNavigationBarItem(
Expand Down Expand Up @@ -145,7 +146,6 @@ class MainController extends BaseController {
const KeepAliveWrapper(keepAlive: true, child: MessageView()),
const KeepAliveWrapper(keepAlive: true, child: MeView()),
];

}

///在 onInit() 之后调用 1 帧。这是进入的理想场所
Expand All @@ -155,8 +155,8 @@ class MainController extends BaseController {
super.onReady();
// async 拉取数据
LoggerUtil.d('onReady()', tag: 'MainController');
if(isLogin){
userInfo=LoginRegisterUtils.getUserInfo();
if (isLogin) {
userInfo = LoginRegisterUtils.getUserInfo();
}
}

Expand Down Expand Up @@ -188,7 +188,7 @@ class MainController extends BaseController {
EasyLoading.show(status: '加载中...');
provider.logout().then((value) {
if (value.success) {
isLogin=false;
isLogin = false;
Get.back();
} else {
EasyLoading.showError('退出出错:${value.errorMsg}');
Expand Down
5 changes: 4 additions & 1 deletion lib/pages/not_found/not_found_view.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getwidget/components/button/gf_button.dart';
import 'package:getwidget/shape/gf_button_shape.dart';

/// 日期:2022-05-15
/// 描述:路由跳转错误页面
Expand All @@ -17,7 +19,8 @@ class NotFound extends StatelessWidget {
children: [
Text('${Get.routing.current} Page Not Found', style: const TextStyle(fontSize: 30)),
const SizedBox(height: 25),
RaisedButton(
GFButton(
shape: GFButtonShape.standard,
color: Colors.amber,
onPressed: () => Get.offNamed('/main'),
child: const Text('返回主页', style: TextStyle(fontSize: 30)),
Expand Down
1 change: 1 addition & 0 deletions lib/res/r.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class R {

/// SVG
static const String assetsSvgShare = 'assets/svg/share.svg';
static const String assetsImageShare = 'assets/images/ic_share.png';

/// png
static const String iconInvertedTriangle =
Expand Down
27 changes: 21 additions & 6 deletions lib/widgets/article_detail_web_app_bar.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart';
//import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_wanandroid/i18n/i18n_keys.dart';
import 'package:flutter_wanandroid/models/home_article_response.dart';
import 'package:flutter_wanandroid/res/app_theme.dart';
import 'package:flutter_wanandroid/widgets/popup_window_widget.dart';
import 'package:flutter_wanandroid/widgets/ripple_view.dart';
import 'package:get/get.dart';
import 'package:getwidget/colors/gf_color.dart';
import 'package:getwidget/components/avatar/gf_avatar.dart';
import 'package:getwidget/components/image/gf_image_overlay.dart';
import 'package:getwidget/shape/gf_avatar_shape.dart';
import '../pages/article_webpage/controllers/article_detail_controller.dart';
import '../res/r.dart';
import 'article_detail_app_bar_add_menu.dart';
Expand Down Expand Up @@ -200,11 +203,23 @@ class ArticleDetailWebAppBar extends GetView<ArticleDetailController>
onTap: () => showAddMenu(context, model),
child: Container(
padding: const EdgeInsets.all(10),
child: SvgPicture.asset(
R.assetsSvgShare,
width: 24,
height: 24,
),
child: Image.asset(R.assetsImageShare),

// const GFAvatar(backgroundImage:AssetImage(R.assetsSvgShare))

// const GFImageOverlay(
// color: Colors.amber,
// width: 24,
// height: 24,
// //shape: BoxShape.circle,
// image: AssetImage(R.assetsSvgShare),
// )

// SvgPicture.asset(
// R.assetsSvgShare,
// width: 24,
// height: 24,
// ),
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/message_list_item_widget.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
//import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_wanandroid/models/message_read_list_response.dart';
import 'package:flutter_wanandroid/pages/message/views/message_detail_web_page.dart';
import 'package:flutter_wanandroid/provider/base_controller.dart';
Expand Down
48 changes: 17 additions & 31 deletions lib/widgets/search_list_item_widget.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
//import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_wanandroid/provider/base_controller.dart';
import 'package:flutter_wanandroid/res/app_theme.dart';
import 'package:flutter_wanandroid/routes/app_routes.dart';
Expand Down Expand Up @@ -218,24 +218,24 @@ class SearchListItemWidget extends GetView<BaseController> {
children: [
Visibility(
visible: dataList[index].title!.isNotEmpty ? true : false,
// child: Text(
// model?.title ?? "",
// style: context.bodyText1Style?.copyWith(
// fontSize: 15,
// ),
// ),
child: Html(
data: HtmlUtils.html2HighLight(
html: dataList[index].title!,
// color: 'yellow',
child: Text(
dataList[index].title ?? "",
style: context.bodyText1Style?.copyWith(
fontSize: 15,
),
style: {
'font': Style(
fontSize: const FontSize(15),
fontWeight: FontWeight.w500,
),
},
),
// child: Html(
// data: HtmlUtils.html2HighLight(
// html: dataList[index].title!,
// // color: 'yellow',
// ),
// style: {
// 'font': Style(
// fontSize: const FontSize(15),
// fontWeight: FontWeight.w500,
// ),
// },
// ),
),
Visibility(
visible: dataList[index].desc!.isNotEmpty ? true : false,
Expand Down Expand Up @@ -279,21 +279,7 @@ class SearchListItemWidget extends GetView<BaseController> {
),
),
),
// Container(
// alignment: Alignment.center,
// height: 15,
// child: const VerticalDivider(
// width: 10,
// thickness: 1,
// color: Colors.blue,
// ),
// ),
Gaps.hGap10,
// const CustomPointWidget(
// thickness: 3,
// color: Colors.red,
// ),

Container(
padding: const EdgeInsets.symmetric(
horizontal: 3,
Expand Down
32 changes: 20 additions & 12 deletions lib/widgets/wx_list_item_widget.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
//import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_wanandroid/provider/base_controller.dart';
import 'package:flutter_wanandroid/res/app_theme.dart';
import 'package:flutter_wanandroid/routes/app_routes.dart';
Expand Down Expand Up @@ -125,18 +125,26 @@ class WXListItemWidget extends GetView<BaseController> {
children: [
Visibility(
visible: dataList[index].title!.isNotEmpty ? true : false,
child: Html(
data: HtmlUtils.html2HighLight(
html: dataList[index].title!,
// color: 'yellow',
child:Text(
dataList[index].title ?? "",
style: context.bodyText1Style?.copyWith(
fontSize: 15,
),
style: {
'font': Style(
fontSize: const FontSize(15),
fontWeight: FontWeight.w500,
),
},
),
)


// Html(
// data: HtmlUtils.html2HighLight(
// html: dataList[index].title!,
// // color: 'yellow',
// ),
// style: {
// 'font': Style(
// fontSize: const FontSize(15),
// fontWeight: FontWeight.w500,
// ),
// },
// ),
),
Visibility(
visible: dataList[index].desc!.isNotEmpty ? true : false,
Expand Down
Loading

0 comments on commit 146a0af

Please sign in to comment.