Skip to content

Instantly share code, notes, and snippets.

@andrea689
andrea689 / flutter_publish_release.yml
Last active June 17, 2024 14:41
Example of CI/CD for Flutter
name: Flutter publish release
on:
push:
tags:
- android-v[0-9]+.[0-9]+.[0-9]+
- ios-v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+
jobs:
@felangel
felangel / main.dart
Created May 2, 2019 02:38
flutter_bloc with flutter_hooks
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
enum CounterEvent { increment, decrement }
class CounterBloc extends Bloc<CounterEvent, int> {
@override
int get initialState => 0;