byte_size 1.3.4 byte_size: ^1.3.4 copied to clipboard
ByteSize is a library that handles how byte sizes are represented and an easy to use interface to convert to other forms of representation also taking locale into consideration.
ByteSize #
ByteSize
is a library written in Dart language that handles how byte sizes are represented and an easy to use interface to convert to other forms of representation also taking locale into consideration.
Usage #
A simple usage example:
import 'package:byte_size/byte_size.dart';
import 'package:locales/locales.dart';
void main() {
var size = ByteSize.FromKiloBytes(10000);
print(size.ToString('MB', 1, Locale.fr_CA)); // 9,8 MB
}
License #
Copyright (c) 2020 Mbadiwe Nnaemeka Ronald ron2tele@gmail.com
This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation must be
specified.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Tip Jar
- 💵 Bitcoin:
1Mcci95WffSJnV6PsYG7KD1af1gDfUvLe6
Conclusion #
Special thanks to Xor-el for making this library available in the first place.