Skip to content

Commit

Permalink
### v5.0
Browse files Browse the repository at this point in the history
* 使用google组件carousel显示首页轮播图
* 首页文章显示
* 使用三方库webview_flutter,显示网页视图
* 使用三方库badges。显示bottombar带消息的数量,并通过num控制badges的显示与否
  • Loading branch information
PGzxc committed Jun 2, 2022
1 parent 231a465 commit 5782466
Show file tree
Hide file tree
Showing 67 changed files with 3,253 additions and 388 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@
* 我->排名和积分列表,功能完成
* Drawer抽屉添加,点击头像登陆和登陆后退出功能
* 修改安卓和IOS应用显示等名称
### v5.0
* 使用google组件carousel显示首页轮播图
* 首页文章显示
* 使用三方库webview_flutter,显示网页视图
* 使用三方库badges。显示bottombar带消息的数量,并通过num控制badges的显示与否


### v5.0
* 未登录时,不显示退出按钮。登陆后,显示退出按钮


## 五 使用的指令
Expand All @@ -52,6 +61,9 @@ flutter pub run flutter_native_splash:create
### 5.2 生成model文件
flutter pub run build_runner build

### 5.3 项目打包输出
flutter build apk --split-per-abi

## 六 开源库
* Getx:https://github.com/jonataslaw/getx
* logger: https://pub:flutter-io:cn/packages/logger
Expand Down
3 changes: 2 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ android {
applicationId "com.example.flutter_wanandroid"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion flutter.minSdkVersion
//minSdkVersion flutter.minSdkVersion
minSdkVersion 19
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
File renamed without changes
Binary file added assets/images/icon_inverted_triangle.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 added assets/images/image.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 added assets/images/image1.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 added assets/images/image2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
3 changes: 3 additions & 0 deletions assets/svg/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions flutter_native_splash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ flutter_native_splash:

# The image parameter allows you to specify an image used in the splash screen. It must be a
# png file and should be sized for 4x pixel density.
image: assets/splash_logo.png
image: assets/logo/splash_logo.png

# The branding property allows you to specify an image used as branding in the splash screen.
# It must be a png file. Currently, it is only supported for Android < v12 and iOS.
Expand All @@ -36,7 +36,7 @@ flutter_native_splash:
# set.
color_dark: "#042a49"
#background_image_dark: "assets/dark-background.png"
image_dark: assets/splash_logo.png
image_dark: assets/logo/splash_logo.png
#branding_dark: assets/dart_dark.png

# Android 12 handles the splash screen differently than previous versions. Please visit
Expand Down
36 changes: 36 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,38 @@ PODS:
- Flutter (1.0.0)
- flutter_native_splash (0.0.1):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- path_provider_ios (0.0.1):
- Flutter
- ReachabilitySwift (5.0.0)
- shared_preferences_ios (0.0.1):
- Flutter
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
- video_player_avfoundation (0.0.1):
- Flutter
- wakelock (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter

DEPENDENCIES:
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)

SPEC REPOS:
trunk:
- FMDB
- ReachabilitySwift

EXTERNAL SOURCES:
Expand All @@ -26,15 +46,31 @@ EXTERNAL SOURCES:
:path: Flutter
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
shared_preferences_ios:
:path: ".symlinks/plugins/shared_preferences_ios/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
video_player_avfoundation:
:path: ".symlinks/plugins/video_player_avfoundation/ios"
wakelock:
:path: ".symlinks/plugins/wakelock/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"

SPEC CHECKSUMS:
connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c

Expand Down
96 changes: 48 additions & 48 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>玩安卓</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>flutter_wanandroid</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>玩安卓</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>flutter_wanandroid</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
3 changes: 3 additions & 0 deletions lib/config/global_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class Config {
///配置登陆成功与否到控制器和判断依据
BaseController baseController = Get.put(BaseController());
baseController.isLogin = LoginRegisterUtils.getUserInfo() != null;
// if(baseController.isLogin){
// baseController.userInfo=LoginRegisterUtils.getUserInfo();
// }

///是否登陆-用于退出重新进入时判断是否登陆
//LoginRegisterUtils().isLogin = LoginRegisterUtils.getUserInfo() != null;
Expand Down
4 changes: 4 additions & 0 deletions lib/i18n/i18n_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class I18nEn {
Keys.tree: 'Tree',
Keys.navigation: 'Navigation',
Keys.project: 'Project',
Keys.message:"Message",
Keys.me: 'Me',
Keys.theme: 'Theme',
Keys.language: 'Language',
Expand Down Expand Up @@ -73,6 +74,9 @@ class I18nEn {
Keys.noMoreData:"There's no more data~",
Keys.loadFailed:"Load failed~",

Keys.freshTag:"New",
Keys.myCompany:"Wan Android",


};
}
5 changes: 5 additions & 0 deletions lib/i18n/i18n_keys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ abstract class Keys {
static const String tree = 'tree';
static const String navigation = 'navigation';
static const String project = 'project';
static const String message = 'message';
static const String me = 'me';

///设置
Expand Down Expand Up @@ -80,5 +81,9 @@ abstract class Keys {
static const String noMoreData='noMoreData';
static const String loadFailed='loadFailed';

///首页
static const String freshTag='freshTag';
static const String myCompany='myCompany';


}
4 changes: 4 additions & 0 deletions lib/i18n/i18n_zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class I18nZH {
Keys.tree: '体系树',
Keys.navigation: '导航',
Keys.project: '项目',
Keys.message:"消息",
Keys.me: '我',
Keys.theme: '主题',
Keys.language: '语言',
Expand Down Expand Up @@ -70,5 +71,8 @@ class I18nZH {
Keys.releaseStartLoading:'松手开始加载数据',
Keys.noMoreData:'我也是有底线的~',
Keys.loadFailed:"加载失败",

Keys.freshTag:"新",
Keys.myCompany:"玩安卓",
};
}
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Future<void> main() async {
unknownRoute: AppPages.unknownRoute,
initialRoute: AppPages.init,
getPages: AppPages.routes,
smartManagement: SmartManagement.keepFactory,

///主题设置
theme: ThemeUtil.getThemeModel(),
Expand Down
4 changes: 2 additions & 2 deletions lib/models/coin_list_response.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 23 additions & 13 deletions lib/models/collect_site_list_response.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:get/get_rx/src/rx_types/rx_types.dart';
import 'package:json_annotation/json_annotation.dart';

part 'collect_site_list_response.g.dart';
Expand All @@ -8,7 +9,7 @@ part 'collect_site_list_response.g.dart';
class CollectSiteListResponse extends Object {

@JsonKey(name: 'data')
List<Data> data;
List<CollectSite> data;

@JsonKey(name: 'errorCode')
int errorCode;
Expand All @@ -26,37 +27,46 @@ class CollectSiteListResponse extends Object {


@JsonSerializable()
class Data extends Object {
class CollectSite extends Object {

@JsonKey(name: 'desc')
String desc;
String? desc;

@JsonKey(name: 'icon')
String icon;
String? icon;

@JsonKey(name: 'id')
int id;
int? id;

@JsonKey(name: 'link')
String link;
String? link;

@JsonKey(name: 'name')
String name;
String? name;

@JsonKey(name: 'order')
int order;
int? order;

@JsonKey(name: 'userId')
int userId;
int? userId;

@JsonKey(name: 'visible')
int visible;
int? visible;

Data(this.desc,this.icon,this.id,this.link,this.name,this.order,this.userId,this.visible,);
bool? collect;

CollectSite({this.desc,this.icon,this.id,this.link,this.name,this.order,this.userId,this.visible});

factory Data.fromJson(Map<String, dynamic> srcJson) => _$DataFromJson(srcJson);
factory CollectSite.fromJson(Map<String, dynamic> srcJson) => _$CollectSiteFromJson(srcJson);

Map<String, dynamic> toJson() => _$DataToJson(this);
Map<String, dynamic> toJson() => _$CollectSiteToJson(this);

/// 可观察变量 isCollect 是否收藏
final Rx<bool> _isCollect = false.obs;

get isCollect => _isCollect.value;

set isCollect(value) => _isCollect.value = value;

}

Expand Down
Loading

0 comments on commit 5782466

Please sign in to comment.