loadTemplatesIfNeeded method

Future<void> loadTemplatesIfNeeded({
  1. String? initialTemplateId,
})

Loads the templates if they haven't been loaded yet.

Implementation

Future<void> loadTemplatesIfNeeded({String? initialTemplateId}) async {
  if (_hasLoaded || _isLoading) return;

  _isLoading = true;
  notifyListeners();
}