mobile_home_page.dart 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import 'package:appflowy/startup/startup.dart';
  2. import 'package:appflowy/user/application/auth/auth_service.dart';
  3. import 'package:appflowy_backend/protobuf/flowy-folder2/workspace.pb.dart';
  4. import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart';
  5. import 'package:flutter/material.dart';
  6. class MobileHomeScreen extends StatelessWidget {
  7. const MobileHomeScreen({
  8. super.key,
  9. required this.userProfile,
  10. required this.workspaceSetting,
  11. });
  12. static const routeName = "/MobileHomeScreen";
  13. final UserProfilePB userProfile;
  14. final WorkspaceSettingPB workspaceSetting;
  15. @override
  16. Widget build(BuildContext context) {
  17. return Scaffold(
  18. appBar: AppBar(
  19. title: const Text("MobileHomeScreen"),
  20. ),
  21. // TODO(yijing): implement home page later
  22. body: Center(
  23. child: Column(
  24. children: [
  25. const Text(
  26. 'User',
  27. ),
  28. Text(
  29. userProfile.toString(),
  30. ),
  31. Text('Workspace name: ${workspaceSetting.workspace.name}'),
  32. ElevatedButton(
  33. onPressed: () async {
  34. await getIt<AuthService>().signOut();
  35. runAppFlowy();
  36. },
  37. child: const Text('Logout'),
  38. )
  39. ],
  40. ),
  41. ),
  42. );
  43. }
  44. }