Flutter - best practice when working with package

I'm wondering what's the best practice when working with certain package when i only need one defined method from that package. I remember that i once saw a code sourc...

What is the optimal render loop in Dart 2?

I am looking for ideas regarding an optimal/minimal structure for the inner render loop in Dart 2, for a 2d game (if that part matters). Clarification / Explan...

ExpansionTile lagging when expanding with a lot of children

<strong>Hello !</strong> Everything is in the title. I have an expansion tile to show members of a group. When lots of people are in a group (here 47), t...

How should I implement the init method? In a stateful or stateless widget?

What is the rule of thumb to use an initial method for a widget. Shall I use the: <ul> <li><strong>A. classical stateful widget approach?</strong></li> </ul> <a...

Flutter pdf generation too slow with image

im working on a pdf generator app in flutter, but when i want to add an image to the pdf, it takes too long also i wanted to know how it is possible to add multiple im...

Flutter GridView: how to dont generate items when GridView is not primary

I try to make an apps using long GridView with complexe item. I use GridView.builder which is optimize and it creates visible items (and it do the job !). But in my ca...

Should Flutter widgets be created in the class or in the build() function?

Is there a general rule of thumb on <em>where</em> to create widgets to be more optimal (assuming the widget doesn't rely on anything passed into build())? If...

Flutter TextFormField validation creates memory leak by creating infinite widgets according to Flutter Performance inspector

Creating a simple Login/Register UI and need to validate Username/password and noticed that on 'Flutter Performance' inspector if I press multiple times on the button...

flutter SkCanvas::Flush execution is too slow

<pre><code>import 'dart:ui'; import 'package:flutter/material.dart'; void main() =&gt; runApp(MyApp()); class MyApp extends StatelessWidget { // This widget is the r...

request http commuication and overload problem

now i am using 2~3 <code>http</code> requests every-time when i open flutter app. <pre class="lang-dart prettyprint-override"><code>void main() async { final Li...

Flutter: Is it bad to put streams in a StreamBuilder directly?

Currently, my StreamBuilders look something like this: <pre><code> StreamBuilder( stream: Firestore.instance.collection(events).s...

There is any method for webview cache Optimization in flutter?

I use flutter_inappwebview for fetching the website into the flutter app. I want to save all the resources like JS and CSS file content into the cache from website dur...

Flutter: Why do we need to dispose ViewModels?

Can someone give a simple case where we will immidiately appreciate the importance of disposing viewmodels and at the same time know the repercussions if we don't? My...

Do Dart property result need to cache?

Do I need to cache Dart property result in release flutter VM for the best of the best performance? It dartpad, cache will improve performance. <pre><code...

Dart switch with String cases, performance

I was wondering how switch which uses strings as a constants in case block is implemented? When I do debug, and do Step by step execution, I see that execution goes fr...