sw library
Functions
-
buildServiceWorker(
{String cachePrefix = 'app-cache', String cacheVersion = '1.0.0', Map< String, Object?> resources = const <String, Object?>{}}) → String - Builds a service worker script with the given parameters.
-
filesInDirectory(
Directory directory, {Set< String> include = const <String>{'**'}, Set<String> exclude = const <String>{}}) → Map<String, File> - Get recursive map of files in a directory. The keys are the relative paths of the files, and the values are the io.File objects.
-
flutterTemplate(
) → String - Flutter template for loading a Flutter web application with a progress bar. https://docs.flutter.dev/platform-integration/web/initialization
-
md5(
File file) → Future< String> - Extract the md5 hash of a file.
-
pathToUrl(
String path) → String - Convert a file system path to a URL path.
-
removeComments(
String input) → String - Utility function for removing single-line (//...) and multi-line (/.../) comments, and eliminating empty or whitespace-only lines.