mirrored_repositories/flutter_proyects_in_2020/components/lib/src
import 'dart:convert';

import "package:flutter/services.dart" show rootBundle;

class _MenuProvider{
  List<dynamic> opciones = [];

  _MenuProvider(){
    // cargarData();
  }

 Future<List<dynamic>> cargarData() async {
   
  final resp = await rootBundle.loadString('data/menu_opts.json');

  Map dataMap = json.decode(resp);
  // print(dataMap['rutas']);
  opciones = dataMap['rutas'];
  
  return opciones;
    
 }
}

final menuProvider = new _MenuProvider();