mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-07-03 23:00:26 +08:00
release apk
This commit is contained in:
@ -25,6 +25,13 @@ apply plugin: 'com.android.application'
|
|||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
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 {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 27
|
||||||
|
|
||||||
@ -46,13 +53,20 @@ android {
|
|||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
release {
|
||||||
|
keyAlias keystoreProperties['keyAlias']
|
||||||
|
keyPassword keystoreProperties['keyPassword']
|
||||||
|
storeFile file(keystoreProperties['storeFile'])
|
||||||
|
storePassword keystoreProperties['storePassword']
|
||||||
|
}
|
||||||
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
// TODO: Add your own signing config for the release build.
|
signingConfig signingConfigs.release
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
|
||||||
signingConfig signingConfigs.debug
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flutter {
|
flutter {
|
||||||
|
1
android/app/release/output.json
Normal file
1
android/app/release/output.json
Normal 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 |
BIN
android/app/src/main/res/mipmap-xxhdpi/splash.png
Normal file
BIN
android/app/src/main/res/mipmap-xxhdpi/splash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 374 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/spalsh.png
Normal file
BIN
android/app/src/main/res/mipmap-xxxhdpi/spalsh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 MiB |
4
android/key.properties
Normal file
4
android/key.properties
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
storePassword=fluttergo123
|
||||||
|
keyPassword=fluttergo123
|
||||||
|
keyAlias=key
|
||||||
|
storeFile=/Users/xj.deng/key.jks
|
@ -30,8 +30,7 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
|
|||||||
final widget;
|
final widget;
|
||||||
final parent;
|
final parent;
|
||||||
|
|
||||||
const FlexibleSpaceBarLessDefault([this.widget, this.parent])
|
const FlexibleSpaceBarLessDefault([this.widget, this.parent]) : super();
|
||||||
: super();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -39,7 +38,8 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
|
|||||||
height: 300.0,
|
height: 300.0,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: NestedScrollView(
|
body: NestedScrollView(
|
||||||
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
headerSliverBuilder:
|
||||||
|
(BuildContext context, bool innerBoxIsScrolled) {
|
||||||
return <Widget>[
|
return <Widget>[
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
expandedHeight: 150.0,
|
expandedHeight: 150.0,
|
||||||
@ -55,6 +55,13 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
|
|||||||
background: Image.network(
|
background: Image.network(
|
||||||
"https://images.pexels.com/photos/396547/pexels-photo-396547.jpeg?auto=compress&cs=tinysrgb&h=350",
|
"https://images.pexels.com/photos/396547/pexels-photo-396547.jpeg?auto=compress&cs=tinysrgb&h=350",
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
|
|
||||||
|
/// 色彩叠加 UI可以理解为两个色彩涂层,在图片混合一个色层
|
||||||
|
// color: Colors.redAccent, //混合的颜色
|
||||||
|
// colorBlendMode: BlendMode.darken, //混合方式
|
||||||
|
|
||||||
|
///图片重复填充容器
|
||||||
|
// repeat: ImageRepeat.repeat,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
@ -63,6 +70,6 @@ class FlexibleSpaceBarLessDefault extends StatelessWidget {
|
|||||||
child: Text("向上提拉 ⬆ 查看效果..."),
|
child: Text("向上提拉 ⬆ 查看效果..."),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
));
|
||||||
);
|
}
|
||||||
}}
|
}
|
||||||
|
@ -20,7 +20,10 @@ class DecoratedBoxCreate extends StatelessWidget {
|
|||||||
color: const Color(0xff7c94b6),
|
color: const Color(0xff7c94b6),
|
||||||
//设置图片内容
|
//设置图片内容
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
fit: BoxFit.cover,
|
|
||||||
|
///fix:BoxFit.contain: 保持图片的比例,最大程度填充容器 BoxFit.fill:容器被图片完全填充,不在意图片比例,只填充整个容器
|
||||||
|
///fix:BoxFit.fitWidth:图片以宽被完全填充 BoxFit.fix:fixHigth:图片以高度完全填充
|
||||||
|
fit: BoxFit.cover, //图片填充整个容器,按比例放大,多余部分被裁切
|
||||||
image: ExactAssetImage('assets/images/food01.jpeg')),
|
image: ExactAssetImage('assets/images/food01.jpeg')),
|
||||||
//外宽边框,可以不设置
|
//外宽边框,可以不设置
|
||||||
border: Border.all(
|
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,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -68,6 +68,14 @@ class _DemoState extends State<Demo> {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
child: DecoratedBoxCreateShape(),
|
child: DecoratedBoxCreateShape(),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 100.0,
|
||||||
|
width: 100.0,
|
||||||
|
child: DecoratedBoxCreateShapes(),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
20
pubspec.lock
20
pubspec.lock
@ -14,7 +14,7 @@ packages:
|
|||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.8"
|
version: "2.1.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -35,7 +35,7 @@ packages:
|
|||||||
name: city_pickers
|
name: city_pickers
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.14"
|
version: "0.1.16"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -101,7 +101,7 @@ packages:
|
|||||||
name: flutter_webview_plugin
|
name: flutter_webview_plugin
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.3"
|
version: "0.3.4"
|
||||||
image_picker:
|
image_picker:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -129,14 +129,14 @@ packages:
|
|||||||
name: markdown
|
name: markdown
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.2"
|
version: "2.0.3"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.3+1"
|
version: "0.12.5"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -164,7 +164,7 @@ packages:
|
|||||||
name: quiver
|
name: quiver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.2"
|
||||||
shared_preferences:
|
shared_preferences:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -183,7 +183,7 @@ packages:
|
|||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.4"
|
version: "1.5.5"
|
||||||
sqflite:
|
sqflite:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -204,7 +204,7 @@ packages:
|
|||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.6.8"
|
version: "2.0.0"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -232,7 +232,7 @@ packages:
|
|||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.2"
|
version: "0.2.4"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -255,5 +255,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.8"
|
version: "2.0.8"
|
||||||
sdks:
|
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"
|
flutter: ">=0.5.6 <2.0.0"
|
||||||
|
Reference in New Issue
Block a user