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
import 'dart:core'; | |
// Lisp parser from https://www.recurse.com/pairing-tasks. | |
/// Tokenize the input Lisp code | |
List<String> tokenize(String code) { | |
return code | |
.replaceAll('(', ' ( ') | |
.replaceAll(')', ' ) ') | |
.trim() |
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
➜ app_flutter git:(littlegnal/flutter-issue-63560) ✗ /Users/littlegnal/dev/flutter/bin/cache/dart-sdk/bin/dart --verbose_stack_overflow --disable-dart-dev /Users/littlegnal/dev/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root /Users/littlegnal/dev/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --target=flutter -Ddart.developer.causal_async_stacks=false -Ddart.vm.profile=true -Ddart.vm.product=false --bytecode-options=source-positions --aot --tfa --packages /Users/littlegnal/codes/app_flutter/.packages --output-dill /Users/littlegnal/codes/app_flutter/.dart_tool/flutter_build/e515cc90ad1adf6fc48b0f9aaa3532da/app.dill --depfile /Users/littlegnal/codes/app_flutter/.dart_tool/flutter_build/e515cc90ad1adf6fc48b0f9aaa3532da/kernel_snapshot.d package:app_flutter/main.dart | |
result f431f1d2-5232-449c-96c0-fdf2975bc9ac | |
Stack overflow in native code | |
Native SP = 70000c777da0, stack limit = 70000c778000 | |
Call stack: | |
size | frame | |
584 [exit : sp(0) fp(0x70000c777fe |
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
class SummaryPage extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() => _SummaryPageState(); | |
} | |
class _SummaryPageState extends State<SummaryPage> { | |
final _summaryBloc = SummaryBloc(AccountingRepository.db); | |
... |
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
class SummaryBloc { | |
SummaryBloc(this._db); | |
final AccountingRepository _db; | |
final _summaryChartDataSubject = | |
BehaviorSubject<SummaryChartData>.seeded(...); | |
final _summaryListSubject = | |
BehaviorSubject<BuiltList<SummaryListItem>>.seeded(BuiltList()); |
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
@UIApplicationMain | |
@objc class AppDelegate: FlutterAppDelegate { | |
lazy var sqlDelightManager: SqlDelightManager = { | |
Db().defaultDriver() | |
let accountingRepository = AccountingRepository(accountingDB: Db().instance) | |
return SqlDelightManager(accountingRepository: accountingRepository) | |
}() | |
override func application( | |
_ application: UIApplication, |
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
rootProject.buildDir = '../build' | |
subprojects { | |
project.buildDir = "${rootProject.buildDir}/${project.name}" | |
} |
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
class MainActivity: FlutterActivity() { | |
private val sqlDelightManager by lazy { | |
val accountingRepository = AccountingRepository(Db.getInstance(applicationContext)) | |
SqlDelightManager(accountingRepository) | |
} | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
GeneratedPluginRegistrant.registerWith(this) |
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
implementation project(":common") |
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
const val SQLDELIGHT_CHANNEL = "com.littlegnal.accountingmultiplatform/sqldelight" | |
class SqlDelightManager( | |
private val accountingRepository: AccountingRepository | |
) : CoroutineScope { | |
... | |
fun methodCall(method: String, arguments: Map<String, Any>, result: (Any) -> Unit) { | |
launch(coroutineContext) { |
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
class AccountingRepository(private val accountingDB: AccountingDB) { | |
private val json: Json by lazy { | |
Json(JsonConfiguration.Stable) | |
} | |
... | |
fun getMonthTotalAmount(yearAndMonthList: List<String>): String { | |
val list = mutableListOf<GetMonthTotalAmount>() |
NewerOlder