π Height and weight at connect
connect requires height and weight with explicit units. The SDK validates ranges and syncs unit preferences with the server.
Flutterβ
import 'package:azeoo_core/azeoo_core.dart'; // or azeoo_sdk
await AzeooSDK.connect(
token: jwt,
gender: 'male',
height: Height.scalar(180, HeightUnit.centimeters),
weight: Weight.scalar(75, WeightUnit.kilograms),
);
Supported unitsβ
Weight: kilograms, pounds, stone_pounds (encoded as stones + pounds)
Height: centimeters, meters, feet_inches
Composite valuesβ
// Stone + pounds
Weight.stonePounds(stones: 11, pounds: 5.3);
// Feet + inches
Height.feetInches(feet: 5, inches: 10.5);
Androidβ
Use AzeooHeight and AzeooWeight types from the SDK (same unit semantics as Pigeon).
AzeooSDK.shared.connectUser(
token = jwt,
gender = gender,
height = height,
weight = weight,
) { profile, error -> }
iOSβ
Pass SDK types AzeooHeight / AzeooWeight (wrappers around Pigeon messages) when calling connectUser.
React Nativeβ
Pass numeric values and unit identifiers as documented in React Native configuration β native bridge converts to Pigeon messages.
Updating after connectβ
Use the user API (not connect):
| Action | Flutter (via session / services) | Native |
|---|---|---|
| Change weight | User settings / Pigeon setWeight | sdk.user.setWeight(...) |
| Change height | Pigeon setHeight | sdk.user.setHeight(...) |
| Change gender | Pigeon setGender | sdk.user.setGender(...) |
Wire format (advanced)β
Pigeon encodes weight/height as values + unit enums. See the repo pigeons/README.md for strings like "11;5.3" for stone/pounds.