mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-07-03 06:00:54 +08:00
release apk
This commit is contained in:
@ -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"
|
||||
}
|
||||
|
||||
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.release
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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 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("向上提拉 ⬆ 查看效果..."),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
}}
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,10 @@ class DecoratedBoxCreate extends StatelessWidget {
|
||||
color: const Color(0xff7c94b6),
|
||||
//设置图片内容
|
||||
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')),
|
||||
//外宽边框,可以不设置
|
||||
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,
|
||||
width: 100.0,
|
||||
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
|
||||
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"
|
||||
|
Reference in New Issue
Block a user