flutter_measure_formatter 0.1.0 copy "flutter_measure_formatter: ^0.1.0" to clipboard
flutter_measure_formatter: ^0.1.0 copied to clipboard

Plugin to format and convert measure units. This plugin is supported on iOS, Android & Web.

flutter_measure_formatter #

Provides a way to format length measurements in a human readable way. Based on currently selected region and scale.

Usage #

There are two main methods: convertLength and formatLength.

convertLength() #

Returns string with value and unit based on current region and potentially value scale. For example 5000 metres becomes 3.11mi.

formatLength() #

Returns string with value and unit. For example 500 kilometres becomes 500km

  _formattingResult =
          await FlutterMeasureFormatter().formatLength(_selectedUnit, 500);
      _conversionResult =
          await FlutterMeasureFormatter().convertLength(_selectedUnit, 500);

Unit Definition #

Available units are defined in FlutterMeasureFormatterUnit.

Limitations #

  • Android scaling is very limited and hardcoded for now.
  • There is no web implementation, looking for viable solutions.
1
likes
110
pub points
0%
popularity

Publisher

verified publisherrdev.software

Plugin to format and convert measure units. This plugin is supported on iOS, Android & Web.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_web_plugins, js, meta, plugin_platform_interface

More

Packages that depend on flutter_measure_formatter