58 lines
2.1 KiB
Dart
58 lines
2.1 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:sf_app_platform/payments/view/screens/phone_code_screen.dart';
|
|
|
|
class LinkPhoneScreen extends StatelessWidget{
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
TextEditingController phoneController = TextEditingController();
|
|
String? phone;
|
|
|
|
return Scaffold(
|
|
body: Container(
|
|
margin: EdgeInsets.all(30),
|
|
child: Expanded(child: Center(
|
|
child: Column(
|
|
spacing: 10,
|
|
children: [
|
|
Text("¡Nos alegra mucho tenerte por aquí!", style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold)),
|
|
Text("Para poder entrar de forma segura, te vamos a enviar un código al teléfono"),
|
|
Row(
|
|
spacing: 10,
|
|
children: [
|
|
DropdownMenu(
|
|
initialSelection: "es",
|
|
dropdownMenuEntries: List<DropdownMenuEntry>.generate(3, (int index){
|
|
return DropdownMenuEntry(
|
|
labelWidget: Icon(Icons.outlined_flag),
|
|
label: "es",
|
|
value: "es",
|
|
);
|
|
})
|
|
),
|
|
Expanded(child: TextField(
|
|
onSubmitted: (String value){phone=value;},
|
|
controller: phoneController,
|
|
decoration: InputDecoration(labelText: "Teléfono móvil", hintText: "Teléfono", border: OutlineInputBorder()),
|
|
keyboardType: TextInputType.number)
|
|
)
|
|
]
|
|
),
|
|
SizedBox(
|
|
width: double.infinity,
|
|
child: FilledButton(
|
|
onPressed: ()=>{
|
|
if (phone != null)
|
|
Navigator.push(context, MaterialPageRoute(builder: (_)=>PhoneCodeScreen(phone: phone!)))
|
|
},
|
|
child: Text("Siguiente")
|
|
)
|
|
)
|
|
]
|
|
)
|
|
))
|
|
)
|
|
);
|
|
}
|
|
} |