This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); |