You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to create a session using the Bluesky package within Flutter. The createSession() function is reported as undefined in all use cases. I have attempted to put this in main.dart to experiment as well as follow these exact steps listed here: #1793 (comment) and have gotten the same issue.
Expected Behavior
createSession is defined and able to be used with the Bluesky SDK.
Just in case anybody else ever stumbles upon this, I found a workaround. I don't think its ideal - but it does work to achieve the "Getting Started" instructions for the bluesky SDK. It works by using a combination of the atproto package creating a session and handling the repo service and the bluesky package creating the post.
Still early in my own sandbox, but it doesn't seem like the bluesky package is needed since the atproto package could create the post too.
import 'package:atproto/atproto.dart' as atp;
import 'package:bluesky/bluesky.dart' as bsky;
Future<void> _login() async {
try {
final session = await atp.createSession(
identifier: <YOUR_EMAIL_HANDLE>, password: <PASSWORD>);
final bluesky = bsky.Bluesky.fromSession(session.data);
final strongRef = await bluesky.feed
.post(text: 'This post took me 5 hours to make with Flutter.');
print('Posted: ${strongRef.data.uri}');
await bluesky.atproto.repo.deleteRecord(uri: strongRef.data.uri);
print('Deleted Record.');
} catch (e) {
print('Login failed: $e');
}
}
Bug Behavior
I am unable to create a session using the Bluesky package within Flutter. The
createSession()
function is reported as undefined in all use cases. I have attempted to put this inmain.dart
to experiment as well as follow these exact steps listed here: #1793 (comment) and have gotten the same issue.Expected Behavior
createSession
is defined and able to be used with the Bluesky SDK.Error Log
Step to Reproduce
The text was updated successfully, but these errors were encountered: