VersionCheck constructor

VersionCheck(
  1. int currentVersion, {
  2. String score = 'objd_data',
  3. List<Widget>? onDowndate,
  4. List<Widget>? onUpdate,
  5. Widget then(
    1. Score
    )?,
})

Checks whether the player updated or downdated your datapack.

constructor
int the datapacks current version
onDowndate a List of Widgets that are executed if it detects that you have downgraded
onUpdate a List of Widgets that are executed if it detects that you have upgraded
then a Function that takes in the used Score and reacts respectively returning a Widget(optional)
score change the scores name(optional)

Example:

VersionCheck(
	2,
	onDowndate: [Log('Notice: You installed an older version')],
	onUpdate: [Log('Thank your for updating the pack!')],
)

Implementation

VersionCheck(
  this.currentVersion, {
  this.score = 'objd_data',
  this.onDowndate,
  this.onUpdate,
  this.then,
});