Reading Version from manifest.json in a Chrome Packaged App

Issue

I want to display my apps version number dynamically on a page, so was wondering if there is a way to read it from the manifest.json in a Chrome Packaged App written in DART language ?

Solution

import 'package:chrome/chrome_app.dart' as chrome;

void main() {
  print(chrome.runtime.getManifest()['version']);
}

Answered By – Robert

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.