This sample application is powered by numbersapi.com and Flutter, a cross-platform UI toolkit by Google.
Linux | macOS | Web | Windows |
---|---|---|---|
The purpose of this project is to act as a starting point and demonstrate the ease and simplicity of using the following Yaru libraries:
- yaru: The distinct look and feel of the Ubuntu Desktop
- yaru_icons: Ubuntu Yaru icons for Flutter
- yaru_widgets: Common widgets for building desktop and web applications
The main application layout and page navigation are provided by YaruNavigationPage, which is a high-level building block for creating applications with a navigation rail and a stack of pages.
This sample aims to provide a clean starting point with a structure that scales well and is easy to maintain and test. The pages are implemented using the MVVM pattern to separate the UI from the business logic, and the REST API calls are handled by a service layer accessed via a service locator.
There are many ways to manage state in Flutter. This project uses the recommended simple state management approach together with the provider package.
Follow the instructions to install Flutter and run the following commands:
git clone https://github.com/ubuntu-flutter-community/numbers.git
cd numbers
flutter pub get
flutter run
Flutter comes with great support for testing, and this project uses various dependency injection techniques to make the code well testable.
There are various types of tests included:
- unit test (see introduction to unit testing)
- widget test (see introduction to widget testing)
- golden file test (see golden file testing)
- integration test (see introduction to integration testing)
NOTE: Remember to update the LICENSE file with the license of your choice when using this template as a starting point for your own project. |
---|
The sample code in this repository is free to use or any purpose, commercial or non-commercial, and by any means.
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>