Summary
This article uses a simple example to gradually introduce how to build a beautiful layout in Flutter. Through this article, you will learn the following points:
How Flutter's layout mechanism worksHow to lay out widgets vertically and horizontallyHow to layout Widget s in Flutter
This document mainly introduces how to make layout ...
Posted by web_noob on Thu, 22 Dec 2022 20:31:47 +0300
Normal constructor
1. Without specifying the constructor, dart will create a default parameterless constructor for you
2. If you specify a constructor
Similar to Java, dart can use a function with the same name as class as its constructor, such as
class Student {
int age = 0;
int id = 0;
Student(int age, int id) {
this.age = age; ...
Posted by NoPHPPhD on Fri, 05 Aug 2022 22:03:36 +0300
In native development, Android and IOS have their own control page (Activity, ViewControl) function to jump, and in flutter, routing management has become more unified, flexible and efficient.
Routing Management Requirements
In Flutter, everything is a component, a page is also a component, and routing is a jump and value transfer between compo ...
Posted by dotbands on Tue, 24 May 2022 15:17:08 +0300
In fluent, state management is the top priority. Whenever we talk about this topic, there are always endless words.
After formally introducing the Provider, why do we need state management. If you already know this clearly, it is recommended to skip this section directly.If our application is simple enough, as a declarative framework, you may o ...
Posted by bickyz on Mon, 23 May 2022 06:06:52 +0300
Click here to learn about the "Flutter Introduction and Combat" column, continuous update and systematic learning!
foreword
Good coding style is very important. Keeping consistent naming can make the code reading experience better and team collaboration more efficient. This article introduces the officially recommended naming conven ...
Posted by MBrody on Thu, 19 May 2022 02:17:31 +0300
Lao Meng's introduction: Today, I will introduce the menu function in Flutter.
PopupMenuButton
Use PopupMenuButton to pop up a menu when clicked. The usage is as follows:
PopupMenuButton<String>(
itemBuilder: (context) {
return <PopupMenuEntry<String>>[
PopupMenuItem<String>(
value: 'language',
...
Posted by phpmixx on Tue, 17 May 2022 22:56:10 +0300
flutter dio network request encapsulation implementation
Article Links: https://juejin.im/post/6844904098643312648
There are two ways to use network requests in the Flutter project, which are Dart's native network request HttpClient class and third-party open source network request libraries. In the third-party http request library open ...
Posted by wigz01 on Tue, 17 May 2022 10:00:04 +0300
Lao Meng's introduction: Many times we need to monitor the changes of the routing stack, so that we can customize the routing stack and facilitate the analysis of exception logs.
Use RouteObserver to listen for changes in the routing stack, first add navigatorObservers to the MaterialApp component:
void main() {
runApp(MyApp());
}
RouteOb ...
Posted by sgtbash on Tue, 17 May 2022 08:34:57 +0300
Event loop, Isolate
Before we start, we need to understand that Dart is single threaded and that fluent depends on Dart
If you know event loop in js The whole process of asynchronous dart is well understood
Let's look at a piece of code first
import 'dart:async';
Future eventLoop() async{
print('A');
Future((){
print('F');
scheduleMicrota ...
Posted by WinterDragon on Mon, 16 May 2022 23:21:38 +0300
Flutter is really powerful, but the fly in the ointment is that the ecology needs to be improved. There is no universal basic UI library like Antd or Element in the front end.
The direct impact of this is that the development efficiency can not be improved, and it needs to spend a lot of time and energy on the packaging of basic components.
T ...
Posted by yoda69 on Sat, 14 May 2022 13:01:24 +0300