You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
samples/compass_app/app/testing/models/user.dart

15 lines
322 B

[Compass App] User name and profile picture (#2435) This PR completes the home screen, adding the username and the profile picture. ![Screenshot from 2024-09-11 14-52-32](https://github.com/user-attachments/assets/197f9932-ae86-4277-92ac-8fd413b52010) ![Screenshot from 2024-09-11 14-52-23](https://github.com/user-attachments/assets/915b8c54-ac85-40d9-adb8-3bf0521b78f5) This feature follows the basic structure: - Added repository, both local and remote. - Added API call + API model. - Added Domain model (reduced version only containing name and profile picture). - Modified the ViewModel to obtain the user and expose it to the Widget. - Updated Widget to display the username and profile picture. - Added `/user` endpoint to server project. - Updated widget tests, as well as integration tests. The Compass App is basically completed with it. Maybe the next step is to merge it to the `main` branch? And then we can do a full review, remove TODOs and setup CI jobs. ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I read the [Contributors Guide]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. <!-- Links --> [Flutter Style Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md
2 months ago
import 'package:compass_app/data/services/api/model/user/user_api_model.dart';
import 'package:compass_app/domain/models/user/user.dart';
const userApiModel = UserApiModel(
id: 'ID',
name: 'NAME',
email: 'EMAIL',
picture: 'assets/user.jpg',
);
const user = User(
name: 'NAME',
picture: 'assets/user.jpg',
);