Skip to content

Instantly share code, notes, and snippets.

View EffyCoder's full-sized avatar

Shantanoo Harmalkar EffyCoder

View GitHub Profile
import 'dart:async';
import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
part 'orders_event.dart';
part 'orders_state.dart';
class RegOrdersBloc extends Bloc<OrdersEvent, RegOrdersState> {
final GetRegularOrderStatuses getRegularOrderStatuses;
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:jivitva/core/common/widgets/loading_widget.dart';
import 'package:jivitva/core/common/widgets/timer_widget.dart';
class OrdersPage extends StatelessWidget {
const OrdersPage({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
@EffyCoder
EffyCoder / SharedPreferencesSingletonEnumKeyTemplate.java
Created August 29, 2017 10:19 — forked from alphamu/SharedPreferencesSingletonEnumKeyTemplate.java
A SharedPreferences singleton that can be used to centralise and simplify reading and writing of SharedPerferences in your Android app. There are 2 versions, one that uses static String for Keys and an other that uses enums. Which one you use comes down to your preference, enums I feel provides better control when you have multiple programmers w…
#if (${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.content.Context;
import android.content.SharedPreferences;
/*
* A Singleton for managing your SharedPreferences.
*
* You should make sure to change the SETTINGS_NAME to what you want
* and choose the operating made that suits your needs, the default is