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
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';
@felangel
felangel / timer_bloc.dart
Created May 28, 2019
[flutter_timer] Timer Bloc
View timer_bloc.dart
import 'dart:async';
import 'package:meta/meta.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_timer/bloc/bloc.dart';
import 'package:flutter_timer/ticker.dart';
class TimerBloc extends Bloc<TimerEvent, TimerState> {
final Ticker _ticker;
final int _duration = 60;
@felangel
felangel / timer_bloc.dart
Created May 28, 2019
[flutter_timer] Timer Bloc resume event
View timer_bloc.dart
import 'dart:async';
import 'package:meta/meta.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_timer/bloc/bloc.dart';
import 'package:flutter_timer/ticker.dart';
class TimerBloc extends Bloc<TimerEvent, TimerState> {
final Ticker _ticker;
final int _duration = 60;
@felangel
felangel / timer_bloc.dart
Created May 28, 2019
[flutter_timer] Timer Bloc pause event
View timer_bloc.dart
import 'dart:async';
import 'package:meta/meta.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_timer/bloc/bloc.dart';
import 'package:flutter_timer/ticker.dart';
class TimerBloc extends Bloc<TimerEvent, TimerState> {
final Ticker _ticker;
final int _duration = 60;
You can’t perform that action at this time.