This package is part of the SurfGear toolkit made by Surf.
A library with set of common classes and utilities used in different modules.
- Bitmask - A generic implementation of the Bitmask type.
- Enum - Java-like enum.
- DisableOverscroll - Prevent glowing when scrolling over the edge.
Add surf_util
to your pubspec.yaml
file:
dependencies:
surf_util: $currentVersion$
At this moment, the current version of surf_util
is .
DisableOverscroll(
child: ListView(
...
),
),
class ExampleBitmask extends Bitmask {
const ExampleBitmask zeroBit = ExampleBitmask._(1);
const ExampleBitmask firstBit = ExampleBitmask._(2);
const ExampleBitmask._(int value) : super(value);
static List<ExampleBitmask> getList() {
return [zeroBit, firstBit];
}
}
final listBitmask = ExampleBitmask.getList();
final mask = Bitmask.getMask(listBitmask);
bool isOn = Bitmask.isOn(listBitmask.first);
class TransactionType extends Enum<String> {
const TransactionType(String val) : super(val);
static const TransactionType IN = TransactionType('in');
static const TransactionType OUT = TransactionType('out');
static TransactionType byValue(String value) {
switch (value) {
case 'in':
return IN;
case 'out':
return OUT;
default:
return OUT;
}
}
}
All notable changes to this project will be documented in this file.
To report your issues, submit them directly in the Issues section.
If you would like to contribute to the package (e.g. by improving the documentation, fixing a bug or adding a cool new feature), please read our contribution guide first and send us your pull request.
Your PRs are always welcome.
Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.