Skip to content

Instantly share code, notes, and snippets.

☕️
coding

Felix Angelov felangel

☕️
coding
Block or report user

Report or block felangel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@felangel
felangel / main.dart
Last active Jun 13, 2019
Recipe: Bloc Access (Global)
View main.dart
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
class SimpleBlocDelegate extends BlocDelegate {
@override
void onEvent(Bloc bloc, Object event) {
super.onEvent(bloc, event);
print(event);
}
@felangel
felangel / main.dart
Last active Jun 15, 2019
Recipe: Bloc Access (Routes)
View main.dart
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
class SimpleBlocDelegate extends BlocDelegate {
@override
void onEvent(Bloc bloc, Object event) {
super.onEvent(bloc, event);
print(event);
}
@felangel
felangel / main.dart
Last active Jun 13, 2019
Recipe: Bloc Access (Local)
View main.dart
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
class SimpleBlocDelegate extends BlocDelegate {
@override
void onEvent(Bloc bloc, Object event) {
super.onEvent(bloc, event);
print(event);
}
@felangel
felangel / main.dart
Created May 28, 2019
[flutter_timer] completed main
View main.dart
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_timer/bloc/bloc.dart';
import 'package:flutter_timer/ticker.dart';
import 'package:wave/wave.dart';
import 'package:wave/config.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@felangel
felangel / main.dart
Created May 28, 2019
[flutter_timer] Background
View main.dart
import 'package:flutter/material.dart';
import 'package:wave/wave.dart';
import 'package:wave/config.dart';
class Background extends StatelessWidget {
@override
Widget build(BuildContext context) {
return WaveWidget(
config: CustomConfig(
gradients: [
@felangel
felangel / main.dart
Created May 28, 2019
[flutter_timer] Timer + Actions
View main.dart
class Timer extends StatelessWidget {
static const TextStyle timerTextStyle = TextStyle(
fontSize: 60,
fontWeight: FontWeight.bold,
);
@override
Widget build(BuildContext context) {
final TimerBloc _timerBloc = BlocProvider.of<TimerBloc>(context);
return Scaffold(
@felangel
felangel / main.dart
Created May 28, 2019
[flutter_timer] Timer Actions
View main.dart
class Actions extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: _mapStateToActionButtons(
timerBloc: BlocProvider.of<TimerBloc>(context),
),
);
}
@felangel
felangel / main.dart
Created May 28, 2019
[flutter_timer] Timer Widget
View main.dart
class Timer extends StatelessWidget {
static const TextStyle timerTextStyle = TextStyle(
fontSize: 60,
fontWeight: FontWeight.bold,
);
@override
Widget build(BuildContext context) {
final TimerBloc _timerBloc = BlocProvider.of<TimerBloc>(context);
return Scaffold(
@felangel
felangel / main.dart
Created May 28, 2019
[flutter_timer] MyApp
View main.dart
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_timer/bloc/bloc.dart';
import 'package:flutter_timer/ticker.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
State<MyApp> createState() => _MyAppState();
}
@felangel
felangel / bloc.dart
Created May 28, 2019
[flutter_timer] bloc barrel
View bloc.dart
export 'timer_bloc.dart';
export 'timer_event.dart';
export 'timer_state.dart';
You can’t perform that action at this time.