setLoading method

dynamic setLoading(
  1. bool value, {
  2. String name = 'default',
  3. bool resetState = true,
})

Set the value of a loading key by padding a true or false

Implementation

setLoading(bool value, {String name = 'default', bool resetState = true}) {
  if (resetState) {
    setState(() {
      _loadingMap[name] = value;
    });
  } else {
    _loadingMap[name] = value;
  }
}