Skip to content
Snippets Groups Projects
Commit fe6c35c4 authored by Ute Trapp's avatar Ute Trapp
Browse files
parents
No related branches found
No related tags found
No related merge requests found
Showing
with 847 additions and 0 deletions
.obsidian/
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
app/untranslated_messages.json
app/tests.json
# Before you change anything in this file get an idea what it does and read
# - https://about.gitlab.com/blog/2020/12/10/basics-of-gitlab-ci-updated/
# - artifacts https://docs.gitlab.com/ee/ci/jobs/job_artifacts.html
stages:
- docker-image
- build
- test
- publish
# Jobs
# build docker image for all other jobs -- do not change anything here
# see https://docs.gitlab.com/ee/ci/docker/using_kaniko.html
# if you do not need mkdocs consider using one of the the following images
# registry.gitlab.com/famedly/containers/flutter-dockerimages:stable
# cirrusci/flutter
docker-image:
stage: docker-image
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo update container image ${CI_REGISTRY_IMAGE}/project_builder:latest
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}/project_builder:latest"
rules:
- changes:
- Dockerfile
build-web-app:
stage: build
image:
name: ${CI_REGISTRY_IMAGE}/project_builder:latest
before_script:
- cd app
- flutter clean
- flutter doctor
- flutter upgrade --force
- flutter config --enable-web
- flutter pub get
script:
- flutter build web --base-href /learning-flutter/app/
rules:
- if: $CI_COMMIT_BRANCH == "main"
artifacts:
paths:
- app/build/web
build-apk:
stage: build
image:
name: ${CI_REGISTRY_IMAGE}/project_builder:latest
before_script:
- cd app
- flutter clean
- flutter doctor
- flutter upgrade --force
- flutter pub get
script:
- flutter build apk --release
rules:
- if: $CI_COMMIT_BRANCH == "main"
changes:
- app/**/*
allow_failure: true
artifacts:
paths:
- app/build/app/outputs/flutter-apk/app-release.apk
# build-ios: access requested, could not be tested!, as it is suggested by docs
# stage: build
#tags:
# - saas-macos-medium-m1
# image: macos-12-xcode-14 # check available images in settings ci
# before_script:
# - cd app
# - flutter pub get
# script:
#- flutter build ios --no-codesign
#- fastlane build
build-mkdocs:
stage: build
image:
name: ${CI_REGISTRY_IMAGE}/project_builder:latest
before_script:
- mkdocs --version
script:
- mkdocs build --strict --verbose
rules:
- if: $CI_COMMIT_BRANCH == "main"
artifacts:
paths:
- public/docs
# see https://pub.dev/packages/flutter_analyze_reporter/example
code-quality:
stage: test
image:
name: ${CI_REGISTRY_IMAGE}/project_builder:latest
before_script:
- cd app
- export PATH="$PATH":"$HOME/.pub-cache/bin"
script:
- flutter pub get
- flutter analyze
- dart pub global activate flutter_analyze_reporter
- flutter_analyze_reporter --output report.json --reporter gitlab
rules:
- changes:
- app/**/*
allow_failure: true
artifacts:
reports:
codequality: app/report.json
riverpod:
stage: test
image:
name: ${CI_REGISTRY_IMAGE}/project_builder:latest
before_script:
- cd app
script:
- flutter pub get
- dart run custom_lint
rules:
- if: $CI_COMMIT_BRANCH == "main"
changes:
- app/**/*
allow_failure: true
# see https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Flutter.gitlab-ci.yml
# not active at the moment, no tests implemented in final version
# see example in https://gitlab.com/utrapp/learning-flutter/-/blob/v0.0.3/app/test/widget_test.dart
# tests:
# stage: test
# image:
# name: ${CI_REGISTRY_IMAGE}/project_builder:latest
# before_script:
# - cd app
# - flutter pub global activate junitreport
# - export PATH="$PATH":"$HOME/.pub-cache/bin"
# script:
# - flutter pub get
# - flutter test --machine | tojunit -o report.xml
# artifacts:
# reports:
# junit: app/report.xml
# rules:
# - if: $CI_COMMIT_BRANCH == "main"
# changes:
# - app/**/*
# allow_failure: true
pages:
stage: publish
script:
# copy the web-app to public only if it exists, i.e. app/build/web/index.html exists (test: https://linuxhandbook.com/bash-test-command/)
- test -f app/build/web/index.html && cp -r -v app/build/web public/app || true
needs:
- job: build-mkdocs
- job: build-web-app
rules:
- if: $CI_COMMIT_BRANCH == "main"
artifacts:
paths:
- public
### Summary
<!-- Summarize the bug encountered concisely. -->
### Steps to reproduce
<!-- Describe how one can reproduce the issue - this is very important. Please use an ordered list. -->
### What is the current _bug_ behavior?
<!-- Describe what actually happens. -->
### What is the expected _correct_ behavior?
<!-- Describe what you should see instead. -->
### Relevant logs and/or screenshots
<!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code
as it's tough to read otherwise. -->
### Possible fixes
<!-- If you can, link to the line of code that might be responsible for the problem. -->
## :rocket: Description
### Problem to solve
<!-- What problem do we solve? Try to define the who/what/why of the opportunity as a user story. For example, "As a (who), I want (what), so I can (why/value)." -->
### Proposal
<!-- How are we going to solve the problem? Try to include the user journey! https://about.gitlab.com/handbook/journeys/#user-journey -->
### Further details
<!-- Include use cases, benefits, goals, or any other details that will help us understand the problem better. -->
## :art: Wireframe
## :link: Links
## :white_check_mark: Acceptance Criteria
- [ ]
## Summary
<!--
Please briefly describe what part of the code base needs to be refactored.
-->
## Improvements
<!--
Explain the benefits of refactoring this code.
See also https://about.gitlab.com/handbook/values/index.html#say-why-not-just-what
-->
## Risks
<!--
Please list features that can break because of this refactoring and how you intend to solve that.
-->
## Involved components
<!--
List files or directories that will be changed by the refactoring.
-->
## Links
## What does this MR do and why?
<!--
Describe in detail what your merge request does and why.
-->
%{first_multiline_commit}
## MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, maintainability and ux.
- [ ] You have self-reviewed this MR.
- [ ] For the code that this change impacts, you believe that everything is well implemented.
- [ ] The analysis shows no problems.
- [ ] You have updated the docs.
- [ ] You have discussed your code with another team member.
- [ ] You have tested this MR on addressed platforms and real devices available.
- [ ] You have merged the main (run `git merge main` on your branch) branch.
Thanks for your MR, you're awesome! :+1:
{
"spellright.language": ["en"],
"spellright.documentTypes": ["markdown", "latex", "plaintext"]
}
FROM ubuntu:latest
#points to the latest LTS version
##########################
# ENV -- define relevant versions
##########################
# latest versions check at https://developer.android.com/studio#command-tools
ENV ANDROID_TOOLS_VERSION "9477386"
# latest version see https://docs.flutter.dev/release/archive?tab=linux
ENV FLUTTER_VERSION="3.10.5"
# update all packages
RUN apt-get update -y && \
apt-get upgrade -y
# core utils needed by flutter AND android part
RUN apt-get update && apt-get install -y \
bash \
curl \
unzip \
wget \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
####################
# Android
####################
# install the jdk, check which version is supported by android https://developer.android.com/studio/releases#jdk-17
RUN apt-get update && apt-get install -y \
openjdk-17-jdk \
&& rm -rf /var/lib/apt/lists/*
ENV ANDROID_BASE_FOLDER "/opt/android"
RUN mkdir -p ${ANDROID_BASE_FOLDER}
WORKDIR ${ANDROID_BASE_FOLDER}
RUN wget -O tools.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_TOOLS_VERSION}_latest.zip && \
unzip ./tools.zip && rm ./tools.zip && \
chmod a+x -R ${ANDROID_BASE_FOLDER}/cmdline-tools/bin
ENV PATH $PATH:${ANDROID_BASE_FOLDER}/cmdline-tools/bin
ENV ANDROID_SDK_ROOT "${ANDROID_BASE_FOLDER}/sdk"
# accept all licenses with echo y and install the android sdk
RUN echo y | sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --install "cmdline-tools;latest"
####################
# FLUTTER
####################
# flutter part based on https://docs.flutter.dev/get-started/install/linux
RUN apt-get update && apt-get install -y \
file \
git \
libglu1-mesa \
&& rm -rf /var/lib/apt/lists/*
ENV FLUTTER_SDK_ROOT "/opt/flutter"
RUN mkdir -p ${FLUTTER_SDK_ROOT}
RUN git clone https://github.com/flutter/flutter.git ${FLUTTER_SDK_ROOT}
ENV PATH="${FLUTTER_SDK_ROOT}/bin:${FLUTTER_SDK_ROOT}/bin/cache/dart-sdk/bin:${PATH}"
RUN flutter precache
RUN flutter doctor
RUN flutter upgrade
RUN flutter --version
####################
# MKDocs
####################
ENV MKDOCS_PROJECT_FOLDER "/home/mk-docs"
RUN mkdir -p ${MKDOCS_PROJECT_FOLDER}
WORKDIR ${MKDOCS_PROJECT_FOLDER}
COPY requirements.txt ${MKDOCS_PROJECT_FOLDER}
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
LICENSE 0 → 100644
MIT License
Copyright (c) 2023 Ute Trapp
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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 OR COPYRIGHT HOLDERS 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.
README.md 0 → 100644
# Learning Flutter
![Build Status](https://gitlab.com/utrapp/learning-flutter/badges/main/pipeline.svg)
This repo contains a base project, that
- contains a flutter base project using riverpod and go_router
- is described by videos in the youtube playlists
- in German:[Flutter-Tutorial (deutsch) mit Riverpod und GoRouter](https://www.youtube.com/playlist?list=PLosiZFS_rnz4QLGoivxmL8thtp9la79eW)
- in English: [Flutter tutorial with Riverpod and GoRouter](https://www.youtube.com/playlist?list=PLosiZFS_rnz6GE9SJPoVrmHB3wndU6K_Q)
- shows the publication with gitlab ci and gitlab pages of
- [documentation](https://utrapp.gitlab.io/learning-flutter/docs/) written in md-files as supported by [obsidian](https://obsidian.md/) and realized using [mkdocs](https://www.mkdocs.org/)
- the running flutter app as a [web app](https://utrapp.gitlab.io/learning-flutter/app/)
- shows ci of a flutter app
- building the android APK-file (unsigned)
- building the web app
- analyzing the code
- running widget tests
- contains templates for new issues, bugs and merge requests
The repository is given to the students of the module [Human Computer Interaction](https://obs.fbi.h-da.de/mhb/modul.php?nr=30.7328&sem=20212) at the University of Applied Sciences Darmstadt.
However, most of the corresponding material is publicly available under [HCI-Trapp-Lab-Exercises](https://hci-trapp.h-da.io/hci-lab-exercises/) and you may do the course on your own.
## Pages
- [check your docs](https://utrapp.gitlab.io/learning-flutter/docs/)
- [check the app](https://utrapp.gitlab.io/learning-flutter/app/)
## Getting started
- work on the dev branch (no pipeline) for untested small commits, ...
- work on the main branch to publish your work (full pipeline)
- adapt the following files to your needs and to your repository
- namespace android app (search&replace in all files ...trapp... with your URL)
- HREF in web build in gitlab ci l 44 adapt to your project
- links
- replace https://utrapp.gitlab.io/learning-flutter/ by your pages (go to settings, ...)
- replace https://utrapp.gitlab.io/learning-flutter/ by your project URL
- start coding in the folder src
- start filling the pages in the folder docs
- replace default namespace com.example. with your namespace (android, ...), e.g.
- use riverpod generate to automatically update generated files on changes
```
flutter pub run build_runner watch -d
```
- code quality: go to cid/cd --> pipelines --> click a pipeline --> code quality, see [gitlab code quality](https://docs.gitlab.com/ee/ci/testing/code_quality.html)
## Building/starting docker container locally
- in windows cmd shell use `%cd%/app/` for the current path, in linux shell use `$(pwd)/app/` instead and within a powershell use `${pwd}/app/`
- `docker build -f ./Dockerfile -t "flutter_project_builder" .` builds the docker image locally
- `docker run -it -v %cd%/app/:/home/app/ flutter_project_builder bash` runs the docker image and mounts the app folder for further testing of building the app, e.g. go to the folder /home/app and run `flutter build apk`
## Video tutorials
I recorded two video tutorials explaining this repository and how to learn flutter, how to use Riverpod and GoRouter. First I recorded the German version, so this is a bit more elaborative and shows more the development, the different steps of the repository. While the English version is a bit more condensed and focuses on the overall picture, mapping concepts to code.
<table>
<tbody>
<tr>
<th>English</th>
<th>German</th>
</tr>
<tr>
<td><a href="https://www.youtube.com/playlist?list=PLosiZFS_rnz6GE9SJPoVrmHB3wndU6K_Q">playlist</a></td> <td><a href="https://www.youtube.com/playlist?list=PLosiZFS_rnz4QLGoivxmL8thtp9la79eW">Wiedergabeliste</a></td>
</tr>
<tr>
<td><a href="https://www.youtube.com/watch?v=XoBddlNX1_E&list=PLosiZFS_rnz6GE9SJPoVrmHB3wndU6K_Q&index=1&pp=gAQBiAQB">Intro</a></td>
<td><a href="https://www.youtube.com/watch?v=tA6sKYexoQM">Einführung</a></td>
</tr>
<tr>
<td><a href="https://www.youtube.com/watch?v=FsIjhEAeZDs">Material to learn the basics</a></td>
<td><ul><li><a href="https://www.youtube.com/watch?v=rJQIER25YI0">Dart: Grundlagen und Besonderheiten</a></li><li><a href="https://www.youtube.com/watch?v=xUiZKa1kTdw">GUI: Grundlagen und Besonderheiten</a></li></td>
</tr>
<tr>
<td><a href="https://www.youtube.com/watch?v=KzvyjQcRUZs">gitlab pages with CI and mkdocs</a></td>
<td><a href="https://www.youtube.com/watch?v=CX94bzfqTOo">gitlab pages, accessibility tests in ci, mkdocs</a></td>
</tr>
<tr>
<td><a href="https://www.youtube.com/watch?v=k0ZnGjzpBwo">Logging, Accessibility, Responsive Design and other typical problems</a></td>
<td><ul><li><a href="https://www.youtube.com/watch?v=8_WBlYk_3nY">Typische Probleme und Lösungen</a></li><li><a href="https://www.youtube.com/watch?v=J8MtGYcvoX8">Übung zur Anwendung der bisherigen Inhalte und Vorbereitung von Riverpod</a></li></ul></td>
</tr>
<tr>
<td><a href="https://www.youtube.com/watch?v=gmUdwu32K2g">State Management and Architecture</a></td>
<td><ul><li><a href="https://www.youtube.com/watch?v=RZrLMU1Op08">warum Riverpod</a></li>
<li><a href="https://www.youtube.com/watch?v=U18Y5LVEkJg">Grundlagen Riverpod (Theorie)</a></li></ul></td>
</tr>
<tr>
<td><a href="https://www.youtube.com/watch?v=c2fv3oua2GU">Counter with Riverpod, state, controller, generator</a></td>
<td><a href="https://www.youtube.com/watch?v=D_NIYnP1kaw">Counter-App mit Riverpod-Generator und gitlab Workflow</a></td>
</tr>
<tr>
<td><ul><li><a href="https://www.youtube.com/watch?v=lIBxLrtz7nc">fetch data from a REST-API using Riverpod, show it to the user, implement pull to refresh</a></li><li><a href="https://www.youtube.com/watch?v=iYnXjVmN4UQ">update, create and delete data with riverpod generator and dio</a></li></ul></td>
<td><ul><li><a href="https://www.youtube.com/watch?v=gsQ-eQQLkBg">Verzeichnisstruktur, Lokalisierung, Merge-Requests</a></li><li><a href="https://www.youtube.com/watch?v=jLYjr5DMfg0">Vorbereitung zur Anbindung von REST</a></li><li><a href="https://www.youtube.com/watch?v=P5Kn8qZcvls">Nutzung eines API-Generators und Implementation Repository</a></li><li><a href="https://www.youtube.com/watch?v=9FMKkaynaXk">Form-Widgets, Controller, ListView, Intenet-Permission, "alles verdrahten"</a></li></ul></td>
</tr>
<tr>
<td><a href="https://www.youtube.com/watch?v=9c5A-iaiLqI"> Responsive Navigation with GoRouter, ShellRoutes</a></td>
<td><a href="https://www.youtube.com/watch?v=m--Ayq140JI">Responsive Navigation mit GoRouter, ShellRoute</a></td>
</tr>
<tr>
<td><a href="https://www.youtube.com/watch?v=zAWCOgjSkU4">Widget Tests, accessibility tests, start your own app</a></td>
<td><a href="https://www.youtube.com/watch?v=rgQQKBaHEA8">Wie Sie weiter machen können</a></td>
</tr>
</tbody>
</table>
## Tags
With the following tags you might follow the development of the repository.
- [initial project with mkdocs, ci and counter app as generated by project template](https://gitlab.com/utrapp/learning-flutter/-/tags/v0.0.1)
- [with safe area and de/en und automatic accessibility test, own primary color, include tests in ci](https://gitlab.com/utrapp/learning-flutter/-/tags/v0.0.2)
- [with riverpod generator, folder structure and localization helper methods](https://gitlab.com/utrapp/learning-flutter/-/tags/v0.0.3)
- [CRUD](https://gitlab.com/utrapp/learning-flutter/-/tags/v0.0.4)
- [fixes, refactoring, docs](https://gitlab.com/utrapp/learning-flutter/-/tags/v1.0.0)
## Naming convention
- files and folders in English and only with the following chars `[a-zAZ0-9_-]`
- commit comments -- see. https://www.conventionalcommits.org/en/v1.0.0/
- branches
- structure: feat/fix/docs/style/refactor/learn/orga/test / #issue Titel
- example _feat-49-adds-new-endpoints-to-fast-api_
- merge request
- structure #Issue title
- example _#49 adds new endpoints to FastAPI_
- additional sources
- [GitLab Code Review Guidelines](https://docs.gitlab.com/ee/development/code_review.html)
- [11 Ways to Create Pull Requests that are Easy to Review](https://www.pullrequest.com/blog/11-ways-to-create-pull-requests-that-are-easy-to-review/)
## Contribute
Create an issue, write me an email any hints for improvement or feedback are welcome :smile:
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
version:
revision: 796c8ef79279f9c774545b3771238c3098dbefab
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
- platform: android
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
{
"spellright.language": ["de", "en"],
"spellright.documentTypes": ["markdown", "latex", "plaintext"]
}
riverpod
freezed
equatable
figma
# HCI/Flutter Demo Project
A Flutter demo project with basic architecture.
## Architecture und Libs
This project uses
- [flutter_riverpod](https://pub.dev/packages/flutter_riverpod) for state management including [annotation]() and [generator]()
- [go_router](https://pub.dev/packages/go_router) for navigation
- [freezed](https://pub.dev/packages/freezed), [freezed_annotation](https://pub.dev/packages/freezed_annotation) and [equatable](https://pub.dev/packages/equatable) to write less code
## navigation and layout
For the purpose of demonstration the app
- uses bottom navigation or navigation rail depending on the screen
- navigates to a separate screen for the details view
- shows the edit form responsive: either side by side or below
## Additional recommended libs
- [animations](https://pub.dev/packages/animations): This package contains pre-canned animations for commonly-desired effects.
- [rive](https://help.rive.app/getting-started/introduction): Animation editor and good integration into flutter
- [flutter_native_splash](https://pub.dev/packages/flutter_native_splash): customized splash screen
- [intro_slider](https://pub.dev/packages/intro_slider): Typical onboarding for first start of an app.
- [shimmer](https://pub.dev/packages/shimmer/example): show loading placeholders
Be careful with your libraries, check the following
- [tutorial_coach_mark](https://pub.dev/packages/tutorial_coach_mark): Tap for help, on demand tutorial.
- [widget_book](https://www.widgetbook.io/) - organize reusable widgets and good
integration into figma
- [feedback](https://pub.dev/packages/feedback): easy way to get feedback from your users
- [curated list of libs](https://fluttergems.dev/)
Whenever you address a task or problem, search in pub.dev, if someone solved it already. To choose a good lib, consider the following questions
- platform web AND your mobile platform supported?
- more than one developer?
- updated recently?
- as less dependencies as possible?
## naming conventions
- ## arb-files
- https://dart.dev/effective-dart/style
## APIs
Focus on the frontend and use tools for the backend. Be inspired by available APIs ...
- [administration digital](https://bund.dev/apis)
- [Air Quality API](https://developers.google.com/maps/documentation/air-quality)
- [Google Sheets per API](https://developers.google.com/sheets/api/samples?hl=de) und [Build a CRUD API using the Google Sheets API](https://blog.logrocket.com/build-crud-api-using-google-sheets-api/)
- [Big List of Free and Open Public APIs (No Auth Needed)](https://mixedanalytics.com/blog/list-actually-free-open-no-auth-needed-apis/)
- [Fake Store API](https://fakestoreapi.com/)
- https://quotes.rest/
- [OpenFoodFacts description](https://projects.fbi.h-da.de/~s.zander/nzse/praktikum/html/openfoodfacts_api_infos/)
- [https://www.freecodecamp.org/news/public-apis-for-developers/]
- simple table, access it with post/put/get/delete: https://retool.com/api-generator/ or https://www.rowy.io/
- https://supabase.com/ -- open source alternative for firebase and based on PostgreSQL
## open issues
- web build requires manual removing HREF-line in index.html
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
# include: package:flutter_lints/flutter.yaml
include: package:very_good_analysis/analysis_options.yaml
analyzer:
exclude:
- "**.g.dart"
- "**.freezed.dart"
errors:
invalid_annotation_target: ignore
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# a must for libs, but within a small app it is ok to leave it to the end
# and document important stuff only
public_member_api_docs: false
# I prefere relative imports within the app
always_use_package_imports: false
# things that belong together are easyer to find
sort_pub_dependencies: false
# if you learn a new framework, I think it is better to use and see the types
omit_local_variable_types: false
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "com.example.ri_go_demo"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.ri_go_demo"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="ri_go_demo"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment