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

[Mobile App] Update to flutter 3.22.3 and packages #964

Merged
merged 13 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
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
2 changes: 1 addition & 1 deletion recipients_app/.tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
flutter 3.19.6
flutter 3.22.3
12 changes: 4 additions & 8 deletions recipients_app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Mobile App for Recipients of a Social Income.
## Tools needed for building the app on an Apple Silicon Mac

- [Homebrew](https://brew.sh/de/)
- Flutter 3.19.6, Dart 3.3.4
- Flutter (Version see file .tool-versions)
- Java JDK 17
- Android Studio LadyBug or later
- Latest vsCode
Expand Down Expand Up @@ -39,9 +39,9 @@ Mobile App for Recipients of a Social Income.
- Restart your terminal so that these changes take effect
- Install Flutter
- Tell Flutter to use our Java 17 JDK and not the one bundle with
Android Studio via `flutter config --jdk-dir $JAVA_HOME`. Otherwise,
you will get the error "Unsupported class file major version 65”
when building the app for Android.
Android Studio via `flutter config --jdk-dir "$JAVA_HOME"`.
Otherwise, you will get the error "Unsupported class file major
version 65” when building the app for Android.
- Restart your terminal and IDE so that these changes take effect
- Install vsCode
- Install Flutter extension
Expand Down Expand Up @@ -153,10 +153,6 @@ locations as well:
- If you use 'asdf' run the comman `asdf local flutter x.y.z` #Replace
x.y.z with the new Flutter version.
- Otherwise just update the version number in the file
- Adjust variable 'REQUIRED_VERSION' in 'clean_build.sh'
- README.md
- Find all places in the README.md which mentions the Flutter version
number

## Testing

Expand Down
7 changes: 5 additions & 2 deletions recipients_app/clean_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ fi

# Verify Flutter version
echo "Verify Flutter version..."
REQUIRED_VERSION="3.19.6"
REQUIRED_VERSION=$(grep flutter .tool-versions | awk '{print $2}')
CURRENT_VERSION=$(flutter --version | head -n 1 | awk '{print $2}')
if [ "$CURRENT_VERSION" != "$REQUIRED_VERSION" ]; then
echo "Error: Flutter version $REQUIRED_VERSION is required (current: $CURRENT_VERSION)"
exit 1
else
echo "Required version: $REQUIRED_VERSION == Current version: $CURRENT_VERSION"
echo "Flutter version is correct"
fi

echo "Cleaning Flutter build..."
Expand All @@ -31,4 +34,4 @@ dart run build_runner build --delete-conflicting-outputs
echo "Generating localizations..."
flutter gen-l10n

echo "Build completed successfully!"
echo "Build completed successfully!"
15 changes: 9 additions & 6 deletions recipients_app/lib/kri_intl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,7 @@ class KriCupertinoLocalizations extends GlobalCupertinoLocalizations {
required super.singleDigitSecondFormat,
});

static const LocalizationsDelegate<CupertinoLocalizations> delegate =
_KriCupertinoLocalizationsDelegate();
static const LocalizationsDelegate<CupertinoLocalizations> delegate = _KriCupertinoLocalizationsDelegate();

@override
String datePickerYear(int yearIndex) => yearIndex.toString();
Expand Down Expand Up @@ -459,8 +458,7 @@ class KriCupertinoLocalizations extends GlobalCupertinoLocalizations {
DatePickerDateOrder get datePickerDateOrder => DatePickerDateOrder.mdy;

@override
DatePickerDateTimeOrder get datePickerDateTimeOrder =>
DatePickerDateTimeOrder.date_time_dayPeriod;
DatePickerDateTimeOrder get datePickerDateTimeOrder => DatePickerDateTimeOrder.date_time_dayPeriod;

@override
String get anteMeridiemAbbreviation => "AM";
Expand Down Expand Up @@ -664,8 +662,7 @@ class KriMaterialLocalizations extends GlobalMaterialLocalizations {
required super.twoDigitZeroPaddedFormat,
});

static const LocalizationsDelegate<MaterialLocalizations> delegate =
_KriMaterialLocalizationsDelegate();
static const LocalizationsDelegate<MaterialLocalizations> delegate = _KriMaterialLocalizationsDelegate();

// #docregion Getters
@override
Expand Down Expand Up @@ -1134,4 +1131,10 @@ class KriMaterialLocalizations extends GlobalMaterialLocalizations {

@override
String get shareButtonLabel => "Share...";

@override
String get clearButtonTooltip => "Clear text";
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved

@override
String get selectedDateLabel => "Selected";
}
4 changes: 2 additions & 2 deletions recipients_app/lib/ui/buttons/button_outlined_big.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class ButtonOutlinedBig extends StatelessWidget {
height: _buttonHeight,
child: OutlinedButton(
style: Theme.of(context).outlinedButtonTheme.style?.copyWith(
backgroundColor: MaterialStateProperty.all(Colors.white),
side: MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(Colors.white),
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved
side: WidgetStateProperty.all(
const BorderSide(
color: AppColors.primaryColor,
width: 2,
Expand Down
13 changes: 6 additions & 7 deletions recipients_app/lib/ui/buttons/button_small.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ class ButtonSmall extends StatelessWidget {
height: 26,
child: ElevatedButton(
style: Theme.of(context).elevatedButtonTheme.style?.copyWith(
backgroundColor:
MaterialStateProperty.all(Colors.transparent),
foregroundColor: MaterialStateProperty.all(color),
shape: MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(Colors.transparent),
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved
foregroundColor: WidgetStateProperty.all(color),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppSizes.radiusLarge),
side: BorderSide(
Expand All @@ -56,9 +55,9 @@ class ButtonSmall extends StatelessWidget {
height: 26,
child: ElevatedButton(
style: Theme.of(context).elevatedButtonTheme.style?.copyWith(
backgroundColor: MaterialStateProperty.all(color),
foregroundColor: MaterialStateProperty.all(Colors.white),
shape: MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(color),
foregroundColor: WidgetStateProperty.all(Colors.white),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppSizes.radiusLarge),
),
Expand Down
1 change: 0 additions & 1 deletion recipients_app/lib/ui/configs/app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ abstract class AppTheme {
primary: AppColors.primaryColor,
secondary: AppColors.primaryColor,
surface: AppColors.primaryLightColor,
background: AppColors.backgroundColor,
KarinBerg marked this conversation as resolved.
Show resolved Hide resolved
error: AppColors.redColor,
onError: AppColors.fontColorDark,
),
Expand Down
Loading
Loading