![image description](relative/path/in/repository/to/image.svg) or <img src="relative/path/in/repository/to/image.svg" width="128"/>
How to upload project to another GitHub repo
Sometimes we may combine our own project with a GitHub remote repository, it may be school repo or work repo. However, what if you want to upload the project into your own repository for future review? Try this: git remote rename origin upstream git remote add origin URL_TO_GITHUB_REPO git push origin master
How to load images stored in Firebase in Flutter
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, …