INNER CODE UNIT · Dart

getUserCustomJs

rignaneseleo/SlimSocial-for-Facebook · SlimSocial_for_Facebook/lib/controllers/fb_controller.dart:123

  static String? getUserCustomJs() {
    final customJs = _getOverride(SpKeys.customJs);
    if (customJs != null) debugPrint("Using custom js: $customJs");
    return customJs;
  }

  /// Returns the value stored under [spKey], but only when its companion
  /// `<spKey>_enabled` switch is on and the value is not blank.
  static String? _getOverride(String spKey) {
    if (!(sp.getBool(SpKeys.enabled(spKey)) ?? false)) return null;

    final value = sp.getString(spKey);
    if (value == null || value.isEmpty) return null;

    return value;
  }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…