completed velocity integration

This commit is contained in:
2026-05-27 19:01:24 +02:00
parent fec46fb6e9
commit 6fdd3183fb
29 changed files with 2760 additions and 2293 deletions

View File

@@ -85,12 +85,13 @@ class _PhoneScreenState extends State<PhoneScreen> {
key: _formKey,
child: Center(
child: LayoutBuilder(
builder: (context, constraints) {
final maxWidth = constraints.maxWidth > ResponsivePolicy.md
? ResponsivePolicy.md.toDouble()
: constraints.maxWidth;
return SizedBox(
width: maxWidth,
builder: (context, constraints) {
final maxWidth =
constraints.maxWidth > ResponsivePolicy.md
? ResponsivePolicy.md.toDouble()
: constraints.maxWidth;
return SizedBox(
width: maxWidth,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@@ -101,10 +102,7 @@ class _PhoneScreenState extends State<PhoneScreen> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color: Theme
.of(context)
.colorScheme
.primary,
color: Theme.of(context).colorScheme.primary,
),
textAlign: TextAlign.center,
),
@@ -119,7 +117,9 @@ class _PhoneScreenState extends State<PhoneScreen> {
_buildPhoneField(),
SizedBox(height: 30),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 25),
padding: const EdgeInsets.symmetric(
horizontal: 25,
),
child: Skeletonizer(
enabled: phoneController.model.isLoading,
child: Row(
@@ -127,18 +127,25 @@ class _PhoneScreenState extends State<PhoneScreen> {
Expanded(
child: ElevatedButton(
onPressed: () async {
if (_formKey.currentState!.validate()) {
if (_formKey.currentState!
.validate()) {
String fullPhoneNumber =
selectedCountryCode + _phoneController.text;
_phoneController.text;
phoneController.updatePhone(fullPhoneNumber);
phoneController.updatePhone(
fullPhoneNumber,
);
await phoneController.register();
if(phoneController.model.status != 'failed') {
if (phoneController.model.status !=
'failed') {
context.go('/onboarding/verify');
}
}
},
child: Text('Send Code', style: TextStyle(fontSize: 16)),
child: Text(
'Send Code',
style: TextStyle(fontSize: 16),
),
),
),
SizedBox(width: 16),
@@ -162,19 +169,22 @@ class _PhoneScreenState extends State<PhoneScreen> {
onPressed: () {
context.go('/');
},
child: Text('Continue as guest?', style: TextStyle(fontSize: 14)),
child: Text(
'Continue as guest?',
style: TextStyle(fontSize: 14),
),
),
],
),
);
}
},
),
),
),
),
),
);
}
},
);
}
@@ -201,8 +211,7 @@ class _PhoneScreenState extends State<PhoneScreen> {
isExpanded: true,
icon: const Icon(Icons.arrow_drop_down),
padding: const EdgeInsets.symmetric(horizontal: 8),
items:
countryCodes.map((country) {
items: countryCodes.map((country) {
return DropdownMenuItem<String>(
value: country['code'],
child: Row(
@@ -272,5 +281,4 @@ class _PhoneScreenState extends State<PhoneScreen> {
],
);
}
}