修复如下问题:UI、注销逻辑、App名称

This commit is contained in:
胡天 2023-07-25 13:43:22 +08:00
parent f71a539e81
commit 0a4854eb4c
7 changed files with 55 additions and 28 deletions

View File

@ -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
}
}
}

View File

@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.news_getx">
<application
android:label="news_getx"
android:label="哈哈新闻"
android:name="${applicationName}"
android:icon="@mipmap/launcher_icon">
<activity
@ -38,4 +38,6 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- 设置网络权限 -->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

View File

@ -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<AccountController> {
// crossAxisAlignment会导致设置的宽度时效
FlatButton(
height: 40.h,
height: 40,
width: double.infinity,
onPressed: () {},
title: "Get Premium - \$9.99",
@ -203,8 +203,8 @@ class AccountPage extends GetView<AccountController> {
title: "Log out",
hasArrow: true,
onTap: () {
print('Log out');
UserService.to.onLogout();
Get.offAllNamed(AppRoutes.Signin);
},
),
_divider10(),

View File

@ -8,8 +8,10 @@ class BookmarksPage extends GetView<BookmarksController> {
@override
Widget build(BuildContext context) {
return Container(
child: Text('BookmarksPage'),
return Center(
child: Container(
child: Text('BookmarksPage'),
),
);
}
}

View File

@ -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('查看更多...');

View File

@ -11,7 +11,7 @@ class NewsChannelsWidget extends GetView<MainController> {
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<MainController> {
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,
),
),
],

View File

@ -13,7 +13,7 @@ import 'package:news_getx/utils/date.dart';
class NewsListWidget extends GetView<MainController> {
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<MainController> {
children: [
//
Container(
margin: EdgeInsets.all(0),
margin: EdgeInsets.zero,
child: Text(
item.author ?? '',
style: TextStyle(
@ -50,6 +50,7 @@ class NewsListWidget extends GetView<MainController> {
fontWeight: FontWeight.normal,
color: AppColors.thirdElementText,
fontSize: 14.sp,
height: 1,
),
),
),
@ -70,6 +71,7 @@ class NewsListWidget extends GetView<MainController> {
fontWeight: FontWeight.w500,
color: AppColors.primaryText,
fontSize: 16.sp,
height: 1,
),
),
),
@ -123,7 +125,7 @@ class NewsListWidget extends GetView<MainController> {
child: Icon(
Icons.more_horiz,
color: AppColors.primaryText,
size: 24,
size: 24.sp,
),
onTap: () {
print('查看更多...');