# changelogDialog function

dynamic changelogDialog(

1. dynamic prefs,
2. dynamic currentVersion,
3. dynamic body

)

Info Dialog @param prefs: SharedPreferences @param currentVersion: String

## Implementation

    changelogDialog(prefs, currentVersion, body) {
      plausible.event(page: 'changelog');

      // Get root context by Key
      final context = GlobalVariable.infobox.currentContext!;

      showDialog(
        context: context,
        builder: (context) {
          return ContentDialog(
            constraints: const BoxConstraints(maxHeight: 500.0, maxWidth: 500.0),
            title: Text('🚀 ${'changelog-text'.i18n()} $currentVersion'),
            content: Markdown(
              onTapLink: (text, href, title) {
                if (href == null) return;
                launchUrlString(href);
              },
              shrinkWrap: true,
              data: body,
              extensionSet: md.ExtensionSet(
                md.ExtensionSet.gitHubFlavored.blockSyntaxes,
                [
                  md.EmojiSyntax(),
                  ...md.ExtensionSet.gitHubFlavored.inlineSyntaxes
                ],
              ),
            ),
            actions: [
              Button(
                  style: ButtonStyle(
                    backgroundColor: ButtonState.all(Colors.blue),
                    foregroundColor: ButtonState.all(Colors.white),
                  ),
                  onPressed: () {
                    Navigator.pop(context);
                  },
                  child: Text('ok-text'.i18n())),
            ],
          );
        },
      );
    }