Flutter tips
I begin learn Flutter and I find many thing that was conflict to me so I will share it with you
First when I try add library to flutter I find error and I can’t understand why ???
then guess what the problem it was spaces arrange
after remove space it work fine
it work fine after align space with flutter in the top
Second
I find debug logo in the top right of the screen I remove it by
I remove it by
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: '40 Hadith',
debugShowCheckedModeBanner:false, // remove debug logo
home: HomePage(),
);
}
}
Third change name of the App in Android by change label name in AndroidManifest
Fourth change icon by add in mipmap folders and icon in AndroidManifest
<application
android:name="io.flutter.app.FlutterApplication"
android:label="@string/shr_app_name"
android:icon="@mipmap/ic_launcher">
Fifth To make release:
The easiest way to make key store is to create from another normal android project make build release apk and get the key store and the same alias key password and key store password
and then add in the android folder these files key.properties
storePassword=123456 // password of keyStore
keyPassword=123456 // password of Alias
keyAlias=app
storeFile=D:/flutter/keys/app.jks // path for keyStore
in the app gradle
add the following
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
key.properties is the file name that contain the Key store data
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
to make release build with data of key.properties file
buildTypes {
release {
signingConfig signingConfigs.release
}
}
to make build release apk
in terminal run the following
flutter build apk
it will build release apk that can upload to store
here is the end of the tips I have found in the simple first app I have build in flutter and upload to store here is the link for the app
in the next series I will make another topic in details of the app with source code
I am waiting for your feedback in the app and in the story
thanks for your time
Link for article explain the above app
https://medium.com/@droidbobakr/flutter-simple-app-1f61eda0e102