Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(item-list): improve design of the main list #60

Merged
merged 20 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a029f01
WIP
vareversat Apr 20, 2023
3170604
chore(refacto): remove unnecessary parameter
vareversat Apr 24, 2023
deeb8e1
feat(time-slot): add storage capabilities for timeslots
vareversat May 8, 2023
fd856c7
feat(time-slot): add bloc
vareversat May 8, 2023
59dfd8c
feat(time-slot): add translations
vareversat May 8, 2023
e10b5c3
chore(format): run `dart format lib`
vareversat May 8, 2023
946ca64
ui(border): change the global border radius to `17`
vareversat May 8, 2023
cd13d06
feat(time-slot): add const related to time slots
vareversat May 8, 2023
b12a6e6
ui(icon): change the icon size (to large for english time)
vareversat May 8, 2023
a9f43d4
feat(time-slot): add the bloc provider
vareversat May 8, 2023
025db2c
feat(time-slot): add the info of interfering into the info dialog
vareversat May 8, 2023
436bb99
feat(time-slot): add widgets
vareversat May 8, 2023
82bf67e
feat(time-slot): forecast list now listen the TimeBloc
vareversat May 8, 2023
77033d0
feat(time-slot): add a DateTime extension
vareversat May 8, 2023
d73019e
feat(time-slot): integration of the time slot into the existing UI
vareversat May 8, 2023
adfe7ad
chore(format): use of `dart_code_metrics`
vareversat May 8, 2023
47928e2
fix(format): fix formatting uses
vareversat May 8, 2023
577bb9b
feat(time-slot): compute notification according to the selected time …
vareversat May 8, 2023
f51c2f7
feat(notifications): display a message if the notifications are disabled
vareversat May 8, 2023
baf2d9f
feat(notifications): automatic check if the notifications are enabled
vareversat May 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/flutter.analyze-test.action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Flutter analyze'
run: flutter analyze
run: flutter analyze lib
format:
name: 'Format'
runs-on: ubuntu-latest
Expand All @@ -38,6 +38,24 @@ jobs:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Flutter format'
run: dart format lib --set-exit-if-changed
code-metrics:
name: 'Code metrics'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Setup flutter action'
uses: subosito/[email protected]
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Get dependencies'
run: flutter pub get
- name: '[Global] Code metrics'
run: flutter pub run dart_code_metrics:metrics analyze --fatal-style --fatal-warnings --fatal-performance --reporter=github lib
- name: '[Unused files] Code metrics'
run: flutter pub run dart_code_metrics:metrics check-unused-files lib
- name: '[Unused code] Code metrics'
run: flutter pub run dart_code_metrics:metrics check-unused-code lib
test:
name: 'Test'
runs-on: ubuntu-latest
Expand Down
196 changes: 98 additions & 98 deletions .github/workflows/flutter.build.action.yaml
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
name: Flutter - Build
on:
workflow_call:
inputs:
flutter_version:
description: 'The Flutter used (ex: 2.5.1)'
required: true
type: string
android_output:
description: 'Android build file type output (apk or abb)'
required: true
type: string
secrets:
passphrase:
description: 'The passphrase to decrypt the configuration'
required: true
jobs:
build_android:
name: 'Android (${{ inputs.android_output }})'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/[email protected]
with:
fetch-depth: 0
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: 'Set up JAVA'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11.x'
- name: 'Setup Flutter'
uses: subosito/[email protected]
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Build Android APK'
if: ${{ inputs.android_output == 'apk' }}
# Build APK version of the app
run: flutter build apk --split-per-abi
- name: 'Save APK'
if: ${{ inputs.android_output == 'apk' }}
uses: actions/upload-artifact@v3
with:
name: 'apk-build'
path: build/app/outputs/apk/release/app-arm64-v8a-release.apk
- name: 'Generate build number'
if: ${{ inputs.android_output == 'aab' }}
# Build App Bundle version of the app
run: |
BUILD_NUMBER=$(git rev-list --all --count)
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
echo "This build is tagged as $BUILD_NUMBER on $GITHUB_REF"
- name: 'Build Android App Bundle'
if: ${{ inputs.android_output == 'aab' }}
run: flutter build appbundle --dart-define=FLAVOR=prod --build-number="$BUILD_NUMBER"
env:
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
- name: 'Save AAB'
if: ${{ inputs.android_output == 'aab' }}
uses: actions/upload-artifact@v3
with:
name: 'aab-build'
path: build/app/outputs/bundle/release/app-release.aab
build_ios:
name: 'iOS'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: '🥺'
run: echo 'WIP'
build_web:
name: 'WEB'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: '🥺'
name: Flutter - Build

on:
workflow_call:
inputs:
flutter_version:
description: 'The Flutter used (ex: 2.5.1)'
required: true
type: string
android_output:
description: 'Android build file type output (apk or abb)'
required: true
type: string
secrets:
passphrase:
description: 'The passphrase to decrypt the configuration'
required: true


jobs:
build_android:
name: 'Android (${{ inputs.android_output }})'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/[email protected]
with:
fetch-depth: 0
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: 'Set up JAVA'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11.x'
- name: 'Setup Flutter'
uses: subosito/[email protected]
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Build Android APK'
if: ${{ inputs.android_output == 'apk' }}
# Build APK version of the app
run: flutter build apk --split-per-abi
- name: 'Save APK'
if: ${{ inputs.android_output == 'apk' }}
uses: actions/upload-artifact@v3
with:
name: 'apk-build'
path: build/app/outputs/apk/release/app-arm64-v8a-release.apk
- name: 'Generate build number'
if: ${{ inputs.android_output == 'aab' }}
# Build App Bundle version of the app
run: |
BUILD_NUMBER=$(git rev-list --all --count)
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
echo "This build is tagged as $BUILD_NUMBER on $GITHUB_REF"
- name: 'Build Android App Bundle'
if: ${{ inputs.android_output == 'aab' }}
run: flutter build appbundle --build-number="$BUILD_NUMBER"
env:
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
- name: 'Save AAB'
if: ${{ inputs.android_output == 'aab' }}
uses: actions/upload-artifact@v3
with:
name: 'aab-build'
path: build/app/outputs/bundle/release/app-release.aab
build_ios:
name: 'iOS'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: '🥺'
run: echo 'WIP'
build_web:
name: 'WEB'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: '🥺'
run: echo 'WIP'
33 changes: 30 additions & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,34 @@ include: package:flutter_lints/flutter.yaml
linter:
rules:
prefer_single_quotes: true
use_build_context_synchronously: false

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
analyzer:
plugins:
- dart_code_metrics

dart_code_metrics:
metrics:
cyclomatic-complexity: 20
number-of-parameters: 5
maximum-nesting-level: 5
metrics-exclude:
- test/**
rules:
- avoid-dynamic
- avoid-passing-async-when-sync-expected
- avoid-redundant-async
- avoid-unnecessary-type-assertions
- avoid-unnecessary-type-casts
- avoid-unrelated-type-assertions
- avoid-nested-conditional-expressions:
acceptable-level: 2
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-conditional-expressions:
ignore-nested: true
- no-equal-then-else
- prefer-moving-to-variable:
allowed-duplicated-chains: 3
- prefer-match-file-name
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>


<queries>
Expand Down
2 changes: 1 addition & 1 deletion lib/app_theme.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

class AppThemes {
class AppTheme {
static final lightTheme = ThemeData.light(
useMaterial3: true,
).copyWith(
Expand Down
Loading
Loading