Skip to content

Commit

Permalink
Merge pull request #253 from CollActionteam/version/flutter-3.0.3
Browse files Browse the repository at this point in the history
upgraded project to flutter 3.0.3 and updated dependencies
  • Loading branch information
saksham-gt authored Jun 27, 2022
2 parents 7ba648f + c834928 commit 1420b0f
Show file tree
Hide file tree
Showing 8 changed files with 168 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
workflow_dispatch:

env:
flutter_version: "2.10.x"
flutter_version: "3.0.x"
flutter_channel: "stable"
java_version: "12.x"

Expand Down
2 changes: 1 addition & 1 deletion lib/domain/user/user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class User with _$User {
@visibleForTesting
// ignore: avoid_positional_boolean_parameters
static Future<String?> getAnonymousIdToken([bool forceRefresh = false]) =>
Future.value(null);
Future.value();

static const User anonymous = User(
id: 'anonymous',
Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/home/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class _HomePageState extends State<HomePage> {
@override
void initState() {
super.initState();
WidgetsBinding.instance?.addPostFrameCallback((_) {
WidgetsBinding.instance.addPostFrameCallback((_) {
checkAndMaybeShowOnboarding();
});
}
Expand Down
28 changes: 15 additions & 13 deletions lib/presentation/shared_widgets/photo_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,31 @@ class _PhotoSelectorState extends State<PhotoSelector> {

final _compression = 100;
Future<void> _cropImage(XFile image) async {
final File? croppedFile = await ImageCropper.cropImage(
final CroppedFile? croppedFile = await ImageCropper().cropImage(
sourcePath: image.path,
aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1),
aspectRatioPresets: [CropAspectRatioPreset.square],
compressFormat: ImageCompressFormat.png,
maxWidth: 1023,
maxHeight: 1023,
compressQuality: _compression,
androidUiSettings: const AndroidUiSettings(
toolbarTitle: 'Profile Photo',
toolbarColor: kAccentColor,
toolbarWidgetColor: Colors.white,
lockAspectRatio: true,
),
iosUiSettings: const IOSUiSettings(
minimumAspectRatio: 1.0,
aspectRatioLockEnabled: true,
title: 'Profile Photo',
),
uiSettings: [
AndroidUiSettings(
toolbarTitle: 'Profile Photo',
toolbarColor: kAccentColor,
toolbarWidgetColor: Colors.white,
lockAspectRatio: true,
),
IOSUiSettings(
minimumAspectRatio: 1.0,
aspectRatioLockEnabled: true,
title: 'Profile Photo',
),
],
);

if (widget.onSelected != null && croppedFile != null) {
widget.onSelected!(croppedFile);
widget.onSelected!(File(croppedFile.path));
}
}

Expand Down
Loading

0 comments on commit 1420b0f

Please sign in to comment.