Skip to content

Instantly share code, notes, and snippets.

View II11II's full-sized avatar
🏠
Working from home

Islam Akhrarov II11II

🏠
Working from home
View GitHub Profile
@II11II
II11II / example.dart
Created March 26, 2024 11:41
Various types of event registrations in bloc
import 'dart:async';
import 'package:bloc/bloc.dart';
void main() async{
final pushNotification = PushNotification();
final v1 = V1PushNotificationBloc(pushNotification: pushNotification);
v1.add(PushNotificationEvent.started());
v1.add(PushNotificationEvent.subscribe("V1PushNotificationBlocTopic"));
await Future.delayed(Duration(seconds: 1), (){
@II11II
II11II / lazy_init.dart
Last active December 16, 2021 09:22
Lazy initialization in dart
void main() {
print("entry point");
print(string);
print(string);
print(customClass);
print(customClass);
print("exit point");
}