Use the code below: final ref = FirebaseStorage.instance.ref().child('image_path_without_extension'); var url = await ref.getDownloadURL(); Image.network(url);
How to configure Firebase in Flutter?
1. Configure Dependencies $ flutter pub add firebase_core Resolving dependencies… + firebase_core 1.10.5 + firebase_core_platform_interface 4.2.2 + firebase_core_web 1.5.2 + flutter_web_plugins 0.0.0 from sdk flutter + js 0.6.3 test_api 0.4.3 (0.4.8 available) Changed 5 dependencies! $ flutter pub add firebase_auth Resolving dependencies… + firebase_auth 3.3.3 + firebase_auth_platform_interface 6.1.8 + firebase_auth_web 3.3.4 + intl 0.17.0 test_api …
How to call multiple functions in onPressed() in Flutter?
There are one example to do it: RaisedButton( color: Colors.blueAccent, onPressed: () { sendData(); //fun1 signupPage(context); //fun2 }, child: Text("Signup"), ) This is how I add a SnackBar into my code: Padding( padding: const EdgeInsets.all(8.0), child: Center( child: ElevatedButton( onPressed: () { const postSuccessfullySnackBar = SnackBar( content: Text('Your item posted! 0v0'), ); _addNewItemInfoEntry(); ScaffoldMessenger.of(context) .showSnackBar(postSuccessfullySnackBar); …
Continue reading “How to call multiple functions in onPressed() in Flutter?”
How to navigate to another page in Flutter?
How to use routes import 'package:flutter/material.dart'; void main() { runApp( MaterialApp( title: 'Named Routes Demo', // Start the app with the "/" named route. In this case, the app starts // on the FirstScreen widget. initialRoute: '/', routes: { // When navigating to the "/" route, build the FirstScreen widget. '/': (context) => const FirstScreen(), …
Continue reading “How to navigate to another page in Flutter?”
After updating, Flutter Projects require a new version of Kotlin Gradle Plugin
Today I update my flutter and face this error in Android Studio: ┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐ │ [!] Your project requires a newer version of the Kotlin Gradle plugin. │ │ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then │ │ update C:\Users\YU\Desktop\todo_list\android\build.gradle: │ │ ext.kotlin_version = '<latest-version>' │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ To Fix it, go projectName/android/build.gradle buildscript …
Continue reading “After updating, Flutter Projects require a new version of Kotlin Gradle Plugin”
Some Basic Concepts of Flutter
MaterialApp class in Flutter MaterialApp Class: MaterialApp is a predefined class in a flutter. It is likely the main or core component of flutter. We can access all the other components and widgets provided by Flutter SDK. Text widget, Dropdownbutton widget, AppBar widget, Scaffold widget, ListView widget, StatelessWidget, StatefulWidget, IconButton widget, TextField widget, Padding widget, …
How to integrate Google Map in Flutter Project (Android)
Getting start with Flutter flutter create google_maps_in_flutter Adding Google Maps Flutter plugin as a dependency cd google_maps_in_flutter flutter pub add google_maps_flutter Configure Platform For IOS: # in ios/Podfile # Set platform to 11.0 to enable latest Google Maps SDK platform :ios, '11.0' # Uncomment and set to 11. # CocoaPods analytics sends network stats synchronously …
Continue reading “How to integrate Google Map in Flutter Project (Android)”
How to update minSdkVersion to 21 in android studio for flutter
When I developed an Flutter app with camera function, I found out I can’t run camera due to a low min sdk version. To fix it, follow steps below: 1. Go to the path ‘./android/app/build.gradle" 2. Update the sdk version as image below
How to install Flutter and run Hello World on it
For Windows 1. Click this website to download and install Flutter. 2. Extract the zip file and place the contained flutter in the desired installation location for the Flutter SDK For example, C:\Users\\Documents 3. Update your path If you wish to run Flutter commands in the regular Windows console, take these steps to add Flutter …
Continue reading “How to install Flutter and run Hello World on it”