Release Notes Dialog

An easy to use release notes dialog. Customizable to fit your apps design.

Installation

In your pubspec.yaml:

dependencies:
    release_notes_dialog: "^1.1.0"

In your .dart file:

import 'package:release_notes_dialog/release_notes_dialog.dart';

Basic Usage

The ReleaseNotesDialog requires a list of releases. A release needs a version number and contains a list of sublists. Sublists are used to group your changes, for example features, bug fixes, improvements, other.

Create a list of releases:

final List<Release> releases = [
  Release(
    "1.1.0",
    [
      ReleaseSublist(
        name: "Features",
        changes: [
          "Added new feature 1",
          "Added new feature 2",
        ],
      ),
      ReleaseSublist(
        name: "Fixes",
        changes: [
          "Fixed bug 1",
          "Fixed bug 2",
          "Fixed bug 3",
        ],
      ),
    ],
  ),
  Release(
    "1.0.0",
    [
      ReleaseSublist(
        name: "Release!",
      ),
    ],
  ),
];

Show the dialog:

ElevatedButton(
    onPressed: () => showDialog(
        context: context,
        builder: (BuildContext context) {
          return ReleaseNotesDialog(releases: releases);
        }),
    child: Text("Show Dialog"),
);

API

Release Notes Dialog

TypePropertyDefaultDescription
KeykeyNULLControls how one widget replaces another widget in the tree.
ListreleasesRQUIREDThe list of releases.
Stringtitle'Release Notes'The title of the dialog
StringcloseButtonString'Close'The text on the close button
Dialog:
doublewidthmediaQuery.size.width * 0.75The width of the dialog.
doubleheightmediaQuery.size.height * 0.75The height of the dialog.
ColorbackgroundColorThemeData.dialogBackgroundColorThe background color of the surface of this Dialog.
doubleelevationDialogTheme.elevationThe z-coordinate of this dialog.
ShapeBordershapeRoundedRectangleBorder with a radius of 4.0The shape of this dialog's border.
StringsemanticLabel'Release Notes'The semantic label of the dialog used by accessibility frameworks to announce screen transitions when the dialog is opened and closed.
Content:
EdgeInsetsGeometrytitlePaddingconst EdgeInsets.fromLTRB(24.0, 24.0, 24.0, 0.0)Padding around the title.
EdgeInsetsGeometrycontentPaddingconst EdgeInsets.fromLTRB(24.0, 20.0, 24.0, 0.0)Padding around the content.
doublepaddingBetweenReleases32.5Padding between releases.
doublepaddingBeneathVersionNumber12.5Padding beneath release version numbers.
doublepaddingBetweenReleaseSublists10.0Padding beneath release sublists.
doublepaddingBeneathReleaseSublistName5.0Padding beneath release sublist names.
doublepaddingBetweenChanges0.0Padding between changes.
TextStyletitleTextStyle(dialogTheme.titleTextStyle ?? theme.textTheme.headline6!).copyWith(fontWeight: FontWeight.bold)Style for the text in the title of this AlertDialog.
TextStyleversionNumberTextStyle(dialogTheme.titleTextStyle ?? theme.textTheme.headline6!).copyWith(fontWeight: FontWeight.bold)Style for the version numbers.
TextStylereleaseSublistNameTextStyle(dialogTheme.contentTextStyle ?? theme.textTheme.bodyText1!).copyWith(fontWeight: FontWeight.bold)Style for release sublist names.
TextStylechangeTextStyledialogTheme.contentTextStyle ?? theme.textTheme.bodyText1!Style for changes

Release

TypePropertyDefaultDescription
StringversionNumberREQUIREDThe version number of this release.
ListsubListsREQUIREDThe sublists of this release.

ReleaseSublist

TypePropertyDefaultDescription
Stringname'Changes'The name of this sublist.
Listchangesconst The list of changes of this sublist

Contributions

Contributions, feature requests and bug reports are welcomed!

Libraries

release_notes_dialog