release apk

This commit is contained in:
三露
2019-04-22 17:20:11 +08:00
parent 398ed2a89a
commit 98c45e5cd5
10 changed files with 95 additions and 34 deletions

View File

@ -25,6 +25,13 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 27
@ -46,13 +53,20 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
signingConfigs {
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
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
flutter {

View File

@ -0,0 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"0.0.5","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

4
android/key.properties Normal file
View File

@ -0,0 +1,4 @@
storePassword=fluttergo123
keyPassword=fluttergo123
keyAlias=key
storeFile=/Users/xj.deng/key.jks

View File

@ -20,8 +20,8 @@ class _FlexibleSpaceBarFullDefault extends State {
@override
Widget build(BuildContext context) {
return FlexibleSpaceBar(
// ... // 如果没有,就是不需要有状态的 StatefulWidget
);
// ... // 如果没有,就是不需要有状态的 StatefulWidget
);
}
}
@ -30,8 +30,7 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
final widget;
final parent;
const FlexibleSpaceBarLessDefault([this.widget, this.parent])
: super();
const FlexibleSpaceBarLessDefault([this.widget, this.parent]) : super();
@override
Widget build(BuildContext context) {
@ -39,7 +38,8 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
height: 300.0,
child: Scaffold(
body: NestedScrollView(
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
headerSliverBuilder:
(BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(
expandedHeight: 150.0,
@ -55,6 +55,13 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
background: Image.network(
"https://images.pexels.com/photos/396547/pexels-photo-396547.jpeg?auto=compress&cs=tinysrgb&h=350",
fit: BoxFit.cover,
/// 色彩叠加 UI可以理解为两个色彩涂层在图片混合一个色层
// color: Colors.redAccent, //混合的颜色
// colorBlendMode: BlendMode.darken, //混合方式
///图片重复填充容器
// repeat: ImageRepeat.repeat,
)),
),
];
@ -63,6 +70,6 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
child: Text("向上提拉 ⬆ 查看效果..."),
),
),
)
);
}}
));
}
}

View File

@ -1,8 +1,8 @@
/// Author: xiaojia.dxj
/// Date: 2018/11/22
/// Email: xiaojia.dxj@alibaba-inc.com
/// LastUpdateTime: 2018/11/22
/// LastUpdateBy: xj.deng
/// Author: xiaojia.dxj
/// Date: 2018/11/22
/// Email: xiaojia.dxj@alibaba-inc.com
/// LastUpdateTime: 2018/11/22
/// LastUpdateBy: xj.deng
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
@ -19,8 +19,11 @@ class DecoratedBoxCreate extends StatelessWidget {
decoration: BoxDecoration(
color: const Color(0xff7c94b6),
//设置图片内容
image: DecorationImage(
fit: BoxFit.cover,
image: DecorationImage(
///fix:BoxFit.contain: 保持图片的比例,最大程度填充容器 BoxFit.fill:容器被图片完全填充,不在意图片比例,只填充整个容器
///fix:BoxFit.fitWidth图片以宽被完全填充 BoxFit.fix:fixHigth:图片以高度完全填充
fit: BoxFit.cover, //图片填充整个容器,按比例放大,多余部分被裁切
image: ExactAssetImage('assets/images/food01.jpeg')),
//外宽边框,可以不设置
border: Border.all(
@ -44,7 +47,7 @@ class DecoratedBoxCreateTwo extends StatelessWidget {
decoration: BoxDecoration(
color: const Color(0xff7c94b6),
//设置图片内容
image: DecorationImage(
image: DecorationImage(
fit: BoxFit.cover,
image: ExactAssetImage('assets/images/food01.jpeg')),
//根据传入的不同大小,呈现图片效弧度不同,
@ -65,7 +68,7 @@ class DecoratedBoxCreateShape extends StatelessWidget {
position: DecorationPosition.background,
decoration: BoxDecoration(
color: const Color(0xff7c94b6),
image: DecorationImage(
image: DecorationImage(
fit: BoxFit.cover,
image: ExactAssetImage('assets/images/food01.jpeg')),
border: Border.all(
@ -77,3 +80,27 @@ class DecoratedBoxCreateShape extends StatelessWidget {
);
}
}
class DecoratedBoxCreateShapes extends StatelessWidget {
DecoratedBoxCreateShapes({
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return DecoratedBox(
position: DecorationPosition.background,
decoration: BoxDecoration(
gradient: const LinearGradient(
//渐变效果 线性渐变
colors: [Colors.red, Colors.yellowAccent, Colors.lightGreenAccent]),
// color: const Color(0xff7c94b6),
border: Border.all(
color: Colors.blue.shade50,
width: 5.0,
),
shape: BoxShape.circle,
),
);
}
}

View File

@ -1,7 +1,7 @@
///Author: xiaojia.dxj
///Date: 2019-01-08 15:56:49
///Date: 2019-01-08 15:56:49
///Last Modified by: xiaojia.dxj
///Last Modified time: 2019-01-08 15:56:49
///Last Modified time: 2019-01-08 15:56:49
///email: xiaojia.dxj@alibaba-inc.com
import 'package:flutter/material.dart';
@ -46,7 +46,7 @@ class _DemoState extends State<Demo> {
}
Column _decoratedBoxCreate() {
return Column(
return Column(
children: <Widget>[
Container(
height: 100.0,
@ -68,6 +68,14 @@ class _DemoState extends State<Demo> {
height: 100.0,
width: 100.0,
child: DecoratedBoxCreateShape(),
),
SizedBox(
height: 10.0,
),
Container(
height: 100.0,
width: 100.0,
child: DecoratedBoxCreateShapes(),
)
],
);

View File

@ -14,7 +14,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
version: "2.1.0"
boolean_selector:
dependency: transitive
description:
@ -35,7 +35,7 @@ packages:
name: city_pickers
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.14"
version: "0.1.16"
collection:
dependency: transitive
description:
@ -101,7 +101,7 @@ packages:
name: flutter_webview_plugin
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.3"
version: "0.3.4"
image_picker:
dependency: "direct main"
description:
@ -129,14 +129,14 @@ packages:
name: markdown
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.0.3"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.3+1"
version: "0.12.5"
meta:
dependency: transitive
description:
@ -164,7 +164,7 @@ packages:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.2"
shared_preferences:
dependency: "direct main"
description:
@ -183,7 +183,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.4"
version: "1.5.5"
sqflite:
dependency: "direct main"
description:
@ -204,7 +204,7 @@ packages:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.8"
version: "2.0.0"
string_scanner:
dependency: transitive
description:
@ -232,7 +232,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.2"
version: "0.2.4"
typed_data:
dependency: transitive
description:
@ -255,5 +255,5 @@ packages:
source: hosted
version: "2.0.8"
sdks:
dart: ">=2.1.1-dev.0.0 <3.0.0"
dart: ">=2.2.0 <3.0.0"
flutter: ">=0.5.6 <2.0.0"