Skip to content

Instantly share code, notes, and snippets.

View ktkk's full-sized avatar

katkak ktkk

View GitHub Profile
@ktkk
ktkk / main.dart
Created June 23, 2023 10:35
Type inference breaks(?) when using a list of records and a callback function
typedef MyCallback<T> = void Function(T? value);
typedef MyRecord<T> = (String title, T value);
class MyRecordClass<T> {
const MyRecordClass(this.title, this.value);
final String title;
final T value;
}