initialize method

Future<void> initialize()

Implementation

Future<void> initialize() async {
  await Future.wait([
    _loadData('assets/protobuf/countries.pb', (bytes) {
      if (_countries == null) {
        _countries = Countries.fromBuffer(bytes);
      }
    }),
    _loadData('assets/protobuf/states.pb', (bytes) {
      if (_states == null) {
        _states = States.fromBuffer(bytes);
      }
    }),
    _loadData('assets/protobuf/cities.pb', (bytes) {
      if (_cities == null) {
        _cities = Cities.fromBuffer(bytes);
      }
    }),
  ]);
}