form method
Implementation
Widget form() {
return Form(
key: _formKey,
child: Column(
children: [
TextFormField(
controller: _controller,
decoration: InputDecoration(labelText: tr(Provider.screen.name)),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0),
child: ElevatedButton(
onPressed: () async {
// It is domain like: bsky.social
String key = _controller.text.split(".")[0];
setPlugin(FlutterBluesky(provider: _controller.text, key: key));
Tuple2 res = await plugin.connect();
setState(() {
_process(res);
});
},
child: Text(tr('connect')),
),
),
],
),
);
}