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';
|
||||
|
||||
/// Bottom sheet with "from gallery" and "take photo" actions for choosing a
|
||||
@@ -61,12 +61,7 @@ Future<Uint8List?> showChatBackgroundPickerSheet(BuildContext context) async {
|
||||
Future<Uint8List?> cropChatBackgroundImage(
|
||||
BuildContext context,
|
||||
Uint8List bytes,
|
||||
) => Navigator.of(context).push<Uint8List>(
|
||||
MaterialPageRoute(
|
||||
fullscreenDialog: true,
|
||||
builder: (_) => AvatarCropPage(imageBytes: bytes, aspectRatio: null),
|
||||
),
|
||||
);
|
||||
) => AppRoutes.openAvatarCrop(context, imageBytes: bytes, aspectRatio: null);
|
||||
|
||||
Future<Uint8List?> _pickRaw(Future<XFile?> Function() pick) async {
|
||||
final picked = await pick();
|
||||
|
||||
Reference in New Issue
Block a user