Last active
January 16, 2025 14:11
-
-
Save eEQK/084dbe014310e5d16a3f4c05220d83bd to your computer and use it in GitHub Desktop.
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 'package:bloc/bloc.dart'; | |
class _Cubit extends Cubit<int> { | |
_Cubit() : super(0); | |
} | |
final _foo = Foo(() => _Cubit()); | |
typedef CubitFactory<T extends Cubit<R>, R> = T Function(); | |
class Foo<T extends Cubit<R>, R> { | |
Foo( | |
CubitFactory<T, R> fn, | |
) {} | |
} | |
void main() { | |
print(_foo.runtimeType); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment