import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

extension ObtainProviderExtension on BuildContext {
  T obtainState<T extends ChangeNotifier>() {
    return Provider.of<T>(this, listen: false);
  }
}