Skip to content

Instantly share code, notes, and snippets.

View Pants44's full-sized avatar
๐Ÿ˜€
Back at it

Pants Pants44

๐Ÿ˜€
Back at it
View GitHub Profile
@Pants44
Pants44 / ThemeBloc.dart
Created November 10, 2019 21:47
Uses the Bloc Package to provide a ThemeData Stream to dynamically change the theme on the fly. Also includes the example counterBloc example
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
enum CounterEvent {increment, decrement}
enum ThemeEvent {li, da}
void main() => runApp(ThemeSwitcher());
class ThemeBloc extends Bloc<ThemeEvent, ThemeData>{