Skip to content

Commit d371019

Browse files
authored
Merge branch 'development' into test/application
2 parents 3b75b91 + 1420b0f commit d371019

17 files changed

Lines changed: 362 additions & 183 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
workflow_dispatch:
1818

1919
env:
20-
flutter_version: "2.10.x"
20+
flutter_version: "3.0.x"
2121
flutter_channel: "stable"
2222
java_version: "12.x"
2323

docs/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ To generate the OpenSource licenses dart file via [flutter_oss_licenses](https:/
7373

7474
>Note: Run `flutter format .` once [oss_licenses.dart](../lib/presentation/licenses/oss_licenses.dart) is created.
7575
76+
## Running tests and generating Test Report
77+
78+
- Step 1: Just for the 1st time, to make sure that all files are included, run ```./.github/scripts/coverage_gen.sh``` to generate a report for the whole project.
79+
- Step 2: Run ```flutter test --coverage```. This will generate the report locally.
80+
- Step 3: Run ```genhtml coverage/lcov.info -o coverage```.
81+
- Step 4: Run ``` firefox coverage/index.html``` (or run ```coverage/index.html``` to any of your web browser).
82+
#### You should see the coverage of your tests line-wise in Codecov.
83+
7684
## Getting Started with Flutter
7785

7886
A few resources to get you started if this is your first Flutter project:

lib/domain/user/user.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class User with _$User {
1010
@visibleForTesting
1111
// ignore: avoid_positional_boolean_parameters
1212
static Future<String?> getAnonymousIdToken([bool forceRefresh = false]) =>
13-
Future.value(null);
13+
Future.value();
1414

1515
static const User anonymous = User(
1616
id: 'anonymous',

lib/presentation/home/home_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class _HomePageState extends State<HomePage> {
1919
@override
2020
void initState() {
2121
super.initState();
22-
WidgetsBinding.instance?.addPostFrameCallback((_) {
22+
WidgetsBinding.instance.addPostFrameCallback((_) {
2323
checkAndMaybeShowOnboarding();
2424
});
2525
}

lib/presentation/shared_widgets/photo_selector.dart

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,29 +121,31 @@ class _PhotoSelectorState extends State<PhotoSelector> {
121121

122122
final _compression = 100;
123123
Future<void> _cropImage(XFile image) async {
124-
final File? croppedFile = await ImageCropper.cropImage(
124+
final CroppedFile? croppedFile = await ImageCropper().cropImage(
125125
sourcePath: image.path,
126126
aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1),
127127
aspectRatioPresets: [CropAspectRatioPreset.square],
128128
compressFormat: ImageCompressFormat.png,
129129
maxWidth: 1023,
130130
maxHeight: 1023,
131131
compressQuality: _compression,
132-
androidUiSettings: const AndroidUiSettings(
133-
toolbarTitle: 'Profile Photo',
134-
toolbarColor: kAccentColor,
135-
toolbarWidgetColor: Colors.white,
136-
lockAspectRatio: true,
137-
),
138-
iosUiSettings: const IOSUiSettings(
139-
minimumAspectRatio: 1.0,
140-
aspectRatioLockEnabled: true,
141-
title: 'Profile Photo',
142-
),
132+
uiSettings: [
133+
AndroidUiSettings(
134+
toolbarTitle: 'Profile Photo',
135+
toolbarColor: kAccentColor,
136+
toolbarWidgetColor: Colors.white,
137+
lockAspectRatio: true,
138+
),
139+
IOSUiSettings(
140+
minimumAspectRatio: 1.0,
141+
aspectRatioLockEnabled: true,
142+
title: 'Profile Photo',
143+
),
144+
],
143145
);
144146

145147
if (widget.onSelected != null && croppedFile != null) {
146-
widget.onSelected!(croppedFile);
148+
widget.onSelected!(File(croppedFile.path));
147149
}
148150
}
149151

0 commit comments

Comments
 (0)