<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CodeFlutter]]></title><description><![CDATA[CodeFlutter]]></description><link>https://blog.bprabesh.com.np</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 10:00:19 GMT</lastBuildDate><atom:link href="https://blog.bprabesh.com.np/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Image not loading on Google Chrome browser in flutter web. "FormatException:Message corrupted". Flutter web not loading images on web browser.]]></title><description><![CDATA[I have encounter this problem on the begining of the website i created using flutter. I search every possible solution on the web, stackoverflow and other sites. Even use ChatGTP for the solution but i stuck on the same problem for several days.
Afte...]]></description><link>https://blog.bprabesh.com.np/image-not-loading-on-google-chrome-browser-in-flutter-web-formatexceptionmessage-corrupted-flutter-web-not-loading-images-on-web-browser</link><guid isPermaLink="true">https://blog.bprabesh.com.np/image-not-loading-on-google-chrome-browser-in-flutter-web-formatexceptionmessage-corrupted-flutter-web-not-loading-images-on-web-browser</guid><category><![CDATA[Flutter]]></category><category><![CDATA[Bugs and Errors]]></category><category><![CDATA[IDM]]></category><category><![CDATA[error]]></category><dc:creator><![CDATA[Prabesh Bhattarai]]></dc:creator><pubDate>Tue, 20 Feb 2024 15:42:16 GMT</pubDate><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1708443567140/83d3e743-1142-487d-beb8-d7870907398c.png" alt class="image--center mx-auto" /></p>
<p>I have encounter this problem on the begining of the website i created using flutter. I search every possible solution on the web, stackoverflow and other sites. Even use ChatGTP for the solution but i stuck on the same problem for several days.</p>
<p>After some day I find the solution what was causing it. It was IDM( Internet Download Manager). When application runs and renders an image widget which is loading from assets, my IDM application download dialog pops up and asks to download AssetManifest.bin.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1708443603167/8dd28289-fa90-4708-bb6f-20c8f2846cee.png" alt class="image--center mx-auto" /></p>
<p><strong>Solution</strong></p>
<p>I disable Chrome in IDM general setting. I work for me.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1708443646245/4cbe35b7-3ac2-4bc4-bc14-a6d7a2d72d9a.png" alt class="image--center mx-auto" /></p>
<p>If it doesnot work then it might another problem causing it or you can try to remove/uninstal IDM to check that IDM is cause it or not.</p>
]]></content:encoded></item><item><title><![CDATA[Change Image in Flutter]]></title><description><![CDATA[Picking up image is one of the important thing in any application. User want to select various image, upload it and various other reasons. Making a functionality for picking image is one of the crucial part of mobile development and also for other pl...]]></description><link>https://blog.bprabesh.com.np/change-image-in-flutter</link><guid isPermaLink="true">https://blog.bprabesh.com.np/change-image-in-flutter</guid><category><![CDATA[Flutter]]></category><category><![CDATA[images]]></category><category><![CDATA[image_picker]]></category><category><![CDATA[Dart]]></category><category><![CDATA[Flutter Examples]]></category><category><![CDATA[flutter packages]]></category><dc:creator><![CDATA[Prabesh Bhattarai]]></dc:creator><pubDate>Thu, 15 Feb 2024 10:56:28 GMT</pubDate><content:encoded><![CDATA[<p>Picking up image is one of the important thing in any application. User want to select various image, upload it and various other reasons. Making a functionality for picking image is one of the crucial part of mobile development and also for other platforms. Writing code the from the scratch can be hard therefore various developers across the globe developed various packages to make others developers easy to write a code. Image picker is one of the common package used to pick a image from gallery or camera.</p>
<pre><code class="lang-plaintext">var profileImgPath=''.obs;

changeImage(context) async{
try{
final img= await ImagePicker().pickImage(
source:ImageSource.gallery,
    imageQuality:70);
if(img=null)return;
profileImgPath.value=img.path;
}
 on PlatformException catch(e){
VxToast.show(context,msg:e.toString());
}
}
</code></pre>
<p>I make a function changeImage(context) which use ImagePicker package to pick a image from gallery. Here profileImgPath is used to store the value of path. I am using Getx as state management therefore I use obs. We can use this fuction as below.</p>
<pre><code class="lang-plaintext">ElevatedButton(
onPressed:(){
changeImage(context);
}
),
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Adding Flutter projects with  Firebase using  Flutterfire CLI]]></title><description><![CDATA[Connection between server and database is one of the important part of the any applications. Firebase is one of the backend cloud computing and application development platform provided by Google. It host database, services, authentications for varie...]]></description><link>https://blog.bprabesh.com.np/adding-flutter-projects-with-firebase-using-flutterfire-cli</link><guid isPermaLink="true">https://blog.bprabesh.com.np/adding-flutter-projects-with-firebase-using-flutterfire-cli</guid><category><![CDATA[Flutter]]></category><category><![CDATA[flutterfire]]></category><category><![CDATA[Firebase]]></category><dc:creator><![CDATA[Prabesh Bhattarai]]></dc:creator><pubDate>Fri, 09 Feb 2024 16:37:52 GMT</pubDate><content:encoded><![CDATA[<p>Connection between server and database is one of the important part of the any applications. Firebase is one of the backend cloud computing and application development platform provided by Google. It host database, services, authentications for variety of application includes android, iOS, javaScript, unity , C++ and many more. Firebase is designed to be easy to use and handles much of infrastructures, allowing users to focus on building frontend.</p>
<p>Adding Flutter projects on to firebase is one of the important things during the development process. Generally it is easy to add the flutter to the firebase but sometimes it may be time consuming and make confusion between the codes. Flutterfire CLI is a useful tools which provide commands that help ease the installation process of FlutterFire across all supported platforms.</p>
<p>Inside the <a target="_blank" href="https://console.firebase.google.com/">Firebase console</a>, go to project you want. If you haven't create a project then create a project. After you inside a project, go to to <mark>Project Overview </mark> and click on the flutter logo as shown on the image below.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1707495221387/7a41e51c-f29a-445d-93c1-a01fa0f936e5.png" alt class="image--center mx-auto" /></p>
<p>When you click on that flutter logo you will be navigate to the next page that is shown below.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1707495310299/08ac8abb-0a18-4bbf-8017-215a1dfb9500.png" alt class="image--center mx-auto" /></p>
<p>Follow the process i.e. login from a terminal. You can use command prompt(cmd) and run as administrator. Copy the code "firebase login" and run it. It may ask to login the the firebase again. No need to run "flutter create" because you have already create a project. If not create then create one. Click on <mark>Next.</mark></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1707495636447/38484022-b1ef-4668-b1ca-0de2b9c14d57.png" alt class="image--center mx-auto" /></p>
<p>Run the command "dart pub global activate flutterfire_cli" from any terminal. You can use command prompt(cmd). After you run the first command, now run the second command " flutterfire configure --project=Your project". Your command should match with the code given by the flutterfire. You should run the second command from the same terminal you use in the project you want to connect flutter with firebase. Now you should something like in the image below.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1707496074595/36c43295-f9de-4109-983e-40a499d3d9a8.png" alt class="image--center mx-auto" /></p>
<p>You have to select which platform your configuration to support. If you are using android then use space to select. After you select the platform flutterfire will automatically confirgure you settings.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1707496364336/ba2ebd54-7182-4efc-8bf4-238b5ea06573.png" alt class="image--center mx-auto" /></p>
<p>At last you have to configure some code inside main.dart.</p>
<pre><code class="lang-plaintext">Future&lt;void&gt; main() async {

  WidgetsFlutterBinding.ensureInitialized(); //add this code

  // add this code  
  await Firebase.initializeApp( 
    options: DefaultFirebaseOptions.currentPlatform,
  );
  runApp(const MyApp());
}
</code></pre>
<p>And you are ready to go.</p>
]]></content:encoded></item><item><title><![CDATA[Firebase Authentication method in flutter]]></title><description><![CDATA[Authentication in any application is one of the important part of the program. It helps to indentify a user of the particular application or not. It indentify a user by searching the user email and password on the firebase database. Firebase authenti...]]></description><link>https://blog.bprabesh.com.np/firebase-authentication-method-in-flutter</link><guid isPermaLink="true">https://blog.bprabesh.com.np/firebase-authentication-method-in-flutter</guid><category><![CDATA[Signup page]]></category><category><![CDATA[login]]></category><category><![CDATA[Flutter]]></category><category><![CDATA[Flutter Examples]]></category><category><![CDATA[Dart]]></category><category><![CDATA[Blogging]]></category><dc:creator><![CDATA[Prabesh Bhattarai]]></dc:creator><pubDate>Wed, 07 Feb 2024 17:04:00 GMT</pubDate><content:encoded><![CDATA[<p>Authentication in any application is one of the important part of the program. It helps to indentify a user of the particular application or not. It indentify a user by searching the user email and password on the firebase database. Firebase authentication is one of the easiest and simple to understand.</p>
<p>Here is the firebase authentication code to login and signout.</p>
<pre><code class="lang-plaintext">import 'package:firebase_auth/firebase_auth.dart';

class AuthController extends GetxController {
  FirebaseAuth auth = FirebaseAuth.instance;
  //textcontrollers
  var emailController = TextEditingController();
  var passwordController = TextEditingController();
  //login method
  Future&lt;UserCredential?&gt; loginMethod({context}) async {
    UserCredential? userCredential;
    try {
      userCredential = await auth.signInWithEmailAndPassword(
          email: emailController.text, password: passwordController.text);
    } on FirebaseAuthException catch (e) {
      VxToast.show(context, msg: e.toString());
    }
    return userCredential;
  }
  //signout method
  signoutMethod(context) async {
  try {
    await auth.signOut();
  } catch (e) {
    VxToast.show(context, msg: e.toString());
  }
}
}
</code></pre>
<p>For Signup</p>
<pre><code class="lang-plaintext">//signup method
Future&lt;UserCredential?&gt; signupMethod({email,password,context}) async{
UserCredential? userCredential;

try{
userCredential = 
await auth.createUserWithEmailAndPassword(email:email,password:password);
} on FirebaseAuthException catch (e){
 VxToast.show(context, msg: e.toString());
}return userCredential;
}
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Solved [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()]]></title><description><![CDATA[While using Firebase services in Flutter, you may get "[core/no-app] No Firebase App'[DEFAULT]' has been created - call Firebase.initalizeApp()". Error in flutter. This error is caused when you use any Firebase servies such as Cloud Messaging, Firest...]]></description><link>https://blog.bprabesh.com.np/solved-coreno-app-no-firebase-app-default-has-been-created-call-firebaseinitializeapp</link><guid isPermaLink="true">https://blog.bprabesh.com.np/solved-coreno-app-no-firebase-app-default-has-been-created-call-firebaseinitializeapp</guid><category><![CDATA[Flutter]]></category><category><![CDATA[Firebase]]></category><category><![CDATA[Bugs and Errors]]></category><category><![CDATA[error handling]]></category><dc:creator><![CDATA[Prabesh Bhattarai]]></dc:creator><pubDate>Tue, 06 Feb 2024 14:41:52 GMT</pubDate><content:encoded><![CDATA[<p>While using Firebase services in Flutter, you may get "[core/no-app] No Firebase App'[DEFAULT]' has been created - call Firebase.initalizeApp()". Error in flutter. This error is caused when you use any Firebase servies such as Cloud Messaging, Firestore without initializing Firebase core.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1707230227715/71068bf6-8355-4ae8-9e08-f12715b4f1b4.png" alt class="image--center mx-auto" /></p>
<p>This cause of this error is you might not have initialized firebase before using firebase service.</p>
<h3 id="heading-how-to-solve-this-error">How to solve this error?</h3>
<p>To solve this error, add firebase core Flutter package in your project by adding the following lines in pubspec.yaml file:</p>
<pre><code class="lang-plaintext">dependencies:
  flutter:
    sdk: flutter
  firebase_core: ^2.15.0
</code></pre>
<p>Now in main() method of main.dart file, initialize Firebase like below before using any Firebase services:</p>
<pre><code class="lang-plaintext">import 'package:firebase_core/firebase_core.dart';
void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await Firebase.initializeApp();
   //initilization of Firebase app

  // other Firebase service initialization

  runApp(MyApp());
}
</code></pre>
<p>Adding WidgetsFlutterBinding.ensureInitialized();<br />and await Firebase.initializeApp(); with async will solve the problem. Thank you</p>
]]></content:encoded></item><item><title><![CDATA[Removing debug banner in flutter]]></title><description><![CDATA[Debug banner is a label given on a application when in development mode. It indecate that it is in debug mode or is beta phase. It can be eyecaughting for some developers and can be irretation for the developers to further moving on to the developmen...]]></description><link>https://blog.bprabesh.com.np/removing-debug-banner-in-flutter</link><guid isPermaLink="true">https://blog.bprabesh.com.np/removing-debug-banner-in-flutter</guid><category><![CDATA[debugging]]></category><category><![CDATA[Flutter]]></category><category><![CDATA[Flutter Examples]]></category><dc:creator><![CDATA[Prabesh Bhattarai]]></dc:creator><pubDate>Mon, 05 Feb 2024 12:32:52 GMT</pubDate><content:encoded><![CDATA[<p>Debug banner is a label given on a application when in development mode. It indecate that it is in debug mode or is beta phase. It can be eyecaughting for some developers and can be irretation for the developers to further moving on to the development phases. So some developers remove it from the application.</p>
<p>Here is the syntax of how you can remove it from the flutter application.</p>
<pre><code class="lang-plaintext">runApp(
    MaterialApp(
      debugShowCheckedModeBanner: false // syntax
...
</code></pre>
<p>For example:</p>
<pre><code class="lang-plaintext">import 'package:flutter/material.dart';
void main() {
  runApp(
    MaterialApp(
      debugShowCheckedModeBanner: false,
        home: Scaffold(
          appBar: AppBar(
            backgroundColor: Colors.green,
            title: Center(child: Text('CodeNepal')),
      ),
          body: Text('Hello'),
    )),
  );
}
</code></pre>
]]></content:encoded></item><item><title><![CDATA[I am Rich]]></title><description><![CDATA[I am Rich is a application developed as joke by a German developer, Armin Heinrich after he saw iphone users complaining the software price above $0.99. It application only consists of glowing red gem and an icon that, when pressed, displayed the fol...]]></description><link>https://blog.bprabesh.com.np/i-am-rich</link><guid isPermaLink="true">https://blog.bprabesh.com.np/i-am-rich</guid><category><![CDATA[Flutter]]></category><category><![CDATA[Flutter Examples]]></category><category><![CDATA[Dart]]></category><dc:creator><![CDATA[Prabesh Bhattarai]]></dc:creator><pubDate>Sun, 04 Feb 2024 15:21:43 GMT</pubDate><content:encoded><![CDATA[<p>I am Rich is a application developed as joke by a German developer, Armin Heinrich after he saw iphone users complaining the software price above $0.99. It application only consists of glowing red gem and an icon that, when pressed, displayed the following mantra text:</p>
<p>I am Rich</p>
<p>I deserve it</p>
<p>I am good,</p>
<p>healthy &amp; successful</p>
<p>This application was placed at the price of US$999.99 and eight people buy this application from appstore.</p>
<p>Code for this simple application is below.</p>
<pre><code class="lang-plaintext">import 'package:flutter/material.dart';

void main() {
  runApp(ImRich());
}

class ImRich extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.blueGrey,
        appBar: AppBar(
          backgroundColor: Colors.blueGrey[900],
          title: Center(
            child: Text(
              'I am RICH!',
              style: TextStyle(
                color: Colors.white,
                letterSpacing: 3.0,
              ),
            ),
          ),
        ),
        body: Center(
          child: Image(
            image: AssetImage('images/diamond.png'),
          ),
        ),
      ),
    );
  }
}
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Hello world on Flutter]]></title><description><![CDATA[Hello world is the common word using in programming world. It is used for the beginner to experience the engery of the outcome of code that the person has written. It is one of the crucial part of the most of the developer around the world because it...]]></description><link>https://blog.bprabesh.com.np/hello-world-on-flutter</link><guid isPermaLink="true">https://blog.bprabesh.com.np/hello-world-on-flutter</guid><category><![CDATA[Hello World]]></category><category><![CDATA[Flutter]]></category><category><![CDATA[Dart]]></category><dc:creator><![CDATA[Prabesh Bhattarai]]></dc:creator><pubDate>Sun, 04 Feb 2024 15:08:13 GMT</pubDate><content:encoded><![CDATA[<p>Hello world is the common word using in programming world. It is used for the beginner to experience the engery of the outcome of code that the person has written. It is one of the crucial part of the most of the developer around the world because it like the a baby seeing the world for the programmers. It is first experience of the programmers entering on the development journey.</p>
<p>Here is the common the Hello word program written in flutter.</p>
<pre><code class="lang-plaintext">import 'package:flutter/material.dart';

void main() {
runApp(const MyApp);
}

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
    return const MaterialApp(
    home: Center(
    child: Text('Hello World'),
        ),
    );
    }
}
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Flutter Framework]]></title><description><![CDATA[Flutter is a framework that use dart programming language to build android , iOS , web ,windows ,macos and linux application. It cross platform used to build different application using single framework. It is easy to create multiple application usin...]]></description><link>https://blog.bprabesh.com.np/flutter-framework</link><guid isPermaLink="true">https://blog.bprabesh.com.np/flutter-framework</guid><category><![CDATA[Flutter]]></category><dc:creator><![CDATA[Prabesh Bhattarai]]></dc:creator><pubDate>Sun, 04 Feb 2024 11:49:00 GMT</pubDate><content:encoded><![CDATA[<p>Flutter is a framework that use dart programming language to build android , iOS , web ,windows ,macos and linux application. It cross platform used to build different application using single framework. It is easy to create multiple application using this framework. Dart programming language is simillar to the object programming language like C++. Most of the syntax are similar to C++. Flutter make easy for the developers to build application. Flutter is easy to learn and build applications. Since it is cross platform, we can build application with same code written. For example: It I build a android application using this framework, I can run the same code in iOS also and similar for other platforms. Due to this advantages most developers prefers flutter as developing framework. Since it is developed by Google, regularly updating its code which makes it more reliable and popular.</p>
]]></content:encoded></item></channel></rss>