import 'package:cashier_reserve/common/base/ui_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
export 'package:provider/provider.dart';

class MyProvider<T> {
  static T of<T>(BuildContext context, {bool listen = true}) {
    T provider = Provider.of<T>(context, listen: listen);
    if (provider is BaseUIModel) {
      BaseUIModel viewModel = provider;
      viewModel.context = context;
    }
    return provider;
  }
}
