diff --git a/android/app/build.gradle b/android/app/build.gradle
index 1c7c561..c7f99c0 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -6,6 +6,16 @@ if (localPropertiesFile.exists()) {
}
}
+// 定义属性读取对象,读取 android/key.properties
+def keystoreProperties = new Properties()
+def keystorePropertiesFile = rootProject.file('key.properties')
+if (keystorePropertiesFile.exists()) {
+ keystorePropertiesFile.withReader('UTF-8') { reader ->
+ keystoreProperties.load(reader)
+ }
+}
+
+
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
@@ -46,11 +56,22 @@ android {
versionName flutterVersionName
}
+ // 签名配置
+ signingConfigs {
+ release {
+ keyAlias keystoreProperties['keyAlias']
+ keyPassword keystoreProperties['keyPassword']
+ storeFile file(keystoreProperties['storeFile'])
+ storePassword keystoreProperties['storePassword']
+ }
+ }
+
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
- signingConfig signingConfigs.debug
+// signingConfig signingConfigs.debug
+ signingConfig signingConfigs.release
}
}
}
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 6adabc6..d50e337 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,7 +1,7 @@
+
+
diff --git a/lib/modules/account/account_page.dart b/lib/modules/account/account_page.dart
index 82f8643..e0ca89e 100644
--- a/lib/modules/account/account_page.dart
+++ b/lib/modules/account/account_page.dart
@@ -5,8 +5,8 @@ import 'package:news_getx/data/services/config.dart';
import 'package:news_getx/data/services/storage.dart';
import 'package:news_getx/data/services/user.dart';
import 'package:news_getx/modules/widgets/button.dart';
+import 'package:news_getx/routes/app_pages.dart';
import 'package:news_getx/theme/app_colors.dart';
-import 'package:news_getx/theme/app_radii.dart';
import 'account_controller.dart';
@@ -69,7 +69,7 @@ class AccountPage extends GetView {
// 按钮 crossAxisAlignment会导致设置的宽度时效
FlatButton(
- height: 40.h,
+ height: 40,
width: double.infinity,
onPressed: () {},
title: "Get Premium - \$9.99",
@@ -203,8 +203,8 @@ class AccountPage extends GetView {
title: "Log out",
hasArrow: true,
onTap: () {
- print('Log out');
UserService.to.onLogout();
+ Get.offAllNamed(AppRoutes.Signin);
},
),
_divider10(),
diff --git a/lib/modules/bookmarks/bookmarks_page.dart b/lib/modules/bookmarks/bookmarks_page.dart
index 928cab3..403eafe 100644
--- a/lib/modules/bookmarks/bookmarks_page.dart
+++ b/lib/modules/bookmarks/bookmarks_page.dart
@@ -8,8 +8,10 @@ class BookmarksPage extends GetView {
@override
Widget build(BuildContext context) {
- return Container(
- child: Text('BookmarksPage'),
+ return Center(
+ child: Container(
+ child: Text('BookmarksPage'),
+ ),
);
}
}
diff --git a/lib/modules/category/widgets/news_item.dart b/lib/modules/category/widgets/news_item.dart
index c7368c5..59f9209 100644
--- a/lib/modules/category/widgets/news_item.dart
+++ b/lib/modules/category/widgets/news_item.dart
@@ -15,7 +15,7 @@ class NewsListItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
- height: 161.h,
+ height: 170.h,
padding: EdgeInsets.all(20.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -46,7 +46,7 @@ class NewsListItem extends StatelessWidget {
children: [
// 作者
Container(
- margin: EdgeInsets.all(0),
+ margin: EdgeInsets.zero,
child: Text(
newsItem.author ?? '',
style: TextStyle(
@@ -54,6 +54,7 @@ class NewsListItem extends StatelessWidget {
fontWeight: FontWeight.normal,
color: AppColors.thirdElementText,
fontSize: 14.sp,
+ height: 1,
),
),
),
@@ -74,6 +75,7 @@ class NewsListItem extends StatelessWidget {
fontWeight: FontWeight.w500,
color: AppColors.primaryText,
fontSize: 16.sp,
+ height: 1,
),
),
),
@@ -127,7 +129,7 @@ class NewsListItem extends StatelessWidget {
child: Icon(
Icons.more_horiz,
color: AppColors.primaryText,
- size: 24,
+ size: 24.sp,
),
onTap: () {
print('查看更多...');
diff --git a/lib/modules/main/widgets/channels.dart b/lib/modules/main/widgets/channels.dart
index 11d833d..bdbc407 100644
--- a/lib/modules/main/widgets/channels.dart
+++ b/lib/modules/main/widgets/channels.dart
@@ -11,7 +11,7 @@ class NewsChannelsWidget extends GetView {
return Container(
margin: EdgeInsets.symmetric(horizontal: 10),
width: 70.w,
- height: 97.h,
+ height: 110.h,
child: InkWell(
// 没有水波纹 是有原因的 看splashColor文档 主体splashColor是透明纯黑色 所以不显示
// splashColor: Colors.cyanAccent,
@@ -43,20 +43,18 @@ class NewsChannelsWidget extends GetView {
fit: BoxFit.cover,
),
),
- Padding(
- padding: const EdgeInsets.only(top: 12.0),
- child: Text(
- item.title,
- textAlign: TextAlign.center,
- overflow: TextOverflow.clip,
- maxLines: 1,
- style: TextStyle(
- color: AppColors.thirdElementText,
- fontFamily: "Avenir",
- fontWeight: FontWeight.w400,
- fontSize: 14.sp,
- height: 14.sp / 14,
- ),
+ Spacer(),
+ Text(
+ item.title,
+ textAlign: TextAlign.center,
+ overflow: TextOverflow.clip,
+ maxLines: 1,
+ style: TextStyle(
+ color: AppColors.thirdElementText,
+ fontFamily: "Avenir",
+ fontWeight: FontWeight.w400,
+ fontSize: 14.sp,
+ height: 1,
),
),
],
diff --git a/lib/modules/main/widgets/news_list.dart b/lib/modules/main/widgets/news_list.dart
index cdec343..1dca19a 100644
--- a/lib/modules/main/widgets/news_list.dart
+++ b/lib/modules/main/widgets/news_list.dart
@@ -13,7 +13,7 @@ import 'package:news_getx/utils/date.dart';
class NewsListWidget extends GetView {
Widget _buildListItem(NewsItem item) {
return Container(
- height: 161.h,
+ height: 170.h,
padding: EdgeInsets.all(20.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -42,7 +42,7 @@ class NewsListWidget extends GetView {
children: [
// 作者
Container(
- margin: EdgeInsets.all(0),
+ margin: EdgeInsets.zero,
child: Text(
item.author ?? '',
style: TextStyle(
@@ -50,6 +50,7 @@ class NewsListWidget extends GetView {
fontWeight: FontWeight.normal,
color: AppColors.thirdElementText,
fontSize: 14.sp,
+ height: 1,
),
),
),
@@ -70,6 +71,7 @@ class NewsListWidget extends GetView {
fontWeight: FontWeight.w500,
color: AppColors.primaryText,
fontSize: 16.sp,
+ height: 1,
),
),
),
@@ -123,7 +125,7 @@ class NewsListWidget extends GetView {
child: Icon(
Icons.more_horiz,
color: AppColors.primaryText,
- size: 24,
+ size: 24.sp,
),
onTap: () {
print('查看更多...');