Skip to content
This repository has been archived by the owner on Feb 14, 2022. It is now read-only.

Commit

Permalink
发布第一个版本
Browse files Browse the repository at this point in the history
  • Loading branch information
januwA committed Jun 15, 2019
1 parent c65023e commit dc56f58
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 16 deletions.
16 changes: 15 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
compileSdkVersion 28

Expand All @@ -41,11 +45,21 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

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
}
}
}
Expand Down
Binary file added android/app/key.jks
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.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 modified android/app/src/main/res/mipmap-mdpi/ic_launcher.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 modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.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 modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.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 modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions android/key.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
storePassword=anime123
keyPassword=anime123
keyAlias=animeapp
storeFile=key.jks
20 changes: 9 additions & 11 deletions lib/pages/detail_page/detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ class _DetailPageState extends State<DetailPage> {
super.dispose();
videoCtrl?.removeListener(videoListenner);
videoCtrl?.dispose();
if (isFullScreen) {
setPortrait();
}
}

videoListenner() {
Expand Down Expand Up @@ -209,7 +212,6 @@ class _DetailPageState extends State<DetailPage> {

/// video+controller 容器盒子
GestureDetector videoBox() {
MediaQueryData media = MediaQuery.of(context);
return GestureDetector(
onTap: () async {
setState(() {
Expand Down Expand Up @@ -238,19 +240,15 @@ class _DetailPageState extends State<DetailPage> {
),
),
)
: isFullScreen
? SizedBox(
width: media.size.width,
height: media.size.height,
child: AspectRatio(
aspectRatio: videoCtrl.value.aspectRatio,
child: VideoPlayer(videoCtrl),
),
)
: AspectRatio(
: Container(
color: Colors.black,
child: Center(
child: AspectRatio(
aspectRatio: videoCtrl.value.aspectRatio,
child: VideoPlayer(videoCtrl),
),
),
),
AnimatedCrossFade(
duration: Duration(milliseconds: 300),
firstChild: Container(),
Expand Down
4 changes: 1 addition & 3 deletions lib/pages/home_page/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class HomePage extends StatefulWidget {
}

class _HomePageState extends State<HomePage> {
/// 默认显示当天的
int get currentWeekDay => DateTime.now().weekday;
bool isloading = false;

/// 从服务器获取数据
Expand Down Expand Up @@ -56,7 +54,7 @@ class _HomePageState extends State<HomePage> {
BuiltList<WeekData> weekData = snapshot.data;
return DefaultTabController(
length: week.length,
initialIndex: currentWeekDay - 1,
initialIndex: DateTime.now().weekday - 1,
child: Scaffold(
appBar: AppBar(
title: Text('追番表'),
Expand Down
11 changes: 10 additions & 1 deletion lib/shared/globals.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
library video_app.globals;

/// 本地测试ip
// final String baseUrl = '192.168.0.103:3000';

final String baseUrl = '192.168.0.103:3000';
/// 服务器ip
final String baseUrl = '104.168.211.105:3000';

/// 一周更新数据接口
final String weekDataUrl = '/weekdata';

/// anime数据详情接口
final String detailUrl = '/detail';

/// 获取anime播放地址
final String videoSrcUrl = '/src';

0 comments on commit dc56f58

Please sign in to comment.