Skip to content

Commit

Permalink
Merge pull request #104 from xmtp/fix_issues_v1
Browse files Browse the repository at this point in the history
Tidy Flutter Code
  • Loading branch information
humanagent authored Dec 19, 2023
2 parents 29d14d9 + ee46db7 commit 569864d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 63 deletions.
Binary file removed .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ doc/api/
*.js_
*.js.deps
*.js.map

**/.DS_Store
.DS_Store
5 changes: 0 additions & 5 deletions example/lib/pages/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ class LoginPage extends HookWidget {
@override
Widget build(BuildContext context) {
useListenable(wallet);
session.addListener(() {
if (session.initialized) {
context.goNamed('home');
}
});
return Scaffold(
body: Container(
padding: const EdgeInsets.all(16),
Expand Down
7 changes: 4 additions & 3 deletions example/lib/session/foreground_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,13 @@ class ForegroundSession extends ChangeNotifier {
var prefs = await SharedPreferences.getInstance();
var api = createApi();
var client = await xmtp.Client.createFromWallet(api, wallet);
await prefs.setString("xmtp.keys", client.keys.writeToJson());
await XmtpIsolate.spawn(client.keys);

me = client.keys.wallet; // Update the wallet address
initialized = true; // Update the session state

await prefs.setString("xmtp.keys", client.keys.writeToJson());
await XmtpIsolate.spawn(client.keys);
notifyListeners();

return true;
} catch (err) {
return false;
Expand Down
25 changes: 0 additions & 25 deletions example/test/test_from_key.dart

This file was deleted.

30 changes: 0 additions & 30 deletions example/test/widget_test.dart

This file was deleted.

0 comments on commit 569864d

Please sign in to comment.