data static method

dynamic data({
  1. String? key,
})

Get the user data.

Implementation

static data({String? key}) {
  if (key != null) {
    Map<String, dynamic>? bpData = Backpack.instance.read(key);
    return (bpData?.containsKey(key) ?? false) ? bpData![key] : null;
  }
  return Backpack.instance.read(Auth.key());
}