Skip to content

[Question] Resize and change color of the canvas of ImageEditor #149

Answered by hm21
ikramakro asked this question in Q&A
Discussion options

You must be logged in to vote

If you just want to change the canvas color and size dynamically, you can do it as in the example below:

// Dart imports:
import 'dart:async';
import 'dart:io';
import 'dart:math';
import 'dart:ui' as ui;

// Flutter imports:
import 'package:example/pages/pick_image_example.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:image_picker/image_picker.dart';
import 'package:pro_image_editor/models/history/state_history.dart';

// Package imports:
import 'package:pro_image_editor/pro_image_editor.dart';

// Project imports:
import '../utils/example_helper.dart'

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ikramakro
Comment options

You must be logged in to vote
1 reply
@hm21
Comment options

hm21 Jun 30, 2024
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants