Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smartlook/smartlook_flutter_interview_test_task
https://github.com/smartlook/smartlook_flutter_interview_test_task
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/smartlook/smartlook_flutter_interview_test_task
- Owner: smartlook
- License: mit
- Created: 2021-12-15T11:19:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-04T00:57:33.000Z (almost 3 years ago)
- Last Synced: 2024-11-03T18:34:26.188Z (3 months ago)
- Language: Dart
- Size: 15.4 MB
- Stars: 3
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flutter interview – test task
## Element tree
The Flutter framework is rendering all application views directly to the GL layer, so it's hard to extract the application's elements tree directly.
Smartlook SDK heavily relies on the view tree "knowledge" so your "job" in this interview task is to obtain the view tree on Flutter.
## The solution
- Clone the project at https://github.com/smartlook/smartlook_flutter_interview_test_task
- In the file `movie_streaming_app/lib/main.dart` there is a method [_startServer()](https://github.com/smartlook/smartlook_flutter_interview_test_task/blob/936542713899508573c344ff3ce7136d08666d86/movie_streaming_app/lib/main.dart#L42) with a simple embedded `HTTP` server running on port `9000` and a mocked request handler returning a sample `JSON`
- Your task is to write a function that gets the elements tree of the currently rendered screen from Flutter and return it as `JSON` instead of the mocked one.## Format
Each item of the list should correspond to one element currently visible on the screen and should contain these properties:
- `top` – the top coordinate of the element on the screen
- `left` – the left coordinate of the element on the screen
- `width` – the width of the element
- `height` – the height of the element
- `color` – color of the element, this should be for example, background color of plain view or text color of a text element## Credits
The testing app is `movie_streaming_app` from the [awesome-flutter-ui](https://github.com/Chromicle/awesome-flutter-ui) project released under a MIT license.