Skip to content

Instantly share code, notes, and snippets.

1. Why use flutter_boost?
The official integration scheme has many drawbacks:
-The log cannot be output to the native terminal;
-There is a memory leak problem, using boost can make the memory stable;
-Native calls flutter, flutter calls native, and channel encapsulation makes development easier;
-At the same time, the page life cycle management is also neatly sorted out
2. IOS integration process
Do the work of flutter initialization in the delegate
@trungnam
trungnam / ScopeFuncs.swift
Created December 5, 2018 15:57 — forked from kakajika/ScopeFuncs.swift
A port of Kotlin's scope functions to Swift.
protocol ScopeFunc {}
extension ScopeFunc {
@inline(__always) func apply(block: (Self) -> ()) -> Self {
block(self)
return self
}
@inline(__always) func letIt<R>(block: (Self) -> R) -> R {
return block(self)
}
}
@trungnam
trungnam / ApiService.java
Created October 13, 2017 03:58 — forked from dustin-graham/ApiService.java
Infinite Scrolling Android RecyclerView with RxJava
public static Observable<List<String>> paginatedThings(final Observable<Void> onNextObservable) {
return Observable.create(new Observable.OnSubscribe<List<String>>() {
@Override
public void call(final Subscriber<? super List<String>> subscriber) {
onNextObservable.subscribe(new Observer<Void>() {
int latestPage = -1;
@Override
public void onCompleted() {
subscriber.onCompleted();