Skip to content

Commit

Permalink
refactor(configs): reorganize file structure for better maintainability
Browse files Browse the repository at this point in the history
- Moved `custom widgets`, `icons`, and `theme` files to the `configs` directory.
- Renamed all `theme` files to `styles` for better clarity and alignment with their purpose.

- Updated paths for `custom widgets`, `icons`, and `styles`, now located under `configs` directory.
- Renamed `theme` classes to end with `Style` for consistency.

- Updated `README.md` and `CHANGELOG.md` with details of the restructuring.
- Provided a link to the relevant [GitHub discussion](#298).

- Adjusted test files to match the updated file paths and naming conventions.
  • Loading branch information
hm21 committed Dec 27, 2024
1 parent 8a0dcd7 commit 5a00eea
Show file tree
Hide file tree
Showing 194 changed files with 4,742 additions and 5,026 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [hm21]
24 changes: 20 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
# Changelog

## 7.0.0
### Changed
- **File Structure Update**:
- Moved `custom widgets`, `icons`, and `theme` files into the `configs` directory for better organization.
- Renamed all `theme` files to `styles` to better reflect their purpose.

### Breaking Changes
- File renaming and restructuring require updates to your configuration file:
- `custom widgets`, `icons`, and `theme` files are now located directly in the `configs` directory of the editor.
- All theme classes are renamed to end with `Style` for consistency.


For more details on why these breaking changes were made and what improvements they bring, check out that [GitHub discussion](https://github.com/hm21/pro_image_editor/discussions/298).



## 6.2.3
- **FIX**(layer): Resolve issue that layer reposition correctly after screen rotation. This resolves issue [#283](https://github.com/hm21/pro_image_editor/issues/283)

## 6.2.2
- fix(version): Set minimum Flutter version to `3.27.0`. This resolves issue [#287](https://github.com/hm21/pro_image_editor/issues/287)
- **Fix**(version): Set minimum Flutter version to `3.27.0`. This resolves issue [#287](https://github.com/hm21/pro_image_editor/issues/287)

## 6.2.1
- **FIX**(lint): Resolve lint issues after upgrading to Flutter `3.27.0`
Expand Down Expand Up @@ -54,7 +70,7 @@
- **FIX**(Example): Resolve all linting issues in the example code.

## 5.4.2
- **FIX**(Painting-Editor): Resolve issue where undo-redo action capturing the incorrect image. This resolves issue [#239](https://github.com/hm21/pro_image_editor/issues/239)
- **FIX**(Paint-Editor): Resolve issue where undo-redo action capturing the incorrect image. This resolves issue [#239](https://github.com/hm21/pro_image_editor/issues/239)

## 5.4.1
- **FEAT**(Emoji-Editor): Update the emoji-editor to version `3.1.0` with custom view order configuration support.
Expand Down Expand Up @@ -419,7 +435,7 @@ configs: ProImageEditorConfigs(
- More theme and configuration options
- Hero animation for image and layers
- Round "cropper" for profile pictures
- **FEAT**: Painting-Editor
- **FEAT**: Paint-Editor
- Standalone drawing of signatures or paintings
- **FEAT**: Emoji-Editor
- Infinite scrolling through all categories
Expand Down Expand Up @@ -706,7 +722,7 @@ configs: ProImageEditorConfigs(

## 1.0.0

- **FEAT**: PaintingEditor
- **FEAT**: PaintEditor
- **FEAT**: TextEditor
- **FEAT**: CropRotateEditor
- **FEAT**: FilterEditor
Expand Down
410 changes: 39 additions & 371 deletions README.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions example/lib/common/example_constants.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// A path to a demo image asset in the project.
final String kImageEditorExampleAssetPath = 'assets/demo.png';

/// A URL to a demo image hosted on a remote server.
final String kImageEditorExampleNetworkUrl =
'https://picsum.photos/id/230/2000';

/// Breakpoint for desktop layout in the image editor example.
final kImageEditorExampleIsDesktopBreakPoint = 900;
150 changes: 150 additions & 0 deletions example/lib/common/examples.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
import 'package:example/pages/stickers_example.dart';
import 'package:flutter/material.dart';

import '../models/example_model.dart';
import '../pages/crop_to_main_editor.dart';
import '../pages/custom_widgets_example.dart';
import '../pages/default_example.dart';
import '../pages/design_examples/design_example.dart';
import '../pages/firebase_supabase_example.dart';
import '../pages/frame_example.dart';
import '../pages/generation_configs_example.dart';
import '../pages/google_font_example.dart';
import '../pages/image_format_convert_example.dart';
import '../pages/import_export_example.dart';
import '../pages/movable_background_image.dart';
import '../pages/pick_image_example.dart';
import '../pages/reorder_layer_example.dart';
import '../pages/round_cropper_example.dart';
import '../pages/selectable_layer_example.dart';
import '../pages/signature_drawing_example.dart';
import '../pages/standalone_example.dart';
import '../pages/zoom_example.dart';

/// A predefined list of examples for the image editor application.
///
/// Each [Example] in this list contains:
/// - [path]: A unique navigation route for the example.
/// - [name]: A user-friendly name for the example.
/// - [icon]: An [IconData] representing the example visually.
/// - [page]: A [Widget] representing the content of the example.
///
/// These examples showcase various features of the image editor, such as
/// cropping, layering, importing/exporting, and integration with services
/// like Firebase or Supabase.
List<Example> kImageEditorExamples = const [
Example(
path: '/default',
name: 'Default-Editor',
icon: Icons.dashboard_outlined,
page: DefaultExample(),
),
Example(
path: '/designs',
name: 'Designs',
icon: Icons.palette_outlined,
page: DesignExample(),
),
Example(
path: '/standalone',
name: 'Standalone-Editors',
icon: Icons.view_in_ar_outlined,
page: StandaloneExample(),
),
Example(
path: '/init-crop-editor',
name: 'Start with Crop-Editor',
icon: Icons.crop,
page: CropToMainEditorExample(),
),
Example(
path: '/signature-drawing',
name: 'Signature/ Drawing',
icon: Icons.draw_outlined,
page: SignatureDrawingExample(),
),
Example(
path: '/stickers',
name: 'Stickers',
icon: Icons.image_outlined,
page: StickersExample(),
),
Example(
path: '/firebase-supabase',
name: 'Firebase-Supabase',
icon: Icons.cloud_upload_outlined,
page: FirebaseSupabaseExample(),
),
Example(
path: '/reorder',
name: 'Reorder-Layers',
icon: Icons.sort,
page: ReorderLayerExample(),
),
Example(
path: '/round-cropper',
name: 'Round-Cropper',
icon: Icons.supervised_user_circle_outlined,
page: RoundCropperExample(),
),
Example(
path: '/selectable-layers',
name: 'Selectable-Layers',
icon: Icons.select_all_rounded,
page: SelectableLayerExample(),
),
Example(
path: '/generation-configs',
name: 'Generation-Configurations',
icon: Icons.memory_outlined,
page: GenerationConfigsExample(),
),
Example(
path: '/camera-gallery-picker',
name: 'Camera-Gallery-Picker',
icon: Icons.attachment_rounded,
page: PickImageExample(),
),
Example(
path: '/google-font',
name: 'Google-Font',
icon: Icons.emoji_emotions_outlined,
page: GoogleFontExample(),
),
Example(
path: '/custom-widgets',
name: 'Custom-Widgets',
icon: Icons.dashboard_customize_outlined,
page: CustomWidgetsExample(),
),
Example(
path: '/import-export',
name: 'Import-Export',
icon: Icons.import_export_rounded,
page: ImportExportExample(),
),
Example(
path: '/movable',
name: 'Movable-Background',
icon: Icons.pan_tool_alt_outlined,
page: MovableBackgroundImageExample(),
),
Example(
path: '/frame',
name: 'Frame',
icon: Icons.filter_frames_outlined,
page: FrameExample(),
),
Example(
path: '/zoom',
name: 'Zoom',
icon: Icons.zoom_in_outlined,
page: ZoomExample(),
),
Example(
path: '/output-format',
name: 'Output-Format',
icon: Icons.compare_outlined,
page: ImageFormatConvertExample(),
),
];
Loading

0 comments on commit 5a00eea

Please sign in to comment.