Version History

WubaNovember 19, 2022About 6 min

Fair Release Notes

3.10.0

updateDate: 2023.08.15

  • Adapted to Flutter 3.10.0, released Fair Version 3.10
  • Fix known bugs, fix DSL parser issues

3.2.1

updateDate:2023.04.13

  • Fix some known issues.

3.2.0

updateDate:2023.04.12

  • Add JS and Dart code for the universal FairPlugin, reuse the same interaction logic, and add example comments.
  • Adjust the call sequence of dispose, not on the tree, and stop subsequent operations.
  • Compatible with JSON parsing.
  • Add exception handling and log printing when using the V8 engine to call executeFunction in Android.
  • Fix the conversion error of SliverGridDelegateWithFixedCrossAxisCount.
  • Support other Sugar expressions for the input of SugarMap and SugarMapEach.
  • Optimize the performance of ifEqual, ifEqualBool, and switchCase.
  • Fix Domain's failure to recognize index and item in Sugar.
  • Make AOT execute code only when conditions are met.
  • Fix SugarMap and SugarMapEach's collection input not supporting other Sugar syntax.
  • Abstract Domain, add IndexDomain, MapEachDomain, and support nested Domain.
  • Add FunctionDomain, a universal Domain that generates corresponding parameters for callback functions for FunctionDomain to use.
  • Add support for commonly used Sugar for NullableIndexedWidgetBuilder, IndexedWidgetBuilder, WidgetBuilder, and TransitionBuilder.
  • Fix some known issues.

3.1.0

updateDate:2023.03.14

  • Upgrade analyzer library to 5.5.0;
  • Dart function to JS supports parameter passing;
  • JS Object value compatibility;
  • Remove kotlin dependencies from fair/android;
  • Add custom parsing for IconData;
  • The generation of optional positional parameters is modified to obtain pa;
  • Fixed missing OptionalPositional default values;
  • Remove the generation time from the generation.fair. dart comment;
  • Added the ignore unnecessary_import operation;
  • Fixed incorrect assignment of Sugar.switchCase key and defaultValue;
  • binding was changed to SplayTreeMap to increase search efficiency, especially for lists, where duplicate tags are searched for a short time;
  • Exposing specialBinding so that users can override a value;
  • When the provider is added to the _binding, the Settings set by the user prevail for quick modification;
  • Fixed the loadCoreJs package splicing problem;
  • Reduced minSdkVersion to 16;
  • runApplication supports specifying the package in which the JS resides;
  • Fixed error in calling context in the _reload method.

Contributors


zmtzawqlp

💻

陈有余

💻

3.0.0

Update time: 2022.11.18

  • Fix class constructor parsing exception;
  • Fair is compatible with the web side;
  • bindmap logic optimization.

2.8.1

Update time: 2022.11.01

  • Fixed bug: CustomScrollView reported an error when building a builder with reference to an external function.

2.8.0

Update time: 2022.10.21

  • Adapt to Flutter SDK 3.3.0+;
  • Added syntactic sugar: Sugar.isNestedScrollViewHeaderSliversBuilder, Sugar.isButtonStyle, Sugar.isDuration, Sugar.popMenuButton, Sugar.sliverChildBuilderDelegate, Sugar.sliverGridDelegateWithFixedCrossAxisCount;
  • Fixed some bugs.

2.7.0

Update time: 2022.08.10

Fair Adapt to Flutter SDK 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5; Fix some known bugs

2.6.0

1.Fair supports loading bundle files on the phone disk path;

FairWidget(
  path: 'Mobile phone disk path/xxx.fair.json',
)

2. Adapt to Flutter SDK 2.10.0, 2.10.1, 2.10.2, 2.10.3;

3.Dart2JS supports parsing static methods;

4. When running, the page error message prompts optimization;

When Fair is running and an error occurs, the following prompt will appear:

Click the error icon to display the error log:

5. Syntactic sugar supports parsing Model data.

How to use:

Step1: Define model data:

import 'package:fair/src/render/base_model.dart';

class Person implements BaseModel{}

Need to implement toJson, add a from method

Step2: Register the model

  • define a GeneratedModule
class TestGeneratedModule implements GeneratedModule
  • register the model in it

  • Pass the defined GeneratedModule into the generated: parameter of FairApp initialization

Step3: Model usage, take Sugar.mapEach as an example:

  • Sugar.mapEach([Person(name: "kk",age: 18, wei: 99)], (index, Person item) {}

  • need to specify the type of item to use item.nameopen in new window to use its model data

  • Support to call it directly or put it in a string Text(item.nameopen in new window), Text("${item.age}"),

2.5.0

Update time: 2022.05.31

Version Features

Fair

  • Compatible with Flutter SDK 2.8.0, 2.8.1
  • Dart2JS supports parsing singletons
  • Added syntactic sugar Sugar.switchCase, Sugar.colorsWithOpacity, Sugar.convertToString, etc.

example

Fully optimize the example structure and upgrade the example experience, which is more suitable for beginners to get started. In the source code, an example project is added to provide standard usage of the Fair API.

example project location: fair/example

Contributors


xiangwc

💻

WangYk

💻

gongpengyang

💻

qixu

💻

yangyang

💻

Chen Youyu

💻

2.4.1

Update time: 2022.05.12

Features

Fair

  • Fixed FairLogger file importing issue
  • Upgrade analyzer to 2.3.0

Contributors


Chen Youyu

💻

yangyang

💻

2.4.0

Update time: 2022.04.26

Features

Fair

  • FlatBuffers supports generating bin files in a null safe environment

Contributors


Chen Youyu

💻

2.3.0

Update time: 2022.04.22

Features

Fair

  • supports null-safe null-safe
  • Adapt to Flutter SDK 2.5.0, 2.5.1, 2.5.2, 2.5.3 and other versions

demo

  • Upgrade the outdated demo in the sample project
  • Supplement the iOS runtime environment in the sample project

Contributors


gongpengyang

💻

qixu

💻

Chen Youyu

💻

yangyang

💻

2.2.0

  1. Fair 2.2.0 added support for Flutter 2.5.0;
  2. Fixed some bugs.

2.0.0

The Fair 2.0 version adds support for logic dynamization and Flutter 2.0. The logic dynamization support includes the Fair Compiler tool's support for Dart2JS, and third-party plug-in (network, permission, picture selection) custom extension interface support.

Fair Compiler complete open source

This time, the Fair Compiler tool is fully open sourced. The Fair tool includes Dart2DSL for generating layout DSL and Dart2JS for generating logic JS. Since the compiler processes the entry in the flutter build command, but cannot debug when the command is running, the dsrt2dsl and dsrt2js core conversion processing modules are removed. Both modules can be debugged, and the input is the file path.

fair
├── dsrt2dsl // The tool part of dart to dsl to generate layout metadata DSL file
├── dsrt2js // The tool part of dart to dsl to generate logical JS files
└── compiler // flutter build automatic dynamic product generation entry

Friendly naming

The directory name is changed from fair_version to flutter_version, and the inside is the Flutter component created dynamically.

fair
└── flutter_version // flutter version compatible component

Added dynamic logic processing capability

Fair 2.0 uses the Fair Compiler tool to extract the logic part of the Widget and convert it into a JS file, which is sent to JSCore for processing. Android uses the V8 engine, and iOS uses the built-in JSCore. Fair 2.0 In addition to JSCore processing logic, we also added Fair syntax sugar and layout method call stack processing capabilities in the JS domain.

Third-party plugin extension standardization

Fair 2.0 defines the IFairPlugin standard interface, defines the standard process for third-party plug-in access, and gives a demo of network, permissions and image selection in the example.

fair
└── fair // fair engine module
    └── example
        └── lib/src/page
                └── plugins
                    ├── net // network plugin
                    ├── permission // permission plugin
                    └── pick-image // image selection
Last update:
Contributors: sunzhe03