activeSafaehSettingsSectionId function
String?
activeSafaehSettingsSectionId({
- required Iterable<
SettingSection> sections, - required Map<
String, GlobalKey< sectionKeys,State< >StatefulWidget> > - required BuildContext scrollContext,
- double activationOffset = 96,
Resolves the active Edadat section using Safaeh's scroll spy.
Implementation
String? activeSafaehSettingsSectionId({
required Iterable<SettingSection> sections,
required Map<String, GlobalKey> sectionKeys,
required BuildContext scrollContext,
double activationOffset = 96,
}) {
final targets = <(String, GlobalKey)>[];
for (final section in sections) {
final key = sectionKeys[section.key];
if (key != null) targets.add((section.key, key));
}
return safaeh.safaehActivePageSectionId(
sections: targets,
scrollContext: scrollContext,
activationOffset: activationOffset,
);
}