From f81ca9ce186673c9e852820ace6118241f5ebd11 Mon Sep 17 00:00:00 2001 From: Roman Shterenzon Date: Mon, 6 Jul 2026 14:38:23 +0300 Subject: [PATCH] Move code editor into example --- {lib/src => example/lib}/code_editor.dart | 3 ++- example/lib/main.dart | 2 ++ example/pubspec.lock | 2 +- example/pubspec.yaml | 1 + lib/syntax_highlight.dart | 1 - pubspec.yaml | 1 - 6 files changed, 6 insertions(+), 4 deletions(-) rename {lib/src => example/lib}/code_editor.dart (99%) diff --git a/lib/src/code_editor.dart b/example/lib/code_editor.dart similarity index 99% rename from lib/src/code_editor.dart rename to example/lib/code_editor.dart index f3476d0..ed95cfe 100644 --- a/lib/src/code_editor.dart +++ b/example/lib/code_editor.dart @@ -11,9 +11,10 @@ /// 2. The main text editing area with syntax highlighting. import 'dart:convert'; import 'dart:math' as math; -import 'package:super_clipboard/super_clipboard.dart'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:super_clipboard/super_clipboard.dart'; import 'package:syntax_highlight/syntax_highlight.dart'; /// Width of the line number gutter in logical pixels diff --git a/example/lib/main.dart b/example/lib/main.dart index d1a52ae..6aa4cf0 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:syntax_highlight/syntax_highlight.dart'; +import 'code_editor.dart'; + late final Highlighter _dartLightHighlighter; late final Highlighter _dartDarkHighlighter; diff --git a/example/pubspec.lock b/example/pubspec.lock index c3e6548..0992be5 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -350,7 +350,7 @@ packages: source: hosted version: "1.4.1" super_clipboard: - dependency: transitive + dependency: "direct main" description: name: super_clipboard sha256: e73f3bb7e66cc9260efa1dc507f979138e7e106c3521e2dda2d0311f6d728a16 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 9054f10..01747a0 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -12,6 +12,7 @@ dependencies: flutter: sdk: flutter google_fonts: ^5.1.0 + super_clipboard: ^0.9.1 syntax_highlight: path: ../ diff --git a/lib/syntax_highlight.dart b/lib/syntax_highlight.dart index 1a8b86f..dd5d861 100644 --- a/lib/syntax_highlight.dart +++ b/lib/syntax_highlight.dart @@ -1,4 +1,3 @@ library syntax_highlight; export 'src/highlighter.dart'; -export 'src/code_editor.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 1081992..d0dcdd9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,6 @@ dependencies: sdk: flutter collection: ^1.17.1 string_scanner: ^1.2.0 - super_clipboard: ^0.9.1 dev_dependencies: flutter_test: