How to get build and version number of Flutter app

You can use package_info_plus. The versions are extracted from: Android: build.gradle, versionCode and versionName iOS: Info.plist, CFBundleVersion Usage Add the dependency Add this to your package’s pubspec.yaml file: dependencies: package_info_plus: ^1.0.6 Import the file into your dart file: import ‘package:package_info_plus/package_info_plus.dart’; if your method is marked as async: PackageInfo packageInfo = await PackageInfo.fromPlatform(); String appName = … Read more

How to hide soft input keyboard on flutter after clicking outside TextField/anywhere on screen?

You are doing it in the wrong way, just try this simple method to hide the soft keyboard. you just need to wrap your whole screen in the GestureDetector method and onTap method write this code. FocusScope.of(context).requestFocus(new FocusNode()); Here is the complete example: new Scaffold( body: new GestureDetector( onTap: () { FocusScope.of(context).requestFocus(new FocusNode()); }, child: … Read more

Flutter App stuck at “Running Gradle task ‘assembleDebug’… “

Here is solution in my case. Open your flutter Project directory. Change directory to android directory in your flutter project directory cd android clean gradle ./gradlew clean Build gradle ./gradlew build or you can combine both commands with just ./gradlew clean build Now run your flutter project. If you use vscode, press F5. First time … Read more

Flutter : Vertically center column

Solution as proposed by Aziz would be: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ //your widgets here… ], ) It would not be in the exact center because of padding: padding: EdgeInsets.all(25.0), To make exactly center Column – at least in this case – you would need to remove padding.

FlutterError: Unable to load asset

You should consider the indentation for assets flutter: assets: – images/pizza1.png – images/pizza0.png More details: flutter: [2 whitespaces or 1 tab]assets: [4 whitespaces or 2 tabs]- images/pizza1.png [4 whitespaces or 2 tabs]- images/pizza0.png After all this, you can make a hot-restart.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)