route avatar crop and profile view through AppRoutes
This commit is contained in:
@@ -3,7 +3,7 @@ import 'dart:typed_data';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
|
||||
import 'avatar_crop_page.dart';
|
||||
import '../routing/app_routes.dart';
|
||||
import 'file_pick.dart';
|
||||
|
||||
/// Result of the user's choice inside [showAvatarActionsSheet]. The sheet
|
||||
@@ -107,10 +107,5 @@ Future<Uint8List?> _pickAndCrop(
|
||||
if (picked == null) return null;
|
||||
final bytes = await picked.readAsBytes();
|
||||
if (!context.mounted) return null;
|
||||
return Navigator.of(context).push<Uint8List>(
|
||||
MaterialPageRoute(
|
||||
fullscreenDialog: true,
|
||||
builder: (_) => AvatarCropPage(imageBytes: bytes),
|
||||
),
|
||||
);
|
||||
return AppRoutes.openAvatarCrop(context, imageBytes: bytes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user