diff --git a/.gitignore b/.gitignore
index 8290a91..68b722b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,7 +9,7 @@ build/
# If you're building an application, you may want to check-in your pubspec.lock
pubspec.lock
.pub/
-
+.idea/
# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..e69de29
diff --git a/analysis_options.yaml b/analysis_options.yaml
new file mode 100644
index 0000000..108d105
--- /dev/null
+++ b/analysis_options.yaml
@@ -0,0 +1 @@
+include: package:pedantic/analysis_options.yaml
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
deleted file mode 100644
index d74aa35..0000000
--- a/android/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
diff --git a/dep_lib/audio_visuals/audio_player.dart b/dep_lib/audio_visuals/audio_player.dart
deleted file mode 100644
index c51d93b..0000000
--- a/dep_lib/audio_visuals/audio_player.dart
+++ /dev/null
@@ -1,67 +0,0 @@
-import 'package:just_audio/just_audio.dart';
-
-class Player {
- Duration duration;
-
- Stream positionStream;
-
- void init() async {
-// var duration = await player.setUrl('https://foo.com/bar.mp3');
-// var duration = await player.setAsset('path/to/asset.mp3');
- }
-
- AudioPlayer _player = AudioPlayer();
-
- stop() {
- _player.stop();
-// _player?.dispose();
- }
-
- Future load() async {
- await _player?.dispose();
- _player = AudioPlayer();
- var url = '/Users/roi/Downloads/samples/pumpit.mp3';
-// var url = '/Users/roi/Downloads/samples/sharona.mp3';
-// var url = 'assets/sharona.mp3';
-// var url =
-// 'https://roi-graphx-audio-wave.surge.sh/assets/assets/sharona.mp3';
-// var url = 'http://dev.roipeker.website/assets/sharona.mp3';
-
- _player.stop();
- duration = await _player.setFilePath(url);
-// duration = await _player.setAsset(url);
-// duration = await _player.setUrl(url);
-// print("Duration: $duration");
- _player.play();
-// await _player.seek(Duration(seconds: 10));
-//
-// Stream createPositionStream({
-// int steps = 800,
-// Duration minPeriod = const Duration(milliseconds: 200),
-// Duration maxPeriod = const Duration(milliseconds: 2a00),
-// }) {
-// duration.false50
- var steps = duration.inMilliseconds ~/ 100;
- positionStream = _player.createPositionStream(
- steps: steps,
- minPeriod: Duration(milliseconds: 100),
- maxPeriod: Duration(milliseconds: 100),
- );
-// stream.listen((event) {
-// print(event);
-// });
-// _player.positionStream.listen((event) {
-// print(event);
-// });
-// _player.playbackEventStream.listen((event) {
-// print(event);
-// });
-// _player.playerStateStream.listen((state) {
-// if (state.playing) {
-// print("State is:: ${state}");
-// }
-// });
-// var file = File(url);
-// print('file exists? ${file.exists()}');
- }
-}
diff --git a/dep_lib/audio_visuals/audio_visual_main.dart b/dep_lib/audio_visuals/audio_visual_main.dart
deleted file mode 100644
index e4eeda3..0000000
--- a/dep_lib/audio_visuals/audio_visual_main.dart
+++ /dev/null
@@ -1,247 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-import 'package:graphx/demos/audio_visuals/audio_player.dart';
-import 'package:graphx/demos/audio_visuals/model.dart';
-import 'package:graphx/graphx/display/shape.dart';
-import 'package:graphx/graphx/display/sprite.dart';
-import 'package:graphx/graphx/display/static_text.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/scene_painter.dart';
-import 'package:graphx/graphx/utils/assets_loader.dart';
-
-class AudioVisualMain extends RootScene {
- WaveformData model;
-
- Player player = Player();
-
- @override
- void init() {
- super.init();
- owner.core.config.useKeyboard = true;
- owner.core.config.useTicker = true;
- owner.needsRepaint = true;
- _loadData();
- }
-
- Future _loadData() async {
-// var jsonData = await AssetLoader.loadJson('assets/sharona.json');
-// var jsonData = await AssetLoader.loadJson('assets/pumpit.json');
- var jsonData = await AssetLoader.loadJson('assets/pumpit-s.json');
- model = WaveformData.fromJson(jsonData);
- model.scaleData();
-// renderModel();
- await player.load();
-
- player.positionStream.listen((event) {
- double p = event.inMilliseconds / player.duration.inMilliseconds;
- renderPosition(p);
- });
-// print("Data is: $model");
- }
-
- void onEnterFrame() {
- displayerLeft.update();
- displayerRight.update();
-// graph1.scaleY += (targetP1 - graph1.scaleY) / 1.5;
-// graph2.scaleY += (targetP2 - graph2.scaleY) / 1.5;
- }
-
- double targetP1 = 0;
- double targetP2 = 0;
-
- void renderPosition(double t) {
- final index = model.getIndex(t);
- displayerLeft.minY = model.chan1_min[index];
- displayerLeft.maxY = model.chan1_max[index];
-
- displayerRight.minY = model.chan2_min[index];
- displayerRight.maxY = model.chan2_max[index];
-
-// var value1 = model.getPositionUp(t);
-// var value2 = model.getPositionDown(t);
-// targetP1 = value1;
-// targetP2 = value2;
-// graph1.scaleY = -value1;
-// graph2.scaleY = -value2;
-// stage.scene.requestRepaint();
- }
-
-// var graph1 = Shape();
-// var graph2 = Shape();
-
- var displayerLeft = Displayer();
- var displayerRight = Displayer();
-
- @override
- void ready() {
- super.ready();
- stage.keyboard.onDown.add((e) {
- if (stage.keyboard.isPressed(LogicalKeyboardKey.keyA)) {
- player.stop();
- }
- });
-
- displayerLeft.x = 100;
- displayerRight.x = stage.stageWidth - 100;
- displayerRight.y = displayerLeft.y = stage.stageHeight / 2;
- addChild(displayerLeft);
- addChild(displayerRight);
-
-// graph1.graphics.beginFill(0xff0000);
-// graph1.graphics.drawRect(0, 0, 100, 200);
-// graph1.graphics.endFill();
-// graph1.alignPivot(Alignment.bottomCenter);
-// graph1.x = stage.stageWidth / 2;
-// graph1.y = stage.stageHeight / 2;
-//
-// graph2.graphics.beginFill(0x00ff00);
-// graph2.graphics.drawRect(0, 0, 100, 200);
-// graph2.graphics.endFill();
-// graph2.alignPivot(Alignment.bottomCenter);
-// graph2.x = stage.stageWidth / 2;
-// graph2.y = stage.stageHeight / 2;
-//
-// addChild(graph1);
-// addChild(graph2);
-
-// stage.scene.core.resumeTicker();
- StaticText.defaultTextStyle = StaticText.getStyle(
- color: Colors.black,
- fontSize: 10,
- fontWeight: FontWeight.w400,
- );
-
- stage.scene.core.resumeTicker();
- stage.onEnterFrame.add(onEnterFrame);
-
- /// sample data.
-// stage.scene.core.isTicking
-// drawTimeline();
- }
-
- var secondPixels = 30.0;
-
- void drawTimeline() {
- var shape = Shape();
- addChild(shape);
-
- var maxSeconds = 40;
- final g = shape.graphics;
- g.lineStyle(0, 0x0, 1);
- var h = stage.stageHeight;
- for (var i = 0; i < maxSeconds; ++i) {
- double px = i * secondPixels;
- g.moveTo(px, h - 20);
- g.lineTo(px, h);
-
- g.moveTo(px, 0);
- g.lineTo(px, 20);
- var tf = addSecondLabel(i);
- tf.x = px;
- tf.y = h - 25;
- addChild(tf);
- }
- }
-
- StaticText addSecondLabel(int idx) {
- final textStr = '00:' + ('$idx').padLeft(2, '0');
- var tf = StaticText(text: textStr);
- tf.validate();
- tf.alignPivot(Alignment.bottomCenter);
- return tf;
- }
-
- void renderModel() {
- double second = 30.0;
- List sub = model.getFrames(
- startFrame: 0,
- endFrame: (model.framesPerSecond * (second)).toInt(),
- );
- var dat = (sub.length / 2) / model.framesPerSecond;
- print("Seconds::$dat");
- print("Sub data: ${sub.length}"); // 240
-
- /// 2 seconds.
- var graph = Shape();
- addChild(graph);
-
- final g = graph.graphics;
- g.lineStyle(2, Colors.red.value, .75);
- var tx = second * secondPixels;
- g.moveTo(tx, 0);
- g.lineTo(tx, stage.stageHeight);
-
- var middle = stage.stageHeight / 2;
- var amp = stage.stageHeight / 2.5;
- g.lineStyle(1, Colors.lightBlue.value, 1);
- g.moveTo(0, middle);
-
- /// draw middle.
- var minPoints = [];
-
- var j = 0;
- for (var i = 0; i < sub.length; i += 2) {
- double p1 = sub[i];
- double p2 = sub[i + 1];
-
- var rx = j / model.framesPerSecond;
- var px = rx * secondPixels;
-// secondPixels;
-// print(model.framesPerSecond);
-// print(rx);
- var py = middle + amp * p1;
- var py2 = middle + amp * p2;
- g.lineTo(px, py);
- minPoints.add(GxPoint(px, py2));
- ++j;
-// double px = i.toDouble();
-// if (i % 2 != 0) {
-// var py = middle - amp * percent;
-// g.lineTo(px, py);
-// } else {
-// var py = middle - amp * percent;
-//
-// /// max points.
-// minPoints.add(GxPoint(px, py));
-// }
- }
-
-// g.lineTo(stage.stageWidth, middle);
- final rev = minPoints.reversed;
- for (var p in rev) {
- g.lineTo(p.x, p.y);
- }
- }
-}
-
-class Displayer extends Sprite {
- Shape _high;
- Shape _low;
- double w = 100;
- double h = 300;
-
- Displayer() {
- onAddedToStage.addOnce(init);
- }
-
- void init() {
- _high = createShape(0xff0000);
- _low = createShape(0x0000ff);
- }
-
- Shape createShape(int color) {
- var sh = Shape();
- addChild(sh);
- sh.graphics.beginFill(color).drawRect(0, 0, w, h).endFill();
- sh.alignPivot(Alignment.bottomCenter);
- return sh;
- }
-
- double maxY = 0;
- double minY = 0;
-
- void update() {
- _high.scaleY += (maxY - _high.scaleY) / 2;
- _low.scaleY += (minY - _low.scaleY) / 2;
- }
-}
diff --git a/dep_lib/audio_visuals/audio_visuals_demo.dart b/dep_lib/audio_visuals/audio_visuals_demo.dart
deleted file mode 100644
index 57b5e41..0000000
--- a/dep_lib/audio_visuals/audio_visuals_demo.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:graphx/graphx/graphx_widget.dart';
-import 'package:graphx/graphx/scene_controller.dart';
-
-import 'audio_visual_main.dart';
-
-class AudioVisualDemo extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- body: Center(
- child: Container(
-// width: 400,
-// height: 400,
-// color: Colors.grey,
- child: SceneBuilderWidget(
- builder: () => SceneController.withLayers(back: AudioVisualMain()),
- ),
- ),
- ),
- );
- }
-}
diff --git a/dep_lib/audio_visuals/model.dart b/dep_lib/audio_visuals/model.dart
deleted file mode 100644
index 59648de..0000000
--- a/dep_lib/audio_visuals/model.dart
+++ /dev/null
@@ -1,119 +0,0 @@
-// To parse this JSON data, do
-//
-// final waveformData = waveformDataFromJson(jsonString);
-
-import 'dart:math';
-
-class WaveformData {
- double framesPerSecond;
-
- WaveformData({
- this.version,
- this.channels,
- this.sampleRate,
- this.samplesPerPixel,
- this.bits,
- this.length,
- this.data,
- });
-
- int version;
- int channels;
- int sampleRate;
- int samplesPerPixel;
- int bits;
- int length;
- List data;
-
- factory WaveformData.fromJson(Map json) => WaveformData(
- version: json["version"],
- channels: json["channels"],
- sampleRate: json["sample_rate"],
- samplesPerPixel: json["samples_per_pixel"],
- bits: json["bits"],
- length: json["length"],
- data: List.from(json["data"]),
- );
-
- List _normalizedData;
- List _up = [];
- List _down = [];
-
- //36658
- //146632
- //44100/256=172.265625x sec
- // 213.127906977
-
- void scaleData() {
- framesPerSecond = sampleRate / samplesPerPixel; // 172
-// var dd = (length / 2) ~/ framesPerSecond;
- var dd = length ~/ framesPerSecond;
- print('length:: $length // ${data.length}');
- print('my data::: ${Duration(seconds: dd)}');
- double maxValue = pow(2, bits - 1).toDouble();
-
- /// 2 channels?
- final len = data.length;
- _normalizedData = List(len);
- for (var i = 0; i < len; ++i) {
- double ratio = data[i].toDouble() / maxValue;
- _normalizedData[i] = ratio.clamp(-1.0, 1.0);
- if (i % 2 == 0) {
- _up.add(_normalizedData[i]);
- } else {
- _down.add(_normalizedData[i]);
- }
- }
-
- if (channels == 2) {
- final d = _normalizedData;
- for (var i = 0; i < len; i += 4) {
- chan1_min.add(d[i]);
- chan1_max.add(d[i + 1]);
- chan2_min.add(d[i + 2]);
- chan2_max.add(d[i + 3]);
- }
- }
- }
-
- List chan1_min = [];
- List chan1_max = [];
- List chan2_min = [];
- List chan2_max = [];
-
-// List getTimes({double from, double to}) {}
-
- List getFrames({int startFrame, int endFrame}) {
- final d = _normalizedData;
- final from = startFrame * 2;
- final end = endFrame * 2;
- return d.sublist(from, end);
- }
-
- int getIndex(double percent) {
- return (chan1_min.length * percent).round();
- }
-
- double getPositionDown(double percent) {
- var total = _down.length;
- var idx = (total * percent).round();
- return _down[idx];
- }
-
- double getPositionUp(double percent) {
-// var total = length / 2;
- var total = _up.length;
- var idx = (total * percent).round();
-// print(idx);
-// return _normalizedData.sublist(idx, idx + 2);
- return _up[idx];
-// _normalizedData[idx];
-// var idx = framesPerSecond
-// double second = 30.0;
-// List sub = model.getFrames(
-// startFrame: 0,
-// endFrame: (model.framesPerSecond * (second)).toInt(),
-// );
-// var dat = (sub.length / 2) / model.framesPerSecond;
- }
-}
diff --git a/dep_lib/tween/gx_tween.dart b/dep_lib/tween/gx_tween.dart
deleted file mode 100644
index bdb43a6..0000000
--- a/dep_lib/tween/gx_tween.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-import 'dart:ui';
-
-import 'package:graphx/graphx/tween/tween_sequence.dart';
-import 'package:graphx/graphx/tween/tween_step.dart';
-import 'package:graphx/graphx/tween/tween_timeline.dart';
-
-class GxTween {
- static bool enablePooling = false;
- static double timeScale = 1.0;
-
- static TweenTimeline $currentTimeline;
- static List $timelines;
-
- static void addTimeline(TweenTimeline timeline, [bool setCurrent = false]) {
- if (setCurrent) $currentTimeline = timeline;
- $timelines ??= [];
- $timelines.add(timeline);
- }
-
- static TweenStep create(dynamic target, [bool autorun = true]) {
- TweenSequence seq = TweenSequence.getPoolInstance();
- if ($currentTimeline == null) {
- addTimeline(TweenTimeline(), true);
- }
- $currentTimeline.addSequence(seq);
- var step = seq.addStep(TweenStep.getPoolInstance());
- // print("Sequence is $seq // step is $step");
- if (target is String) {
- step.targetId = target;
- } else {
- step.$target = target;
- }
- if (autorun) {
- seq.run();
- }
- return step;
- }
-
- static TweenStep delay(double time, VoidCallback callback, [List args]) {
- var step = create(null);
- print("Created step: $step");
- step = step.delay(time).onComplete(callback);
- return step;
- }
-
- static void update(double delta) {
- delta *= timeScale;
- if ($timelines == null) return;
- for (var timeline in $timelines) {
- timeline.update(delta);
- }
- print("${$timelines.length}");
- }
-
- static void abortAllTimelines() {
- if ($timelines == null) return;
- while ($timelines.length > 0) {
- $timelines.removeAt(0)?.abortAllSequences();
- }
- $currentTimeline = null;
- }
-
-// static createDouble(target, [bool autoRun = true]) {}
-}
diff --git a/dep_lib/tween/interp/float_interp.dart b/dep_lib/tween/interp/float_interp.dart
deleted file mode 100644
index e8ee0f5..0000000
--- a/dep_lib/tween/interp/float_interp.dart
+++ /dev/null
@@ -1,71 +0,0 @@
-import 'package:graphx/graphx/tween/tween_interp.dart';
-import 'package:graphx/graphx/tween/tween_step.dart';
-
-class FloatInterp implements TweenInterp {
- TweenStep _tween;
-
- double duration;
- double to;
- double from;
- bool relative = false;
- double $time;
-
- double difference;
- double current;
- TweenEase ease;
- bool complete;
-
- String property;
- String propertyGetter;
- String propertySetter;
- bool hasInitialized;
-
- double getFinalValue() => from + difference;
-
- FloatInterp(TweenStep tween) {
- _tween = tween;
- current = from = _getTargetValue();
- }
-
- void _init() {
- /// use getter-setter.
- current = from = _getTargetValue();
- difference = relative ? to : to - from;
- hasInitialized = true;
- }
-
- double _getTargetValue() {
- /// WTF TO DO.
- var a = _tween.getTarget();
- return 0;
- }
-
- void _setTargetValue(double value) {
- current = value;
-// var a = _tween.getTarget();
-// return 0;
- }
-
- void reset() {
- $time = 0;
- hasInitialized = false;
- }
-
- void update(double delta) {
- if (!hasInitialized) _init();
- $time += delta;
- double c;
- if ($time > duration) {
- $time = duration;
- c = from + difference;
- complete = true;
- } else {
- c = from + ease($time / duration) * difference;
- }
- setValue(c);
- }
-
- void setValue(double value) {
- if (value != current) _setTargetValue(value);
- }
-}
diff --git a/dep_lib/tween/tween_interp.dart b/dep_lib/tween/tween_interp.dart
deleted file mode 100644
index a7da35a..0000000
--- a/dep_lib/tween/tween_interp.dart
+++ /dev/null
@@ -1,14 +0,0 @@
-typedef TweenEase = double Function(double value);
-
-abstract class TweenInterp {
- double duration;
- bool complete;
- String property;
- TweenEase ease;
- double from;
-
- void update(double delta);
- void setValue(double value);
- dynamic getFinalValue();
- void reset();
-}
diff --git a/dep_lib/tween/tween_sequence.dart b/dep_lib/tween/tween_sequence.dart
deleted file mode 100644
index 009b4e7..0000000
--- a/dep_lib/tween/tween_sequence.dart
+++ /dev/null
@@ -1,149 +0,0 @@
-import 'package:graphx/graphx/tween/gx_tween.dart';
-import 'package:graphx/graphx/tween/tween_step.dart';
-import 'package:graphx/graphx/tween/tween_timeline.dart';
-
-class TweenSequence {
- TweenSequence _poolNext;
- static TweenSequence _poolFirst;
- static TweenSequence getPoolInstance() {
- TweenSequence seq;
- if (_poolFirst == null) {
- seq = TweenSequence();
- } else {
- seq = _poolFirst;
- _poolFirst = _poolFirst._poolNext;
- seq._poolNext = null;
- }
- return seq;
- }
-
- TweenStep _firstStep;
- TweenStep _currentStep;
- TweenStep _lastStep;
-
- TweenStep getLastStep() => _lastStep;
- int _stepCount = 0;
- bool _running = false;
-
- TweenTimeline timeline;
- bool _complete;
- bool isComplete() => _complete;
-
- void dispose() {
- while (_currentStep != null) {
- TweenStep step = _currentStep;
- removeStep(step);
- step.dispose();
- }
- _currentStep = null;
- _lastStep = null;
- _stepCount = 0;
- _complete = false;
- _running = false;
-
- timeline = null;
- if (GxTween.enablePooling) {
- _poolNext = _poolFirst;
- _poolFirst = this;
- }
- }
-
- double update(double delta) {
- if (!_running) return delta;
- var rest = delta;
- while (rest > 0 && _currentStep != null) {
- rest = _currentStep.update(rest);
- }
- if (_currentStep == null) finish();
- return rest;
- }
-
- void finish() {
- timeline.$dirty = true;
- _complete = true;
- }
-
- TweenStep addStep(TweenStep tween) {
- tween.$sequence = this;
- if (_currentStep == null) {
- _firstStep = _lastStep = _currentStep = tween;
- } else {
- _lastStep.$next = tween;
- tween.$previous = _lastStep;
- _lastStep = tween;
- }
- _stepCount++;
- return tween;
- }
-
- void nextStep() {
- _currentStep = _currentStep.$next;
- }
-
- void removeStep(TweenStep tween) {
- _stepCount--;
- if (_firstStep == tween) _firstStep = _firstStep.$next;
- if (_currentStep == tween) _currentStep = tween.$next;
- if (_lastStep == tween) _lastStep = tween.$previous;
- if (tween.$previous != null) tween.$previous.$next = tween.$next;
- if (tween.$next != null) tween.$next.$previous = tween.$previous;
- }
-
- void skipCurrent() => _currentStep?.skip();
-
- void abort() {
- timeline?.removeSequence(this);
- }
-
- // bind to gui
-
- void run() {
- _running = true;
- }
-
- void repeat() {
- _currentStep = _firstStep;
- }
-
- TweenStep getStepById(String stepId) {
- var step = _firstStep;
- if (stepId != '') {
- while (step != null) {
- if (step.stepId == stepId) {
- break;
- } else {
- step = step.$next;
- }
- }
- }
- return step;
- }
-
- void goto(TweenStep step) {
- if (step == null) {
- print("Connot go to null step.");
- } else {
- _currentStep = step;
- }
- }
-
- void reset() {
- TweenStep step = _firstStep;
- while (step != null) {
- step.reset();
- step.currentGotoRepeatCount = 0;
- step = step.$next;
- }
- _currentStep = _firstStep;
- }
-
- void retarget(dynamic target) {
- TweenStep step = _firstStep;
- while (step != null) {
- step.$target = target;
- step = step.$next;
- }
- }
-
- /// prototype code unnecesary.
-}
diff --git a/dep_lib/tween/tween_step.dart b/dep_lib/tween/tween_step.dart
deleted file mode 100644
index 3aacfb8..0000000
--- a/dep_lib/tween/tween_step.dart
+++ /dev/null
@@ -1,205 +0,0 @@
-import 'dart:math';
-
-import 'package:graphx/graphx/tween/gx_tween.dart';
-import 'package:graphx/graphx/tween/interp/float_interp.dart';
-import 'package:graphx/graphx/tween/tween_interp.dart';
-import 'package:graphx/graphx/tween/tween_sequence.dart';
-
-class TweenStep {
- TweenStep _poolNext;
- static TweenStep _poolFirst;
-
- static TweenStep getPoolInstance() {
- TweenStep seq;
- if (_poolFirst == null) {
- seq = TweenStep();
- } else {
- seq = _poolFirst;
- _poolFirst = _poolFirst._poolNext;
- seq._poolNext = null;
- }
- return seq;
- }
-
- TweenSequence $sequence;
- TweenStep $previous;
- TweenStep $next;
- double time;
- List $interps;
-
- String stepId = '';
- String gotoStepId = '';
- double duration;
- int gotoRepeatCount = 0;
- int currentGotoRepeatCount = 0;
- dynamic $target;
-
- String targetId;
- TweenInterp $lastInterp;
-
- Function $onComplete;
- List $onCompleteArgs;
- Function $onUpdate;
- List $onUpdateArgs;
- bool _empty;
-
- dynamic getTarget() => $target;
-
- TweenSequence getSequence() => $sequence;
-
- TweenStep() {
- time = duration = 0;
- _empty = true;
- }
-
- TweenStep addInterp(TweenInterp value) {
- $interps ??= [];
- duration = max(duration, value.duration);
- $lastInterp = value;
- $interps.add(value);
- _empty = false;
- return this;
- }
-
- TweenStep onUpdate(Function callback, [List args]) {
- $onUpdateArgs = args;
- $onUpdate = callback;
- return this;
- }
-
- TweenStep onComplete(Function callback, [List args]) {
- $onCompleteArgs = args;
- $onComplete = callback;
- return this;
- }
-
- void skip() {
- if ($interps != null) {
- for (var i in $interps) {
- i.setValue(i.getFinalValue());
- }
- }
- _finish();
- }
-
- void _finish() {
- print("finish and reset!");
- reset();
- if ($sequence == null) return;
- if (currentGotoRepeatCount < gotoRepeatCount) {
- currentGotoRepeatCount++;
- $sequence.goto($sequence.getStepById(gotoStepId));
- } else {
- /// reflection not possible.
- $onComplete?.call();
- currentGotoRepeatCount = 0;
- if ($sequence != null) {
- $sequence.nextStep();
- }
- }
- }
-
- void dispose() {
- $sequence = null;
- $previous = null;
- $next = null;
- $interps?.clear();
- $interps = null;
- $lastInterp = null;
- time = duration = 0;
- _empty = true;
- $onComplete = null;
- $onUpdate = null;
- targetId = '';
- $target = null;
- gotoStepId = '';
- gotoRepeatCount = 0;
- currentGotoRepeatCount = 0;
-
- if (GxTween.enablePooling) {
- /// back to pool
- _poolNext = _poolFirst;
- _poolFirst = this;
- }
- }
-
- double update(double delta) {
- var rest = 0.0;
- if ($interps != null) {
- print("Interps: ${$interps.length}");
- for (var i in $interps) {
- i.update(delta);
- }
- }
- time += delta;
- if (time > duration) {
- rest = time - duration;
- time = duration;
- }
- $onUpdate?.call();
- if (time > duration) {
- _finish();
- }
- return rest;
- // return 0;
- }
-
- TweenStep delay(double duration) {
- TweenStep step = _empty ? this : $sequence.addStep(getPoolInstance());
- step.duration = duration;
- _empty = false;
- step = $sequence.addStep(getPoolInstance());
- step.$target = $target;
- step.targetId = targetId;
- return step;
- }
-
- TweenStep id(String pid) {
- stepId = pid;
- return this;
- }
-
- TweenStep propF(String prop, double to, double duration, bool relative) {
- FloatInterp i = FloatInterp(this);
- i.relative = relative;
- i.property = prop;
- i.duration = duration;
- i.to = to;
- return addInterp(i);
- }
-
- TweenStep create(dynamic target) {
- var step = $sequence.addStep(getPoolInstance());
- if (target is String) {
- step.targetId = target as String;
- } else {
- step.$target = target;
- }
- return step;
- }
-
- TweenStep extend() {
- TweenStep step = $sequence.addStep(getPoolInstance());
- step.$target = $target;
- step.targetId = targetId;
- return step;
- }
-
- TweenStep goto(String stepId, int repeatCount) {
- gotoRepeatCount = repeatCount;
- gotoStepId = stepId;
- return this;
- }
-
- void reset() {
- time = 0;
- print("reset!");
- if ($interps != null) {
- for (var i in $interps) {
- i.reset();
- }
- }
- }
-
- /// prototype.
-}
diff --git a/dep_lib/tween/tween_timeline.dart b/dep_lib/tween/tween_timeline.dart
deleted file mode 100644
index 6f955ff..0000000
--- a/dep_lib/tween/tween_timeline.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-import 'package:graphx/graphx/tween/tween_sequence.dart';
-
-class TweenTimeline {
- bool $dirty = false;
- List $sequences = [];
-
- TweenTimeline();
-
- void addSequence(TweenSequence sequence) {
- sequence.timeline = this;
- $sequences.add(sequence);
- }
-
- void removeSequence(TweenSequence sequence) {
- $sequences?.remove(sequence);
- sequence?.dispose();
- }
-
- void abortAllSequences() {
- while ($sequences.length > 0) {
- TweenSequence sequence = $sequences.removeAt(0);
- sequence?.dispose();
- }
- }
-
- void update(double delta) {
- int index = 0;
- int len = $sequences.length;
- print('updating timeline... $len');
- while (index < len) {
- $sequences[index]?.update(delta);
- ++index;
- }
-
- // if ($dirty) {
- // index = $sequences.length;
- // while (index >= 0) {
- // TweenSequence sequence = $sequences[index];
- // if (sequence.isComplete()) {
- // removeSequence(sequence);
- // }
- // }
- // $dirty = false;
- // }
- }
-}
diff --git a/example/.gitignore b/example/.gitignore
new file mode 100644
index 0000000..f3c2053
--- /dev/null
+++ b/example/.gitignore
@@ -0,0 +1,44 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Web related
+lib/generated_plugin_registrant.dart
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Exceptions to above rules.
+!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
diff --git a/example/.metadata b/example/.metadata
new file mode 100644
index 0000000..15f78b4
--- /dev/null
+++ b/example/.metadata
@@ -0,0 +1,10 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: bbfbf1770cca2da7c82e887e4e4af910034800b6
+ channel: unknown
+
+project_type: app
diff --git a/android/.gitignore b/example/android/.gitignore
similarity index 100%
rename from android/.gitignore
rename to example/android/.gitignore
diff --git a/android/app/build.gradle b/example/android/app/build.gradle
similarity index 94%
rename from android/app/build.gradle
rename to example/android/app/build.gradle
index 4265c90..320be22 100644
--- a/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 29
+ compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@@ -38,9 +38,9 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "com.roipeker.graphx"
+ applicationId "com.example.example"
minSdkVersion 16
- targetSdkVersion 29
+ targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
diff --git a/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml
similarity index 89%
rename from android/app/src/debug/AndroidManifest.xml
rename to example/android/app/src/debug/AndroidManifest.xml
index be1b7df..c208884 100644
--- a/android/app/src/debug/AndroidManifest.xml
+++ b/example/android/app/src/debug/AndroidManifest.xml
@@ -1,5 +1,5 @@
+ package="com.example.example">
diff --git a/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
similarity index 80%
rename from android/app/src/main/AndroidManifest.xml
rename to example/android/app/src/main/AndroidManifest.xml
index b16a838..55ca830 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/example/android/app/src/main/AndroidManifest.xml
@@ -1,7 +1,13 @@
-
+
+
-
+
+
diff --git a/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml
similarity index 89%
rename from android/app/src/profile/AndroidManifest.xml
rename to example/android/app/src/profile/AndroidManifest.xml
index be1b7df..c208884 100644
--- a/android/app/src/profile/AndroidManifest.xml
+++ b/example/android/app/src/profile/AndroidManifest.xml
@@ -1,5 +1,5 @@
+ package="com.example.example">
diff --git a/android/build.gradle b/example/android/build.gradle
similarity index 100%
rename from android/build.gradle
rename to example/android/build.gradle
diff --git a/android/gradle.properties b/example/android/gradle.properties
similarity index 100%
rename from android/gradle.properties
rename to example/android/gradle.properties
index a673820..38c8d45 100644
--- a/android/gradle.properties
+++ b/example/android/gradle.properties
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
+android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
-android.enableR8=true
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from android/gradle/wrapper/gradle-wrapper.properties
rename to example/android/gradle/wrapper/gradle-wrapper.properties
diff --git a/android/settings.gradle b/example/android/settings.gradle
similarity index 100%
rename from android/settings.gradle
rename to example/android/settings.gradle
diff --git a/assets/_pumpit.json b/example/assets/_pumpit.json
similarity index 100%
rename from assets/_pumpit.json
rename to example/assets/_pumpit.json
diff --git a/assets/data.json b/example/assets/data.json
similarity index 100%
rename from assets/data.json
rename to example/assets/data.json
diff --git a/assets/game/exp2.jpg b/example/assets/game/exp2.jpg
similarity index 100%
rename from assets/game/exp2.jpg
rename to example/assets/game/exp2.jpg
diff --git a/assets/game/flare/aura.png b/example/assets/game/flare/aura.png
similarity index 100%
rename from assets/game/flare/aura.png
rename to example/assets/game/flare/aura.png
diff --git a/assets/game/flare/corona.png b/example/assets/game/flare/corona.png
similarity index 100%
rename from assets/game/flare/corona.png
rename to example/assets/game/flare/corona.png
diff --git a/assets/game/flare/darkball.png b/example/assets/game/flare/darkball.png
similarity index 100%
rename from assets/game/flare/darkball.png
rename to example/assets/game/flare/darkball.png
diff --git a/assets/game/flare/divine.png b/example/assets/game/flare/divine.png
similarity index 100%
rename from assets/game/flare/divine.png
rename to example/assets/game/flare/divine.png
diff --git a/assets/game/flare/extend.png b/example/assets/game/flare/extend.png
similarity index 100%
rename from assets/game/flare/extend.png
rename to example/assets/game/flare/extend.png
diff --git a/assets/game/flare/extendring.png b/example/assets/game/flare/extendring.png
similarity index 100%
rename from assets/game/flare/extendring.png
rename to example/assets/game/flare/extendring.png
diff --git a/assets/game/flare/flaredouble.png b/example/assets/game/flare/flaredouble.png
similarity index 100%
rename from assets/game/flare/flaredouble.png
rename to example/assets/game/flare/flaredouble.png
diff --git a/assets/game/flare/flarefour.png b/example/assets/game/flare/flarefour.png
similarity index 100%
rename from assets/game/flare/flarefour.png
rename to example/assets/game/flare/flarefour.png
diff --git a/assets/game/flare/hexagon.png b/example/assets/game/flare/hexagon.png
similarity index 100%
rename from assets/game/flare/hexagon.png
rename to example/assets/game/flare/hexagon.png
diff --git a/assets/game/flare/hexangle.png b/example/assets/game/flare/hexangle.png
similarity index 100%
rename from assets/game/flare/hexangle.png
rename to example/assets/game/flare/hexangle.png
diff --git a/assets/game/flare/i0.png b/example/assets/game/flare/i0.png
similarity index 100%
rename from assets/game/flare/i0.png
rename to example/assets/game/flare/i0.png
diff --git a/assets/game/flare/iris.png b/example/assets/game/flare/iris.png
similarity index 100%
rename from assets/game/flare/iris.png
rename to example/assets/game/flare/iris.png
diff --git a/assets/game/flare/nova.png b/example/assets/game/flare/nova.png
similarity index 100%
rename from assets/game/flare/nova.png
rename to example/assets/game/flare/nova.png
diff --git a/assets/game/flare/pearl.png b/example/assets/game/flare/pearl.png
similarity index 100%
rename from assets/game/flare/pearl.png
rename to example/assets/game/flare/pearl.png
diff --git a/assets/game/flare/pearlring.png b/example/assets/game/flare/pearlring.png
similarity index 100%
rename from assets/game/flare/pearlring.png
rename to example/assets/game/flare/pearlring.png
diff --git a/assets/game/flare/pollen.png b/example/assets/game/flare/pollen.png
similarity index 100%
rename from assets/game/flare/pollen.png
rename to example/assets/game/flare/pollen.png
diff --git a/assets/game/flare/quadangle.png b/example/assets/game/flare/quadangle.png
similarity index 100%
rename from assets/game/flare/quadangle.png
rename to example/assets/game/flare/quadangle.png
diff --git a/assets/game/flare/quadragon.png b/example/assets/game/flare/quadragon.png
similarity index 100%
rename from assets/game/flare/quadragon.png
rename to example/assets/game/flare/quadragon.png
diff --git a/assets/game/flare/ring.png b/example/assets/game/flare/ring.png
similarity index 100%
rename from assets/game/flare/ring.png
rename to example/assets/game/flare/ring.png
diff --git a/assets/game/flare/sparkle.png b/example/assets/game/flare/sparkle.png
similarity index 100%
rename from assets/game/flare/sparkle.png
rename to example/assets/game/flare/sparkle.png
diff --git a/assets/game/flare/star.png b/example/assets/game/flare/star.png
similarity index 100%
rename from assets/game/flare/star.png
rename to example/assets/game/flare/star.png
diff --git a/assets/game/flare/starring.png b/example/assets/game/flare/starring.png
similarity index 100%
rename from assets/game/flare/starring.png
rename to example/assets/game/flare/starring.png
diff --git a/assets/game/flare/sun.png b/example/assets/game/flare/sun.png
similarity index 100%
rename from assets/game/flare/sun.png
rename to example/assets/game/flare/sun.png
diff --git a/assets/game/flare/triangle.png b/example/assets/game/flare/triangle.png
similarity index 100%
rename from assets/game/flare/triangle.png
rename to example/assets/game/flare/triangle.png
diff --git a/assets/game/flare/trigon.png b/example/assets/game/flare/trigon.png
similarity index 100%
rename from assets/game/flare/trigon.png
rename to example/assets/game/flare/trigon.png
diff --git a/assets/game/flare/tunel.png b/example/assets/game/flare/tunel.png
similarity index 100%
rename from assets/game/flare/tunel.png
rename to example/assets/game/flare/tunel.png
diff --git a/assets/game/flare/tunelring.png b/example/assets/game/flare/tunelring.png
similarity index 100%
rename from assets/game/flare/tunelring.png
rename to example/assets/game/flare/tunelring.png
diff --git a/assets/game/flare/wave.png b/example/assets/game/flare/wave.png
similarity index 100%
rename from assets/game/flare/wave.png
rename to example/assets/game/flare/wave.png
diff --git a/assets/game/flare/wavering.png b/example/assets/game/flare/wavering.png
similarity index 100%
rename from assets/game/flare/wavering.png
rename to example/assets/game/flare/wavering.png
diff --git a/assets/game/flare/x0.png b/example/assets/game/flare/x0.png
similarity index 100%
rename from assets/game/flare/x0.png
rename to example/assets/game/flare/x0.png
diff --git a/assets/game/flare/x1.png b/example/assets/game/flare/x1.png
similarity index 100%
rename from assets/game/flare/x1.png
rename to example/assets/game/flare/x1.png
diff --git a/assets/game/flare/x2.png b/example/assets/game/flare/x2.png
similarity index 100%
rename from assets/game/flare/x2.png
rename to example/assets/game/flare/x2.png
diff --git a/assets/game/flare/x3.png b/example/assets/game/flare/x3.png
similarity index 100%
rename from assets/game/flare/x3.png
rename to example/assets/game/flare/x3.png
diff --git a/assets/game/flare/x4.png b/example/assets/game/flare/x4.png
similarity index 100%
rename from assets/game/flare/x4.png
rename to example/assets/game/flare/x4.png
diff --git a/assets/game/flare/x5.png b/example/assets/game/flare/x5.png
similarity index 100%
rename from assets/game/flare/x5.png
rename to example/assets/game/flare/x5.png
diff --git a/assets/game/flare/x6.png b/example/assets/game/flare/x6.png
similarity index 100%
rename from assets/game/flare/x6.png
rename to example/assets/game/flare/x6.png
diff --git a/assets/pumpit-s.json b/example/assets/pumpit-s.json
similarity index 100%
rename from assets/pumpit-s.json
rename to example/assets/pumpit-s.json
diff --git a/assets/pumpit.json b/example/assets/pumpit.json
similarity index 100%
rename from assets/pumpit.json
rename to example/assets/pumpit.json
diff --git a/assets/santorini.jpg b/example/assets/santorini.jpg
similarity index 100%
rename from assets/santorini.jpg
rename to example/assets/santorini.jpg
diff --git a/assets/sharona.json b/example/assets/sharona.json
similarity index 100%
rename from assets/sharona.json
rename to example/assets/sharona.json
diff --git a/assets/space.png b/example/assets/space.png
similarity index 100%
rename from assets/space.png
rename to example/assets/space.png
diff --git a/lib/demo_widgets/chart_demo.dart b/example/lib/demo_widgets/chart_demo.dart
similarity index 89%
rename from lib/demo_widgets/chart_demo.dart
rename to example/lib/demo_widgets/chart_demo.dart
index 1816af7..2e80b2a 100644
--- a/lib/demo_widgets/chart_demo.dart
+++ b/example/lib/demo_widgets/chart_demo.dart
@@ -1,42 +1,42 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
-import 'package:graphx/graphx/display/display_object_container.dart';
-import 'package:graphx/graphx/display/shape.dart';
-import 'package:graphx/graphx/display/sprite.dart';
-import 'package:graphx/graphx/display/static_text.dart';
-import 'package:graphx/graphx/widgets/graphx_widget.dart';
-import 'package:graphx/graphx/render/gx_icon.dart';
-import 'package:graphx/graphx/core/scene_controller.dart';
-import 'package:graphx/graphx/core/scene_painter.dart';
-import 'package:graphx/graphx/utils/math_utils.dart';
+import 'package:graphx/graphx.dart';
+
import 'dart:ui';
-import '../gameutils.dart';
+
+import 'chart_nico.dart';
class ChartDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ final size = MediaQuery.of(context).size;
return Scaffold(
- body: Center(
- child: Container(
- width: 400,
- height: 400,
+ body: SafeArea(
+ child: Container(
+ margin: const EdgeInsets.all(12.0),
+ child: SingleChildScrollView(
+ child: Column(children: [
+ const SizedBox(
+ height: 36.0,
+ ),
+ Container(
+ width: size.width,
+ // color: Colors.red,
+ decoration: BoxDecoration(border: Border.all()),
+ height: size.height / 2,
// color: Colors.grey,
- child: SceneBuilderWidget(
-// builder: () => SceneController.withLayers(back: DemoGraphXStats()),
- builder: () => SceneController.withLayers(back: _TestStats()),
- child: Align(
- alignment: Alignment(.9, .65),
- child: Opacity(
- opacity: .25,
- child: FlutterLogo(
- size: 64,
+ child: SceneBuilderWidget(
+ builder: () => SceneController.withLayers(
+ front: ChartNico(
+ Venta.generate(),
+ ),
),
),
),
- ),
+ ]),
),
),
- );
+ ));
}
}
@@ -53,12 +53,14 @@ class _TestStats extends RootScene {
super.ready();
stage.scene.core.resumeTicker();
stage.scene.needsRepaint = true;
- addChild(_MyGraph());
+ addChild(
+ _MyGraph(),
+ );
}
}
class _MyGraph extends Sprite {
- double w = 400;
+ double w = 404;
double h = 300;
_MyGraph() {
@@ -66,6 +68,8 @@ class _MyGraph extends Sprite {
}
void init() {
+ w = stage.stageWidth;
+ h = stage.stageHeight;
StaticText.defaultTextStyle = StaticText.getStyle(
color: Colors.grey.shade800,
fontSize: 12,
@@ -75,11 +79,15 @@ class _MyGraph extends Sprite {
var rowHeight = 50.0;
var mainTitle = StaticText(text: 'Average Sales per Person');
+
addChild(mainTitle);
- mainTitle.setTextStyle(StaticText.getStyle(
- color: Colors.black,
- fontSize: 16,
- ));
+
+ mainTitle.setTextStyle(
+ StaticText.getStyle(
+ color: Colors.black,
+ fontSize: 16,
+ ),
+ );
mainTitle.alignPivot(Alignment.bottomCenter);
mainTitle.x = w / 2;
mainTitle.y = -16;
diff --git a/example/lib/demo_widgets/chart_nico.dart b/example/lib/demo_widgets/chart_nico.dart
new file mode 100644
index 0000000..2d5eb5a
--- /dev/null
+++ b/example/lib/demo_widgets/chart_nico.dart
@@ -0,0 +1,151 @@
+import 'dart:math';
+import 'package:flutter/material.dart';
+import 'package:graphx/graphx.dart';
+
+class ChartNico extends RootScene {
+ final List lista;
+
+ ChartNico(this.lista);
+ @override
+ void init() {
+ owner.core.config.useTicker = true;
+ }
+
+ @override
+ void ready() {
+ super.ready();
+ owner.needsRepaint = true;
+ stage.scene.core.resumeTicker();
+ var obj = _Base(
+ lista,
+ );
+ addChild(obj);
+ obj.alignPivot(Alignment.bottomCenter);
+ obj.x = obj.pivotX;
+ obj.y = obj.pivotY;
+
+ var pic = obj.createPicture();
+ final shape1 = Shape();
+ addChild(shape1);
+ shape1.graphics.drawPicture(pic);
+ // obj.createImage().then((value) {
+ // });
+ obj.visible = false;
+ obj.removeFromParent(true);
+ // double counterScale = 0;
+ // stage.onEnterFrame.add(() {
+ // counterScale += .01;
+ // obj.rotation = sin(counterScale) * pi;
+ // });
+ }
+}
+
+class _Base extends Sprite {
+ final List lista;
+
+ double h;
+ double w;
+ _Base(this.lista) {
+ onAddedToStage.addOnce(init);
+ }
+
+ void init() {
+ final maxTotal = lista.fold(
+ 0.0,
+ (v, element) {
+ if (v < element.total) v = element.total;
+ return v;
+ },
+ );
+ print(maxTotal);
+
+ final padding = 40.0;
+ w = stage.stageWidth - (padding * 2);
+ h = stage.stageHeight - (padding * 2);
+ final lines = Shape();
+ final container = Sprite();
+ container.addChild(lines);
+
+ container.x = 40;
+ container.y = 40;
+
+ lines.graphics.lineStyle(
+ 5.0,
+ Colors.blueGrey.value,
+ );
+
+ final separatorX = w / lista.length;
+ lines.graphics.moveTo(0.0, 0.0);
+ lines.graphics.lineTo(0.0, h);
+
+ lines.graphics.lineTo(w, h);
+ lines.graphics.lineStyle(
+ 1,
+ Colors.blueGrey.value,
+ .5,
+ );
+ for (int i = 0; i < lista.length; i++) {
+ final tX = (i + 1) * separatorX;
+ lines.graphics.moveTo(tX, 0);
+ lines.graphics.lineTo(tX, h);
+ }
+ container.graphics.lineStyle(2, Colors.black.value, .9);
+
+ for (int i = 0; i < lista.length; i++) {
+ final dot = Shape();
+ dot.graphics.beginFill(Colors.red.value, .7);
+ dot.graphics
+ .drawCircle(
+ 0.0,
+ 0.0,
+ 5.0,
+ )
+ .endFill();
+ final tX = (i + 1) * separatorX;
+ container.addChild(dot);
+ final percent = 1 - (lista[i].total / maxTotal);
+ dot.y = percent * h;
+ dot.x = tX;
+ if (i == 0) {
+ container.graphics.moveTo(dot.x, dot.y);
+ } else {
+ container.graphics.lineTo(dot.x, dot.y);
+ }
+ }
+
+ addChild(container);
+ }
+}
+
+class Venta {
+ final DateTime date;
+ final double total;
+ final double iva;
+ final String cliente;
+
+ Venta({
+ this.date,
+ this.total,
+ this.iva,
+ this.cliente,
+ });
+ static List generate() {
+ final lista = [];
+ final rng = Random();
+ for (int i = 1; i <= 20; i++) {
+ lista.add(
+ Venta(
+ cliente: 'cliente-$i',
+ total: rng.nextInt(100).toDouble(),
+ iva: rng.nextInt(100).toDouble(),
+ date: DateTime.now().subtract(
+ Duration(days: 30 * i),
+ ),
+ ),
+ );
+ }
+ lista.sort((v1, v2) => v1.date.millisecondsSinceEpoch);
+ lista.forEach((element) => element.date.toIso8601String());
+ return lista;
+ }
+}
diff --git a/lib/demos/altitud_indicator/altitude_indicator_main.dart b/example/lib/demos/altitud_indicator/altitude_indicator_main.dart
similarity index 98%
rename from lib/demos/altitud_indicator/altitude_indicator_main.dart
rename to example/lib/demos/altitud_indicator/altitude_indicator_main.dart
index dfbc68b..018152b 100644
--- a/lib/demos/altitud_indicator/altitude_indicator_main.dart
+++ b/example/lib/demos/altitud_indicator/altitude_indicator_main.dart
@@ -2,8 +2,8 @@ import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/utils/math_utils.dart';
+import 'package:graphx/graphx.dart';
+
class DemoAltitudIndicatorMain extends RootScene {
@override
@@ -356,7 +356,7 @@ class DemoAltitudIndicatorMain extends RootScene {
..graphics.beginFill(color).drawRect(0, 0, width, height).endFill();
}
- IAnimatable buildArrow({
+ DisplayObject buildArrow({
double height = 45.0,
int color = 0xffffff,
double linkThickness = -1,
diff --git a/lib/demos/altitud_indicator/altitude_indicator_widget.dart b/example/lib/demos/altitud_indicator/altitude_indicator_widget.dart
similarity index 100%
rename from lib/demos/altitud_indicator/altitude_indicator_widget.dart
rename to example/lib/demos/altitud_indicator/altitude_indicator_widget.dart
diff --git a/lib/demos/base_demo_widget.dart b/example/lib/demos/base_demo_widget.dart
similarity index 78%
rename from lib/demos/base_demo_widget.dart
rename to example/lib/demos/base_demo_widget.dart
index 54e0e92..17c82e3 100644
--- a/lib/demos/base_demo_widget.dart
+++ b/example/lib/demos/base_demo_widget.dart
@@ -1,8 +1,5 @@
import 'package:flutter/material.dart';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/widgets/graphx_widget.dart';
-
-import 'simple_game/simple_game_main.dart';
+import 'package:graphx/graphx.dart';
class DemoSceneTester extends StatelessWidget {
final RootScene backScene;
diff --git a/lib/demos/demo_particles/demo_particles_main.dart b/example/lib/demos/demo_particles/demo_particles_main.dart
similarity index 93%
rename from lib/demos/demo_particles/demo_particles_main.dart
rename to example/lib/demos/demo_particles/demo_particles_main.dart
index b6e679d..16cfda2 100644
--- a/lib/demos/demo_particles/demo_particles_main.dart
+++ b/example/lib/demos/demo_particles/demo_particles_main.dart
@@ -1,14 +1,9 @@
import 'dart:math';
import 'package:flutter/material.dart';
-import 'package:graphx/gameutils.dart';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/render/filters/color_filter.dart';
-import 'package:graphx/graphx/render/graphics.dart';
-import 'package:graphx/graphx/render/movie_clip.dart';
-import 'package:graphx/graphx/render/particles/simple_particle_system.dart';
-import 'package:graphx/graphx/utils/math_utils.dart';
-import 'package:graphx/graphx/utils/texture_utils.dart';
+import 'package:graphx/src/gameutils/gameutils.dart';
+import 'package:graphx/graphx.dart';
+
class DemoParticlesMain extends RootScene {
@override
diff --git a/lib/demos/graphics_api_demo/demo_graphx_stats.dart b/example/lib/demos/graphics_api_demo/demo_graphx_stats.dart
similarity index 95%
rename from lib/demos/graphics_api_demo/demo_graphx_stats.dart
rename to example/lib/demos/graphics_api_demo/demo_graphx_stats.dart
index c20d091..31c9f7d 100644
--- a/lib/demos/graphics_api_demo/demo_graphx_stats.dart
+++ b/example/lib/demos/graphics_api_demo/demo_graphx_stats.dart
@@ -1,14 +1,9 @@
import 'dart:ui';
import 'package:flutter/material.dart';
-import 'package:graphx/gameutils.dart';
-import 'package:graphx/graphx/display/display_object_container.dart';
-import 'package:graphx/graphx/display/shape.dart';
-import 'package:graphx/graphx/display/sprite.dart';
-import 'package:graphx/graphx/display/static_text.dart';
-import 'package:graphx/graphx/render/gx_icon.dart';
-import 'package:graphx/graphx/core/scene_painter.dart';
-import 'package:graphx/graphx/utils/math_utils.dart';
+import 'package:graphx/src/gameutils/gameutils.dart';
+import 'package:graphx/graphx.dart';
+
class DemoGraphXStats extends RootScene {
@override
diff --git a/lib/demos/graphics_api_demo/demo_triangles.dart b/example/lib/demos/graphics_api_demo/demo_triangles.dart
similarity index 92%
rename from lib/demos/graphics_api_demo/demo_triangles.dart
rename to example/lib/demos/graphics_api_demo/demo_triangles.dart
index 8f334d9..7fdf8f5 100644
--- a/lib/demos/graphics_api_demo/demo_triangles.dart
+++ b/example/lib/demos/graphics_api_demo/demo_triangles.dart
@@ -2,7 +2,7 @@ import 'dart:typed_data';
import 'dart:ui';
import 'package:flutter/material.dart';
-import 'package:graphx/graphx/display/sprite.dart';
+import 'package:graphx/graphx.dart';
class DemoTriangles extends Sprite {
DemoTriangles() {
diff --git a/lib/demos/graphics_api_demo/graphics_api_demo.dart b/example/lib/demos/graphics_api_demo/graphics_api_demo.dart
similarity index 95%
rename from lib/demos/graphics_api_demo/graphics_api_demo.dart
rename to example/lib/demos/graphics_api_demo/graphics_api_demo.dart
index b3ce0ab..3e46ad1 100644
--- a/lib/demos/graphics_api_demo/graphics_api_demo.dart
+++ b/example/lib/demos/graphics_api_demo/graphics_api_demo.dart
@@ -2,16 +2,10 @@ import 'dart:math';
import 'dart:ui';
import 'package:flutter/material.dart';
-import 'package:graphx/demos/graphics_api_demo/demo_triangles.dart';
-import 'package:graphx/graphx/display/bitmap.dart';
-import 'package:graphx/graphx/display/shape.dart';
-import 'package:graphx/graphx/display/sprite.dart';
-import 'package:graphx/graphx/display/static_text.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/render/graphics.dart';
-import 'package:graphx/graphx/render/gx_icon.dart';
-import 'package:graphx/graphx/core/scene_painter.dart';
-import 'package:graphx/graphx/utils/math_utils.dart';
+import 'package:graphx/graphx.dart';
+
+import 'demo_triangles.dart';
+
class GraphicsApiDemo extends RootScene {
@override
diff --git a/lib/demos/graphics_api_demo/graphx_preloader.dart b/example/lib/demos/graphics_api_demo/graphx_preloader.dart
similarity index 81%
rename from lib/demos/graphics_api_demo/graphx_preloader.dart
rename to example/lib/demos/graphics_api_demo/graphx_preloader.dart
index c5b6632..3d64fca 100644
--- a/lib/demos/graphics_api_demo/graphx_preloader.dart
+++ b/example/lib/demos/graphics_api_demo/graphx_preloader.dart
@@ -1,7 +1,7 @@
import 'dart:ui';
-import 'package:graphx/graphx/display/shape.dart';
-import 'package:graphx/graphx/utils/math_utils.dart';
+import 'package:graphx/graphx.dart';
+
class GraphxPreloader extends Shape {
double borderW = 4, radius = 40, progress = .5;
diff --git a/lib/demos/juggler_demos/juggler_demo_main.dart b/example/lib/demos/juggler_demos/juggler_demo_main.dart
similarity index 93%
rename from lib/demos/juggler_demos/juggler_demo_main.dart
rename to example/lib/demos/juggler_demos/juggler_demo_main.dart
index 6e134dc..e5f80bb 100644
--- a/lib/demos/juggler_demos/juggler_demo_main.dart
+++ b/example/lib/demos/juggler_demos/juggler_demo_main.dart
@@ -1,4 +1,5 @@
-import 'package:graphx/graphx/core/graphx.dart';
+import 'package:graphx/graphx.dart';
+
class JugglerDemoMain extends RootScene {
@override
diff --git a/lib/demos/simple_game/game_world.dart b/example/lib/demos/simple_game/game_world.dart
similarity index 87%
rename from lib/demos/simple_game/game_world.dart
rename to example/lib/demos/simple_game/game_world.dart
index eeff15f..7bef3fe 100644
--- a/lib/demos/simple_game/game_world.dart
+++ b/example/lib/demos/simple_game/game_world.dart
@@ -1,18 +1,10 @@
-import 'package:flutter/cupertino.dart';
+
+
import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-import 'package:graphx/demos/simple_game/objects/bullet.dart';
-import 'package:graphx/gameutils.dart';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/render/graphics.dart';
-import 'package:graphx/graphx/render/movie_clip.dart';
-import 'package:graphx/graphx/render/particles/simple_particle_system.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
-import 'package:graphx/graphx/utils/math_utils.dart';
-import 'package:graphx/graphx/utils/pools.dart';
-import 'package:graphx/graphx/utils/texture_utils.dart';
+import 'package:graphx/graphx.dart';
import 'objects/background.dart';
+import 'objects/bullet.dart';
import 'objects/enemy.dart';
import 'objects/ship.dart';
@@ -99,14 +91,14 @@ class GameWorld extends Sprite {
constrainInBounds(ship);
}
- void constrainInBounds(IAnimatable obj) {
+ void constrainInBounds(DisplayObject obj) {
if (obj.x > stage.stageWidth) obj.x = 0;
if (obj.x < 0) obj.x = stage.stageWidth;
if (obj.y > stage.stageHeight) obj.y = 0;
if (obj.y < 0) obj.y = stage.stageHeight;
}
- bool isOutBounds(IAnimatable obj, [double radius = 0]) {
+ bool isOutBounds(DisplayObject obj, [double radius = 0]) {
return obj.x > stage.stageWidth + radius ||
obj.x < -radius ||
obj.y > stage.stageHeight + radius ||
diff --git a/lib/demos/simple_game/objects/background.dart b/example/lib/demos/simple_game/objects/background.dart
similarity index 77%
rename from lib/demos/simple_game/objects/background.dart
rename to example/lib/demos/simple_game/objects/background.dart
index 3e13c7f..79f7481 100644
--- a/lib/demos/simple_game/objects/background.dart
+++ b/example/lib/demos/simple_game/objects/background.dart
@@ -1,12 +1,9 @@
-import 'dart:math';
-import 'dart:ui';
import 'package:flutter/material.dart';
-import 'package:graphx/demos/simple_game/utils/game_mixins.dart';
-import 'package:graphx/graphx/display/sprite.dart';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
-import 'package:graphx/graphx/utils/assets_loader.dart';
+import 'package:graphx/graphx.dart';
+
+import '../utils/game_mixins.dart';
+
class GameBackground extends Sprite with GameObject {
Bitmap bg;
diff --git a/lib/demos/simple_game/objects/bullet.dart b/example/lib/demos/simple_game/objects/bullet.dart
similarity index 81%
rename from lib/demos/simple_game/objects/bullet.dart
rename to example/lib/demos/simple_game/objects/bullet.dart
index ece34fd..72d85ad 100644
--- a/lib/demos/simple_game/objects/bullet.dart
+++ b/example/lib/demos/simple_game/objects/bullet.dart
@@ -1,9 +1,7 @@
-import 'dart:math';
-import 'package:graphx/demos/simple_game/utils/game_mixins.dart';
-import 'package:graphx/gameutils.dart';
-import 'package:graphx/graphx/core/graphx.dart';
+import 'package:graphx/graphx.dart';
+import '../utils/game_mixins.dart';
import 'ship.dart';
class Bullet with GameObject {
diff --git a/lib/demos/simple_game/objects/enemy.dart b/example/lib/demos/simple_game/objects/enemy.dart
similarity index 79%
rename from lib/demos/simple_game/objects/enemy.dart
rename to example/lib/demos/simple_game/objects/enemy.dart
index 15a9766..ab6f7da 100644
--- a/lib/demos/simple_game/objects/enemy.dart
+++ b/example/lib/demos/simple_game/objects/enemy.dart
@@ -1,9 +1,7 @@
-import 'dart:math';
-import 'package:graphx/demos/simple_game/utils/game_mixins.dart';
-import 'package:graphx/gameutils.dart';
-import 'package:graphx/graphx/display/sprite.dart';
-import 'package:graphx/graphx/core/graphx.dart';
+import 'package:graphx/graphx.dart';
+
+import '../utils/game_mixins.dart';
class BasicEnemy extends Sprite with GameObject {
Shape _shape;
diff --git a/lib/demos/simple_game/objects/ship.dart b/example/lib/demos/simple_game/objects/ship.dart
similarity index 95%
rename from lib/demos/simple_game/objects/ship.dart
rename to example/lib/demos/simple_game/objects/ship.dart
index 96d77f3..3da3f07 100644
--- a/lib/demos/simple_game/objects/ship.dart
+++ b/example/lib/demos/simple_game/objects/ship.dart
@@ -2,10 +2,9 @@ import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
-import 'package:graphx/demos/simple_game/utils/game_mixins.dart';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/utils/pools.dart';
+import 'package:graphx/graphx.dart';
+import '../utils/game_mixins.dart';
import 'bullet.dart';
class Ship extends Sprite with GameObject {
@@ -85,7 +84,7 @@ class Ship extends Sprite with GameObject {
var si = sin(shieldExpansion);
// var si2 = sin(shieldExpansion / 1.2);
- void _transformShield(IAnimatable obj, double sino, [double rotDir]) {
+ void _transformShield(DisplayObject obj, double sino, [double rotDir]) {
var p = .5 + sino / 2;
obj.alpha = 0.13 + (1 - p) * .45;
// obj.scale = 0.8 + p * .4;
diff --git a/lib/demos/simple_game/simple_game_demo.dart b/example/lib/demos/simple_game/simple_game_demo.dart
similarity index 80%
rename from lib/demos/simple_game/simple_game_demo.dart
rename to example/lib/demos/simple_game/simple_game_demo.dart
index 10f8e7b..acc2c09 100644
--- a/lib/demos/simple_game/simple_game_demo.dart
+++ b/example/lib/demos/simple_game/simple_game_demo.dart
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
-import 'package:graphx/graphx/widgets/graphx_widget.dart';
-import 'package:graphx/graphx/core/scene_controller.dart';
+import 'package:graphx/graphx.dart';
+
import 'simple_game_main.dart';
diff --git a/lib/demos/simple_game/simple_game_main.dart b/example/lib/demos/simple_game/simple_game_main.dart
similarity index 83%
rename from lib/demos/simple_game/simple_game_main.dart
rename to example/lib/demos/simple_game/simple_game_main.dart
index 7ae06e8..fa4e40b 100644
--- a/lib/demos/simple_game/simple_game_main.dart
+++ b/example/lib/demos/simple_game/simple_game_main.dart
@@ -1,6 +1,5 @@
-import 'package:graphx/gameutils.dart';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/utils/texture_utils.dart';
+
+import 'package:graphx/graphx.dart';
import 'game_world.dart';
diff --git a/lib/demos/simple_game/sprites/explosion.dart b/example/lib/demos/simple_game/sprites/explosion.dart
similarity index 65%
rename from lib/demos/simple_game/sprites/explosion.dart
rename to example/lib/demos/simple_game/sprites/explosion.dart
index ff51d38..be71b07 100644
--- a/lib/demos/simple_game/sprites/explosion.dart
+++ b/example/lib/demos/simple_game/sprites/explosion.dart
@@ -1,4 +1,4 @@
-import 'package:graphx/graphx/core/graphx.dart';
+import 'package:graphx/graphx.dart';
class GameExplosion extends Sprite {
GameExplosion() {
diff --git a/lib/demos/simple_game/utils/game_mixins.dart b/example/lib/demos/simple_game/utils/game_mixins.dart
similarity index 53%
rename from lib/demos/simple_game/utils/game_mixins.dart
rename to example/lib/demos/simple_game/utils/game_mixins.dart
index 009b25f..892c003 100644
--- a/lib/demos/simple_game/utils/game_mixins.dart
+++ b/example/lib/demos/simple_game/utils/game_mixins.dart
@@ -1,4 +1,4 @@
-import 'package:graphx/demos/simple_game/game_world.dart';
+import '../game_world.dart';
mixin GameObject {
GameWorld get world => GameWorld.instance;
diff --git a/lib/demos/svg_demo/svg_assets.dart b/example/lib/demos/svg_demo/svg_assets.dart
similarity index 100%
rename from lib/demos/svg_demo/svg_assets.dart
rename to example/lib/demos/svg_demo/svg_assets.dart
diff --git a/lib/demos/svg_demo/svg_utils.dart b/example/lib/demos/svg_demo/svg_utils.dart
similarity index 82%
rename from lib/demos/svg_demo/svg_utils.dart
rename to example/lib/demos/svg_demo/svg_utils.dart
index ec2d0a0..9bd3008 100644
--- a/lib/demos/svg_demo/svg_utils.dart
+++ b/example/lib/demos/svg_demo/svg_utils.dart
@@ -1,13 +1,12 @@
+
import 'dart:ui';
import 'package:flutter_svg/flutter_svg.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
-import 'package:graphx/graphx/render/graphics.dart';
-import 'package:graphx/graphx/render/svg_shape.dart';
+import 'package:graphx/graphx.dart';
class SvgUtils {
static Future svgStringToPicutre(String rawSvg) async {
- final DrawableRoot svgRoot = await svg.fromSvgString(rawSvg, rawSvg);
+ final svgRoot = await svg.fromSvgString(rawSvg, rawSvg);
print(svgRoot.viewport.width);
return svgRoot.toPicture();
}
diff --git a/lib/demos/svg_demo/test_svg.dart b/example/lib/demos/svg_demo/test_svg.dart
similarity index 93%
rename from lib/demos/svg_demo/test_svg.dart
rename to example/lib/demos/svg_demo/test_svg.dart
index 7af39e7..eacb156 100644
--- a/lib/demos/svg_demo/test_svg.dart
+++ b/example/lib/demos/svg_demo/test_svg.dart
@@ -1,8 +1,9 @@
import 'package:flutter/material.dart';
-import 'package:graphx/demos/svg_demo/svg_assets.dart';
-import 'package:graphx/demos/svg_demo/svg_utils.dart';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/render/svg_shape.dart';
+import 'package:graphx/graphx.dart';
+
+import 'svg_assets.dart';
+import 'svg_utils.dart';
+
class TestSVGMain extends RootScene {
@override
@@ -99,9 +100,9 @@ class TestSVGMain extends RootScene {
} else if (e.arrowRight) {
moveBlendMode(1);
} else if (e.arrowDown) {
- print("DPW!");
+ print('DPW!');
isBlend1 = !isBlend1;
- print("Current blend is: ${isBlend1 ? 1 : 2}");
+ print('Current blend is: ${isBlend1 ? 1 : 2}');
}
});
diff --git a/lib/demos/test1.dart b/example/lib/demos/test1.dart
similarity index 97%
rename from lib/demos/test1.dart
rename to example/lib/demos/test1.dart
index 092c45e..fa80273 100644
--- a/lib/demos/test1.dart
+++ b/example/lib/demos/test1.dart
@@ -1,8 +1,6 @@
-import 'dart:math';
import 'package:flutter/material.dart';
-import 'package:graphx/graphx/display/shape.dart';
-import 'package:graphx/graphx/core/scene_painter.dart';
+import 'package:graphx/graphx.dart';
class MainFrontScene extends RootScene {
@override
diff --git a/lib/demos/test2.dart b/example/lib/demos/test2.dart
similarity index 96%
rename from lib/demos/test2.dart
rename to example/lib/demos/test2.dart
index 1fe5615..2adb41f 100644
--- a/lib/demos/test2.dart
+++ b/example/lib/demos/test2.dart
@@ -1,9 +1,6 @@
import 'package:flutter/material.dart';
-import 'package:graphx/graphx/display/shape.dart';
-import 'package:graphx/graphx/display/sprite.dart';
-import 'package:graphx/graphx/core/scene_painter.dart';
-import 'package:graphx/graphx/utils/math_utils.dart';
-import 'package:graphx/graphx/utils/pools.dart';
+import 'package:graphx/graphx.dart';
+
class Test2Scene extends RootScene {
@override
diff --git a/lib/demos/test3.dart b/example/lib/demos/test3.dart
similarity index 89%
rename from lib/demos/test3.dart
rename to example/lib/demos/test3.dart
index 5be6b56..1a5a2f4 100644
--- a/lib/demos/test3.dart
+++ b/example/lib/demos/test3.dart
@@ -1,11 +1,8 @@
import 'dart:math';
import 'package:flutter/material.dart';
-import 'package:graphx/gameutils.dart';
-import 'package:graphx/graphx/display/shape.dart';
-import 'package:graphx/graphx/display/sprite.dart';
-import 'package:graphx/graphx/core/scene_painter.dart';
-import 'package:graphx/graphx/utils/math_utils.dart';
+import 'package:graphx/graphx.dart';
+import 'package:graphx/src/gameutils/gameutils.dart';
class Test3Scene extends RootScene {
@override
diff --git a/lib/demos/test_charts.dart b/example/lib/demos/test_charts.dart
similarity index 92%
rename from lib/demos/test_charts.dart
rename to example/lib/demos/test_charts.dart
index 444ee0d..e79c0b2 100644
--- a/lib/demos/test_charts.dart
+++ b/example/lib/demos/test_charts.dart
@@ -1,16 +1,5 @@
-import 'dart:math';
-import 'dart:ui';
-
import 'package:flutter/material.dart';
-import 'package:graphx/graphx/display/bitmap.dart';
-import 'package:graphx/graphx/display/shape.dart';
-import 'package:graphx/graphx/display/sprite.dart';
-import 'package:graphx/graphx/display/static_text.dart';
-import 'package:graphx/graphx/events/pointer_data.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/render/gx_icon.dart';
-import 'package:graphx/graphx/core/scene_painter.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
+import 'package:graphx/graphx.dart';
class GraphChartDemo extends RootScene {
@override
@@ -35,7 +24,7 @@ class GraphChartDemo extends RootScene {
/// clips the stage area.
stage.maskBounds = true;
- var icono = GxIcon(Icons.add_location_alt, Colors.white.value, 48.0);
+ var icono = GxIcon(Icons.location_city, Colors.white.value, 48.0);
icono.setShadow(Shadow(color: Colors.black38, blurRadius: 4));
// addChild(icono);
// icono.setPosition(100, 100);
diff --git a/lib/main.dart b/example/lib/main.dart
similarity index 51%
rename from lib/main.dart
rename to example/lib/main.dart
index 05a5f9c..6b8ca11 100644
--- a/lib/main.dart
+++ b/example/lib/main.dart
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
+import 'demo_widgets/chart_demo.dart';
import 'demos/base_demo_widget.dart';
import 'demos/juggler_demos/juggler_demo_main.dart';
-//import 'demos/audio_visuals/audio_visuals_demo.dart';
+import 'demos/simple_game/simple_game_demo.dart';
void main() {
runApp(MyApp());
-// runApp(AltitudeIndicatorWidget());
}
class MyApp extends StatelessWidget {
@@ -19,18 +19,18 @@ class MyApp extends StatelessWidget {
),
// home: MyHomePage(title: 'Flutter Demo Home Page'),
// home: MyChartPage(),
-// home: ChartDemo(),
+ // home: ChartDemo(),
// home: AudioVisualDemo(),
-// home: SimpleGameDemo(),
- home: Scaffold(
- body: DemoSceneTester(
-// backScene: TestSVGMain(),
-// backScene: DemoParticlesMain(),
-// backScene: DemoParticlesMain(),
-// backScene: DemoAltitudIndicatorMain(),
- backScene: JugglerDemoMain(),
- ),
- ),
+ home: SimpleGameDemo(),
+// home: Scaffold(
+// body: DemoSceneTester(
+// // // backScene: TestSVGMain(),
+// // // backScene: DemoParticlesMain(),
+// // // backScene: DemoParticlesMain(),
+// // // backScene: DemoAltitudIndicatorMain(),
+// backScene: JugglerDemoMain(),
+ // ),
+ // ),
);
}
}
diff --git a/macos/.gitignore b/example/macos/.gitignore
similarity index 100%
rename from macos/.gitignore
rename to example/macos/.gitignore
diff --git a/example/macos/Flutter/Flutter-Debug.xcconfig b/example/macos/Flutter/Flutter-Debug.xcconfig
new file mode 100644
index 0000000..c2efd0b
--- /dev/null
+++ b/example/macos/Flutter/Flutter-Debug.xcconfig
@@ -0,0 +1 @@
+#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/example/macos/Flutter/Flutter-Release.xcconfig b/example/macos/Flutter/Flutter-Release.xcconfig
new file mode 100644
index 0000000..c2efd0b
--- /dev/null
+++ b/example/macos/Flutter/Flutter-Release.xcconfig
@@ -0,0 +1 @@
+#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj
similarity index 86%
rename from macos/Runner.xcodeproj/project.pbxproj
rename to example/macos/Runner.xcodeproj/project.pbxproj
index 57bd2a6..331479d 100644
--- a/macos/Runner.xcodeproj/project.pbxproj
+++ b/example/macos/Runner.xcodeproj/project.pbxproj
@@ -28,7 +28,6 @@
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; };
33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 52CF6174653E363A79A44DE0 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CF45881ADE8F77121E569E18 /* Pods_Runner.framework */; };
D73912F022F37F9E000D13A0 /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; };
D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
@@ -61,7 +60,7 @@
/* Begin PBXFileReference section */
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; };
- 33CC10ED2044A3C60003C045 /* graphx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = graphx.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
@@ -75,12 +74,8 @@
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
- 8289425535CFD3F14BFF898D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
- 94C362964FBC96695B191B8F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
- CF45881ADE8F77121E569E18 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D73912EF22F37F9E000D13A0 /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/ephemeral/App.framework; sourceTree = SOURCE_ROOT; };
- F0418ADFB307CE65AA08363D /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -90,23 +85,12 @@
files = (
D73912F022F37F9E000D13A0 /* App.framework in Frameworks */,
33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */,
- 52CF6174653E363A79A44DE0 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- 2B0ED3C74341709D14940835 /* Pods */ = {
- isa = PBXGroup;
- children = (
- 8289425535CFD3F14BFF898D /* Pods-Runner.debug.xcconfig */,
- 94C362964FBC96695B191B8F /* Pods-Runner.release.xcconfig */,
- F0418ADFB307CE65AA08363D /* Pods-Runner.profile.xcconfig */,
- );
- path = Pods;
- sourceTree = "";
- };
33BA886A226E78AF003329D5 /* Configs */ = {
isa = PBXGroup;
children = (
@@ -125,14 +109,13 @@
33CEB47122A05771004F2AC0 /* Flutter */,
33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */,
- 2B0ED3C74341709D14940835 /* Pods */,
);
sourceTree = "";
};
33CC10EE2044A3C60003C045 /* Products */ = {
isa = PBXGroup;
children = (
- 33CC10ED2044A3C60003C045 /* graphx.app */,
+ 33CC10ED2044A3C60003C045 /* example.app */,
);
name = Products;
sourceTree = "";
@@ -177,7 +160,6 @@
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
isa = PBXGroup;
children = (
- CF45881ADE8F77121E569E18 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "";
@@ -189,7 +171,6 @@
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- 6EDA13C336776D9441C06154 /* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
@@ -203,7 +184,7 @@
);
name = Runner;
productName = Runner;
- productReference = 33CC10ED2044A3C60003C045 /* graphx.app */;
+ productReference = 33CC10ED2044A3C60003C045 /* example.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@@ -213,7 +194,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
- LastUpgradeCheck = 1200;
+ LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "The Flutter Authors";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
@@ -299,29 +280,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
- };
- 6EDA13C336776D9441C06154 /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
+ shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh\ntouch Flutter/ephemeral/tripwire\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -383,7 +342,6 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CODE_SIGN_IDENTITY = "-";
@@ -413,7 +371,6 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
- CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
@@ -425,7 +382,6 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
- MACOSX_DEPLOYMENT_TARGET = 10.14;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
@@ -463,7 +419,6 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CODE_SIGN_IDENTITY = "-";
@@ -517,7 +472,6 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CODE_SIGN_IDENTITY = "-";
@@ -547,7 +501,6 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
- CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
@@ -559,7 +512,6 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
- MACOSX_DEPLOYMENT_TARGET = 10.14;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
@@ -573,7 +525,6 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
- CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
@@ -585,7 +536,6 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
- MACOSX_DEPLOYMENT_TARGET = 10.14;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
similarity index 100%
rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
rename to example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
similarity index 91%
rename from macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
rename to example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 17064d1..df12c33 100644
--- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
@@ -27,15 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
-
-
-
-
@@ -48,6 +39,17 @@
+
+
+
+
+
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/macos/Runner.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
rename to example/macos/Runner.xcworkspace/contents.xcworkspacedata
diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
similarity index 100%
rename from ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
rename to example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
diff --git a/macos/Runner/AppDelegate.swift b/example/macos/Runner/AppDelegate.swift
similarity index 100%
rename from macos/Runner/AppDelegate.swift
rename to example/macos/Runner/AppDelegate.swift
diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
similarity index 100%
rename from macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
rename to example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
similarity index 100%
rename from macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
rename to example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
similarity index 100%
rename from macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
rename to example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
similarity index 100%
rename from macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
rename to example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
similarity index 100%
rename from macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
rename to example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
similarity index 100%
rename from macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
rename to example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
similarity index 100%
rename from macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
rename to example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
similarity index 100%
rename from macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
rename to example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/example/macos/Runner/Base.lproj/MainMenu.xib
similarity index 100%
rename from macos/Runner/Base.lproj/MainMenu.xib
rename to example/macos/Runner/Base.lproj/MainMenu.xib
diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/example/macos/Runner/Configs/AppInfo.xcconfig
similarity index 76%
rename from macos/Runner/Configs/AppInfo.xcconfig
rename to example/macos/Runner/Configs/AppInfo.xcconfig
index a8471b8..1c34a70 100644
--- a/macos/Runner/Configs/AppInfo.xcconfig
+++ b/example/macos/Runner/Configs/AppInfo.xcconfig
@@ -5,10 +5,10 @@
// 'flutter create' template.
// The application's name. By default this is also the title of the Flutter window.
-PRODUCT_NAME = graphx
+PRODUCT_NAME = example
// The application's bundle identifier
-PRODUCT_BUNDLE_IDENTIFIER = com.roipeker.graphx
+PRODUCT_BUNDLE_IDENTIFIER = com.example.example
// The copyright displayed in application information
-PRODUCT_COPYRIGHT = Copyright © 2020 com.roipeker. All rights reserved.
+PRODUCT_COPYRIGHT = Copyright © 2020 com.example. All rights reserved.
diff --git a/macos/Runner/Configs/Debug.xcconfig b/example/macos/Runner/Configs/Debug.xcconfig
similarity index 100%
rename from macos/Runner/Configs/Debug.xcconfig
rename to example/macos/Runner/Configs/Debug.xcconfig
diff --git a/macos/Runner/Configs/Release.xcconfig b/example/macos/Runner/Configs/Release.xcconfig
similarity index 100%
rename from macos/Runner/Configs/Release.xcconfig
rename to example/macos/Runner/Configs/Release.xcconfig
diff --git a/macos/Runner/Configs/Warnings.xcconfig b/example/macos/Runner/Configs/Warnings.xcconfig
similarity index 100%
rename from macos/Runner/Configs/Warnings.xcconfig
rename to example/macos/Runner/Configs/Warnings.xcconfig
diff --git a/macos/Runner/DebugProfile.entitlements b/example/macos/Runner/DebugProfile.entitlements
similarity index 64%
rename from macos/Runner/DebugProfile.entitlements
rename to example/macos/Runner/DebugProfile.entitlements
index 91f41fb..dddb8a3 100644
--- a/macos/Runner/DebugProfile.entitlements
+++ b/example/macos/Runner/DebugProfile.entitlements
@@ -6,12 +6,6 @@
com.apple.security.cs.allow-jit
- com.apple.security.files.downloads.read-write
-
- com.apple.security.files.user-selected.read-write
-
- com.apple.security.network.client
-
com.apple.security.network.server
diff --git a/macos/Runner/Info.plist b/example/macos/Runner/Info.plist
similarity index 90%
rename from macos/Runner/Info.plist
rename to example/macos/Runner/Info.plist
index 9686de5..4789daa 100644
--- a/macos/Runner/Info.plist
+++ b/example/macos/Runner/Info.plist
@@ -28,11 +28,5 @@
MainMenu
NSPrincipalClass
NSApplication
- NSAppTransportSecurity
-
- NSAllowsArbitraryLoads
-
-
-
diff --git a/macos/Runner/MainFlutterWindow.swift b/example/macos/Runner/MainFlutterWindow.swift
similarity index 100%
rename from macos/Runner/MainFlutterWindow.swift
rename to example/macos/Runner/MainFlutterWindow.swift
diff --git a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/macos/Runner/Release.entitlements
similarity index 82%
rename from macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
rename to example/macos/Runner/Release.entitlements
index 18d9810..852fa1a 100644
--- a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ b/example/macos/Runner/Release.entitlements
@@ -2,7 +2,7 @@
- IDEDidComputeMac32BitWarning
+ com.apple.security.app-sandbox
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
new file mode 100644
index 0000000..782b55a
--- /dev/null
+++ b/example/pubspec.yaml
@@ -0,0 +1,27 @@
+name: exampleGraphx
+description: Graphx rendering prototype examples
+
+publish_to: "none"
+
+version: 1.0.0+1
+
+environment:
+ sdk: ">=2.7.0 <3.0.0"
+
+dependencies:
+ flutter:
+ sdk: flutter
+ flutter_svg: ^0.19.1
+ graphx:
+ path: ../
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+
+flutter:
+ uses-material-design: true
+
+ assets:
+ - assets/
+ - assets/game/
+ - assets/game/flare/
diff --git a/example/readme.md b/example/readme.md
new file mode 100644
index 0000000..e69de29
diff --git a/web/favicon.png b/example/web/favicon.png
similarity index 100%
rename from web/favicon.png
rename to example/web/favicon.png
diff --git a/web/icons/Icon-192.png b/example/web/icons/Icon-192.png
similarity index 100%
rename from web/icons/Icon-192.png
rename to example/web/icons/Icon-192.png
diff --git a/web/icons/Icon-512.png b/example/web/icons/Icon-512.png
similarity index 100%
rename from web/icons/Icon-512.png
rename to example/web/icons/Icon-512.png
diff --git a/web/index.html b/example/web/index.html
similarity index 100%
rename from web/index.html
rename to example/web/index.html
diff --git a/web/manifest.json b/example/web/manifest.json
similarity index 100%
rename from web/manifest.json
rename to example/web/manifest.json
diff --git a/ios/.gitignore b/ios/.gitignore
deleted file mode 100644
index e96ef60..0000000
--- a/ios/.gitignore
+++ /dev/null
@@ -1,32 +0,0 @@
-*.mode1v3
-*.mode2v3
-*.moved-aside
-*.pbxuser
-*.perspectivev3
-**/*sync/
-.sconsign.dblite
-.tags*
-**/.vagrant/
-**/DerivedData/
-Icon?
-**/Pods/
-**/.symlinks/
-profile
-xcuserdata
-**/.generated/
-Flutter/App.framework
-Flutter/Flutter.framework
-Flutter/Flutter.podspec
-Flutter/Generated.xcconfig
-Flutter/app.flx
-Flutter/app.zip
-Flutter/flutter_assets/
-Flutter/flutter_export_environment.sh
-ServiceDefinitions.json
-Runner/GeneratedPluginRegistrant.*
-
-# Exceptions to above rules.
-!default.mode1v3
-!default.mode2v3
-!default.pbxuser
-!default.perspectivev3
diff --git a/ios/Flutter/.last_build_id b/ios/Flutter/.last_build_id
deleted file mode 100644
index f51f858..0000000
--- a/ios/Flutter/.last_build_id
+++ /dev/null
@@ -1 +0,0 @@
-a33fab1b4bc629aacb035705772312ed
\ No newline at end of file
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
deleted file mode 100644
index f2872cf..0000000
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- App
- CFBundleIdentifier
- io.flutter.flutter.app
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- App
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1.0
- MinimumOSVersion
- 9.0
-
-
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
deleted file mode 100644
index e8efba1..0000000
--- a/ios/Flutter/Debug.xcconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
-#include "Generated.xcconfig"
diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
deleted file mode 100644
index 399e934..0000000
--- a/ios/Flutter/Release.xcconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
-#include "Generated.xcconfig"
diff --git a/ios/Podfile b/ios/Podfile
deleted file mode 100644
index 1e8c3c9..0000000
--- a/ios/Podfile
+++ /dev/null
@@ -1,41 +0,0 @@
-# Uncomment this line to define a global platform for your project
-# platform :ios, '9.0'
-
-# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
-ENV['COCOAPODS_DISABLE_STATS'] = 'true'
-
-project 'Runner', {
- 'Debug' => :debug,
- 'Profile' => :release,
- 'Release' => :release,
-}
-
-def flutter_root
- generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
- unless File.exist?(generated_xcode_build_settings_path)
- raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
- end
-
- File.foreach(generated_xcode_build_settings_path) do |line|
- matches = line.match(/FLUTTER_ROOT\=(.*)/)
- return matches[1].strip if matches
- end
- raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
-end
-
-require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
-
-flutter_ios_podfile_setup
-
-target 'Runner' do
- use_frameworks!
- use_modular_headers!
-
- flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
-end
-
-post_install do |installer|
- installer.pods_project.targets.each do |target|
- flutter_additional_ios_build_settings(target)
- end
-end
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
deleted file mode 100644
index 545bf0a..0000000
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,511 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 50;
- objects = {
-
-/* Begin PBXBuildFile section */
- 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
- 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
- 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
- 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
- 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
- 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- );
- name = "Embed Frameworks";
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
- 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
- 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
- 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
- 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
- 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
- 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
- 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
- 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
- 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 97C146EB1CF9000F007C117D /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 9740EEB11CF90186004384FC /* Flutter */ = {
- isa = PBXGroup;
- children = (
- 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
- 9740EEB21CF90195004384FC /* Debug.xcconfig */,
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
- 9740EEB31CF90195004384FC /* Generated.xcconfig */,
- );
- name = Flutter;
- sourceTree = "";
- };
- 97C146E51CF9000F007C117D = {
- isa = PBXGroup;
- children = (
- 9740EEB11CF90186004384FC /* Flutter */,
- 97C146F01CF9000F007C117D /* Runner */,
- 97C146EF1CF9000F007C117D /* Products */,
- );
- sourceTree = "";
- };
- 97C146EF1CF9000F007C117D /* Products */ = {
- isa = PBXGroup;
- children = (
- 97C146EE1CF9000F007C117D /* Runner.app */,
- );
- name = Products;
- sourceTree = "";
- };
- 97C146F01CF9000F007C117D /* Runner */ = {
- isa = PBXGroup;
- children = (
- 97C146FA1CF9000F007C117D /* Main.storyboard */,
- 97C146FD1CF9000F007C117D /* Assets.xcassets */,
- 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
- 97C147021CF9000F007C117D /* Info.plist */,
- 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
- 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
- 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
- 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
- );
- path = Runner;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 97C146ED1CF9000F007C117D /* Runner */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
- buildPhases = (
- 9740EEB61CF901F6004384FC /* Run Script */,
- 97C146EA1CF9000F007C117D /* Sources */,
- 97C146EB1CF9000F007C117D /* Frameworks */,
- 97C146EC1CF9000F007C117D /* Resources */,
- 9705A1C41CF9048500538489 /* Embed Frameworks */,
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = Runner;
- productName = Runner;
- productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 97C146E61CF9000F007C117D /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 1200;
- ORGANIZATIONNAME = "";
- TargetAttributes = {
- 97C146ED1CF9000F007C117D = {
- CreatedOnToolsVersion = 7.3.1;
- LastSwiftMigration = 1100;
- };
- };
- };
- buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
- compatibilityVersion = "Xcode 9.3";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 97C146E51CF9000F007C117D;
- productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 97C146ED1CF9000F007C117D /* Runner */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 97C146EC1CF9000F007C117D /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
- 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
- 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
- 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Thin Binary";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
- };
- 9740EEB61CF901F6004384FC /* Run Script */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Run Script";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 97C146EA1CF9000F007C117D /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
- 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 97C146FB1CF9000F007C117D /* Base */,
- );
- name = Main.storyboard;
- sourceTree = "";
- };
- 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 97C147001CF9000F007C117D /* Base */,
- );
- name = LaunchScreen.storyboard;
- sourceTree = "";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 249021D3217E4FDB00AE95B9 /* Profile */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SUPPORTED_PLATFORMS = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Profile;
- };
- 249021D4217E4FDB00AE95B9 /* Profile */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = 6G6F368UZ6;
- ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.roipeker.graphx;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
- SWIFT_VERSION = 5.0;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Profile;
- };
- 97C147031CF9000F007C117D /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- 97C147041CF9000F007C117D /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SUPPORTED_PLATFORMS = iphoneos;
- SWIFT_COMPILATION_MODE = wholemodule;
- SWIFT_OPTIMIZATION_LEVEL = "-O";
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- 97C147061CF9000F007C117D /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = 6G6F368UZ6;
- ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.roipeker.graphx;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 5.0;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Debug;
- };
- 97C147071CF9000F007C117D /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = 6G6F368UZ6;
- ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.roipeker.graphx;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
- SWIFT_VERSION = 5.0;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 97C147031CF9000F007C117D /* Debug */,
- 97C147041CF9000F007C117D /* Release */,
- 249021D3217E4FDB00AE95B9 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 97C147061CF9000F007C117D /* Debug */,
- 97C147071CF9000F007C117D /* Release */,
- 249021D4217E4FDB00AE95B9 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 97C146E61CF9000F007C117D /* Project object */;
-}
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index f9b0d7c..0000000
--- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- PreviewsEnabled
-
-
-
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
deleted file mode 100644
index 31d8d1f..0000000
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 1d526a1..0000000
--- a/ios/Runner.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index f9b0d7c..0000000
--- a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- PreviewsEnabled
-
-
-
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
deleted file mode 100644
index 70693e4..0000000
--- a/ios/Runner/AppDelegate.swift
+++ /dev/null
@@ -1,13 +0,0 @@
-import UIKit
-import Flutter
-
-@UIApplicationMain
-@objc class AppDelegate: FlutterAppDelegate {
- override func application(
- _ application: UIApplication,
- didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
- ) -> Bool {
- GeneratedPluginRegistrant.register(with: self)
- return super.application(application, didFinishLaunchingWithOptions: launchOptions)
- }
-}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index d36b1fa..0000000
--- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,122 +0,0 @@
-{
- "images" : [
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "Icon-App-20x20@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "Icon-App-20x20@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-App-40x40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-App-40x40@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-App-60x60@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-App-60x60@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "Icon-App-20x20@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "Icon-App-20x20@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-App-29x29@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-App-29x29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-App-40x40@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-App-40x40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-App-76x76@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-App-76x76@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "83.5x83.5",
- "idiom" : "ipad",
- "filename" : "Icon-App-83.5x83.5@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "1024x1024",
- "idiom" : "ios-marketing",
- "filename" : "Icon-App-1024x1024@1x.png",
- "scale" : "1x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
deleted file mode 100644
index dc9ada4..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
deleted file mode 100644
index 28c6bf0..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
deleted file mode 100644
index 2ccbfd9..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
deleted file mode 100644
index f091b6b..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
deleted file mode 100644
index 4cde121..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
deleted file mode 100644
index d0ef06e..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
deleted file mode 100644
index dcdc230..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
deleted file mode 100644
index 2ccbfd9..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
deleted file mode 100644
index c8f9ed8..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
deleted file mode 100644
index a6d6b86..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
deleted file mode 100644
index a6d6b86..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
deleted file mode 100644
index 75b2d16..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
deleted file mode 100644
index c4df70d..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
deleted file mode 100644
index 6a84f41..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
deleted file mode 100644
index d0e1f58..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
deleted file mode 100644
index 0bedcf2..0000000
--- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "LaunchImage.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "LaunchImage@2x.png",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "filename" : "LaunchImage@3x.png",
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
deleted file mode 100644
index 9da19ea..0000000
Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
deleted file mode 100644
index 9da19ea..0000000
Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
deleted file mode 100644
index 9da19ea..0000000
Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
deleted file mode 100644
index 89c2725..0000000
--- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Launch Screen Assets
-
-You can customize the launch screen with your own desired assets by replacing the image files in this directory.
-
-You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard
deleted file mode 100644
index f2e259c..0000000
--- a/ios/Runner/Base.lproj/LaunchScreen.storyboard
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard
deleted file mode 100644
index f3c2851..0000000
--- a/ios/Runner/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
deleted file mode 100644
index 04e6f09..0000000
--- a/ios/Runner/Info.plist
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- graphx
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- $(FLUTTER_BUILD_NAME)
- CFBundleSignature
- ????
- CFBundleVersion
- $(FLUTTER_BUILD_NUMBER)
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UIViewControllerBasedStatusBarAppearance
-
-
-
diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h
deleted file mode 100644
index 308a2a5..0000000
--- a/ios/Runner/Runner-Bridging-Header.h
+++ /dev/null
@@ -1 +0,0 @@
-#import "GeneratedPluginRegistrant.h"
diff --git a/lib/graphx.dart b/lib/graphx.dart
new file mode 100644
index 0000000..ec0d57b
--- /dev/null
+++ b/lib/graphx.dart
@@ -0,0 +1,20 @@
+library graphx;
+
+export 'dart:math';
+export 'dart:ui';
+
+export 'package:flutter/services.dart';
+
+export 'src/animations/animations.dart';
+export 'src/core/core.dart';
+export 'src/display/display.dart';
+export 'src/events/events.dart';
+export 'src/gameutils/gameutils.dart';
+export 'src/geom/geom.dart';
+export 'src/input/input.dart';
+export 'src/render/render.dart';
+export 'src/text/text_format.dart';
+export 'src/textures/textures.dart';
+export 'src/ticker/gx_ticker.dart';
+export 'src/utils/utils.dart';
+export 'src/widgets/graphx_widget.dart';
\ No newline at end of file
diff --git a/lib/graphx/core/graphx.dart b/lib/graphx/core/graphx.dart
deleted file mode 100644
index 455c841..0000000
--- a/lib/graphx/core/graphx.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-import 'package:graphx/graphx/animations/juggler.dart';
-
-import '../input/input_converter.dart';
-export '../display/bitmap.dart';
-export '../display/shape.dart';
-export '../display/stage.dart';
-export '../display/sprite.dart';
-export '../display/static_text.dart';
-export '../display/display_object.dart';
-export '../display/display_object_container.dart';
-export 'scene_controller.dart';
-export 'scene_painter.dart';
-export '../events/keyboard_data.dart';
-export '../events/pointer_data.dart';
-export '../geom/gxmatrix.dart';
-export '../geom/gxpoint.dart';
-export '../geom/gxrect.dart';
-export '../utils/assets_loader.dart';
-
-class Graphx {
- static Graphx instance = Graphx();
- static Juggler _juggler;
- static Juggler get juggler => _juggler ??= Juggler();
-
- static init() {}
-}
diff --git a/lib/src/animations/animations.dart b/lib/src/animations/animations.dart
new file mode 100644
index 0000000..2f4348e
--- /dev/null
+++ b/lib/src/animations/animations.dart
@@ -0,0 +1,5 @@
+export './delayed_call.dart';
+export './juggler.dart';
+export './tween.dart';
+export './updatable.dart';
+
diff --git a/lib/graphx/animations/delayed_call.dart b/lib/src/animations/delayed_call.dart
similarity index 93%
rename from lib/graphx/animations/delayed_call.dart
rename to lib/src/animations/delayed_call.dart
index c2e6a0c..0aa37aa 100644
--- a/lib/graphx/animations/delayed_call.dart
+++ b/lib/src/animations/delayed_call.dart
@@ -1,8 +1,6 @@
import 'dart:math';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/events/mixins.dart';
-import 'package:graphx/graphx/events/signal_data.dart';
+import '../../graphx.dart';
import 'updatable.dart';
class GxDelayedCall with IUpdatable, JugglerSignalMixin {
diff --git a/lib/graphx/animations/juggler.dart b/lib/src/animations/juggler.dart
similarity index 96%
rename from lib/graphx/animations/juggler.dart
rename to lib/src/animations/juggler.dart
index 671c924..90f904c 100644
--- a/lib/graphx/animations/juggler.dart
+++ b/lib/src/animations/juggler.dart
@@ -1,8 +1,6 @@
-import 'package:graphx/graphx/animations/tween.dart';
-import 'package:graphx/graphx/events/mixins.dart';
-import 'package:graphx/graphx/events/signal_data.dart';
-import 'delayed_call.dart';
-import 'updatable.dart';
+
+import '../../graphx.dart';
+
class Juggler {
static int _currentObjectId = 0;
diff --git a/lib/graphx/animations/tween.dart b/lib/src/animations/tween.dart
similarity index 83%
rename from lib/graphx/animations/tween.dart
rename to lib/src/animations/tween.dart
index 1944a09..669126f 100644
--- a/lib/graphx/animations/tween.dart
+++ b/lib/src/animations/tween.dart
@@ -1,7 +1,4 @@
-import 'package:graphx/graphx/events/mixins.dart';
-import 'package:graphx/graphx/events/signal_data.dart';
-
-import 'updatable.dart';
+import '../../graphx.dart';
class GxTween with IUpdatable, JugglerSignalMixin {
Object target;
@@ -27,7 +24,7 @@ class GxTween with IUpdatable, JugglerSignalMixin {
@override
void update(double delta) {}
- static List _pool = [];
+ static final _pool = [];
static void toPool(GxTween obj) {
/// reset all references to make sure is garbage collected.
obj.target = null;
diff --git a/lib/graphx/animations/updatable.dart b/lib/src/animations/updatable.dart
similarity index 50%
rename from lib/graphx/animations/updatable.dart
rename to lib/src/animations/updatable.dart
index 403e1f3..a99704e 100644
--- a/lib/graphx/animations/updatable.dart
+++ b/lib/src/animations/updatable.dart
@@ -1,4 +1,3 @@
-import 'package:graphx/graphx/events/mixins.dart';
mixin IUpdatable {
void update(double delta);
diff --git a/lib/src/core/core.dart b/lib/src/core/core.dart
new file mode 100644
index 0000000..2d0d46f
--- /dev/null
+++ b/lib/src/core/core.dart
@@ -0,0 +1,3 @@
+export './graphx.dart';
+export './scene_controller.dart';
+export './scene_painter.dart';
\ No newline at end of file
diff --git a/lib/src/core/graphx.dart b/lib/src/core/graphx.dart
new file mode 100644
index 0000000..be0f3f6
--- /dev/null
+++ b/lib/src/core/graphx.dart
@@ -0,0 +1,9 @@
+import '../../graphx.dart';
+
+class Graphx {
+ static Graphx instance = Graphx();
+ static Juggler _juggler;
+ static Juggler get juggler => _juggler ??= Juggler();
+
+ static void init() {}
+}
diff --git a/lib/graphx/core/scene_controller.dart b/lib/src/core/scene_controller.dart
similarity index 87%
rename from lib/graphx/core/scene_controller.dart
rename to lib/src/core/scene_controller.dart
index 95212d8..028b676 100644
--- a/lib/graphx/core/scene_controller.dart
+++ b/lib/src/core/scene_controller.dart
@@ -1,12 +1,8 @@
-import 'package:flutter/widgets.dart';
-import 'package:graphx/graphx/animations/juggler.dart';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/input/keyboard_manager.dart';
-import 'package:graphx/graphx/input/pointer_manager.dart';
-import 'package:graphx/graphx/core/scene_painter.dart';
-import '../input/input_converter.dart';
-import '../ticker/gx_ticker.dart';
+import 'package:flutter/material.dart';
+
+import '../../graphx.dart';
+
class SceneConfig {
bool useKeyboard;
@@ -54,7 +50,7 @@ class SceneController {
InputConverter $inputConverter;
SceneConfig get config => _config;
- SceneConfig _config = SceneConfig();
+ final _config = SceneConfig();
int id = -1;
bool _isInited = false;
diff --git a/lib/graphx/core/scene_painter.dart b/lib/src/core/scene_painter.dart
similarity index 94%
rename from lib/graphx/core/scene_painter.dart
rename to lib/src/core/scene_painter.dart
index 160d8dc..bdcea53 100644
--- a/lib/graphx/core/scene_painter.dart
+++ b/lib/src/core/scene_painter.dart
@@ -1,13 +1,10 @@
import 'dart:ui' as ui;
import 'package:flutter/widgets.dart';
-import 'package:graphx/graphx/display/sprite.dart';
-import 'package:graphx/graphx/events/signal.dart';
-import 'package:graphx/graphx/core/scene_controller.dart';
-import '../display/stage.dart';
-import '../events/mixins.dart';
-import '../events/pointer_data.dart';
+import '../../graphx.dart';
+
+
class RootScene extends Sprite {
ScenePainter owner;
diff --git a/lib/graphx/display/bitmap.dart b/lib/src/display/bitmap.dart
similarity index 81%
rename from lib/graphx/display/bitmap.dart
rename to lib/src/display/bitmap.dart
index 10682d6..6e33684 100644
--- a/lib/graphx/display/bitmap.dart
+++ b/lib/src/display/bitmap.dart
@@ -1,15 +1,10 @@
import 'dart:ui';
-import 'package:graphx/graphx/display/display_object.dart';
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
-import 'package:graphx/graphx/utils/matrix_utils.dart';
+import '../../graphx.dart';
-class Bitmap extends IAnimatable {
- static GxMatrix _sHelperMatrix = GxMatrix();
- static GxPoint _sHelperPoint = GxPoint();
+class Bitmap extends DisplayObject {
+ static final _sHelperMatrix = GxMatrix();
+ static final _sHelperPoint = GxPoint();
@override
String toString() {
@@ -50,7 +45,7 @@ class Bitmap extends IAnimatable {
}
@override
- GxRect getBounds(IAnimatable targetSpace, [GxRect out]) {
+ GxRect getBounds(DisplayObject targetSpace, [GxRect out]) {
final matrix = _sHelperMatrix;
matrix.identity();
getTransformationMatrix(targetSpace, matrix);
diff --git a/lib/src/display/display.dart b/lib/src/display/display.dart
new file mode 100644
index 0000000..ef5481f
--- /dev/null
+++ b/lib/src/display/display.dart
@@ -0,0 +1,7 @@
+export './bitmap.dart';
+export './display_object.dart';
+export './display_object_container.dart';
+export './shape.dart';
+export './sprite.dart';
+export './stage.dart';
+export './static_text.dart';
diff --git a/lib/graphx/display/display_object.dart b/lib/src/display/display_object.dart
similarity index 93%
rename from lib/graphx/display/display_object.dart
rename to lib/src/display/display_object.dart
index f856cc5..25b8014 100644
--- a/lib/graphx/display/display_object.dart
+++ b/lib/src/display/display_object.dart
@@ -1,23 +1,14 @@
import 'dart:math' as math;
import 'dart:ui';
-//import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/painting.dart';
-import 'package:graphx/graphx/display/shape.dart';
-import 'package:graphx/graphx/events/mixins.dart';
-import 'package:graphx/graphx/events/pointer_data.dart';
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
-import 'package:graphx/graphx/utils/math_utils.dart';
-import 'package:graphx/graphx/utils/painter_utils.dart';
+import '../../graphx.dart';
import 'display_object_container.dart';
import 'stage.dart';
-abstract class IAnimatable
+abstract class DisplayObject
with DisplayListSignalsMixin, RenderSignalMixin, PointerSignalsMixin {
Canvas $canvas;
DisplayObjectContainer $parent;
@@ -31,7 +22,7 @@ abstract class IAnimatable
/// mouse down node = null
}
// print("Capturing mouse data! $runtimeType");
- bool prevCaptured = e.captured;
+ // final prevCaptured = e.captured;
/// loop down for hit test.
final localCoord = globalToLocal(e.stagePosition);
@@ -40,12 +31,12 @@ abstract class IAnimatable
}
}
- static IAnimatable $mouseObjDown;
- static IAnimatable $mouseObjHover;
+ static DisplayObject $mouseObjDown;
+ static DisplayObject $mouseObjHover;
void $dispatchMouseCallback(
PointerEventType type,
- IAnimatable object,
+ DisplayObject object,
PointerEventData input,
) {
if (touchable) {
@@ -242,8 +233,8 @@ abstract class IAnimatable
bool $matrixDirty = true;
bool touchable = true;
- IAnimatable $maskee;
- IAnimatable $mask;
+ DisplayObject $maskee;
+ DisplayObject $mask;
bool maskInverted = false;
/// optimization.
@@ -251,7 +242,7 @@ abstract class IAnimatable
bool get isMask => $maskee != null;
- IAnimatable get mask => $mask;
+ DisplayObject get mask => $mask;
static final Paint _grayscaleDstInPaint = Paint()
..blendMode = BlendMode.dstIn
@@ -262,7 +253,7 @@ abstract class IAnimatable
0.2126, 0.7152, 0.0722, 0, 0,
]);
- set mask(IAnimatable value) {
+ set mask(DisplayObject value) {
if ($mask != value) {
if ($mask != null) $mask.$maskee = null;
value?.$maskee = this;
@@ -281,7 +272,7 @@ abstract class IAnimatable
}
/// common parent.
- static List _sAncestors = [];
+ static List _sAncestors = [];
static GxPoint _sHelperPoint = GxPoint();
static GxRect _sHelperRect = GxRect();
static GxMatrix _sHelperMatrix = GxMatrix();
@@ -298,7 +289,7 @@ abstract class IAnimatable
double get worldY => y - pivotY * scaleY + ($parent?.worldY ?? 0);
bool visible = true;
- IAnimatable() {
+ DisplayObject() {
x = y = 0.0;
rotation = 0.0;
alpha = 1.0;
@@ -321,7 +312,7 @@ abstract class IAnimatable
/// todo: should be cached.
GxRect get bounds => getBounds(this);
- GxRect getBounds(IAnimatable targetSpace, [GxRect out]) {
+ GxRect getBounds(DisplayObject targetSpace, [GxRect out]) {
throw "getBounds() is abstract in DisplayObject";
}
@@ -442,8 +433,8 @@ abstract class IAnimatable
}
}
- GxMatrix getTransformationMatrix(IAnimatable targetSpace, [GxMatrix out]) {
- IAnimatable commonParent, currentObj;
+ GxMatrix getTransformationMatrix(DisplayObject targetSpace, [GxMatrix out]) {
+ DisplayObject commonParent, currentObj;
out?.identity();
out ??= GxMatrix();
if (targetSpace == this) {
@@ -469,7 +460,7 @@ abstract class IAnimatable
}
/// 1 - find a common parent between this and targetSpace.
- commonParent = IAnimatable._findCommonParent(this, targetSpace);
+ commonParent = DisplayObject._findCommonParent(this, targetSpace);
/// 2 - moveup from this to common parent.````
currentObj = this;
@@ -494,8 +485,8 @@ abstract class IAnimatable
return out;
}
- static IAnimatable _findCommonParent(IAnimatable obj1, IAnimatable obj2) {
- IAnimatable current = obj1;
+ static DisplayObject _findCommonParent(DisplayObject obj1, DisplayObject obj2) {
+ DisplayObject current = obj1;
/// TODO: use faster Hash access.
while (current != null) {
@@ -530,7 +521,7 @@ abstract class IAnimatable
}
/// `useShape` is meant to be used by `Shape.graphics`.
- IAnimatable hitTest(GxPoint localPoint, [bool useShape = false]) {
+ DisplayObject hitTest(GxPoint localPoint, [bool useShape = false]) {
if (!visible || !touchable) return null;
if ($mask != null && !hitTestMask(localPoint)) return null;
if (getBounds(this, _sHelperRect).containsPoint(localPoint)) return this;
@@ -539,7 +530,7 @@ abstract class IAnimatable
DisplayObjectContainer get parent => $parent;
- IAnimatable get base {
+ DisplayObject get base {
var current = this;
while (current.$parent != null) current = current.$parent;
return current;
@@ -549,7 +540,7 @@ abstract class IAnimatable
Stage get stage => base is Stage ? base : null;
- IAnimatable get root {
+ DisplayObject get root {
var current = this;
while (current.$parent != null) {
if (current.$parent is Stage) return current;
diff --git a/lib/graphx/display/display_object_container.dart b/lib/src/display/display_object_container.dart
similarity index 83%
rename from lib/graphx/display/display_object_container.dart
rename to lib/src/display/display_object_container.dart
index c627cc0..f9588ab 100644
--- a/lib/graphx/display/display_object_container.dart
+++ b/lib/src/display/display_object_container.dart
@@ -1,14 +1,10 @@
-import 'package:graphx/graphx/display/display_object.dart';
-import 'package:graphx/graphx/events/pointer_data.dart';
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
+import '../../graphx.dart';
typedef SortChildrenCallback = int Function(
- IAnimatable object1, IAnimatable object2);
+ DisplayObject object1, DisplayObject object2);
-abstract class DisplayObjectContainer extends IAnimatable {
- final children = [];
+abstract class DisplayObjectContainer extends DisplayObject {
+ final children = [];
@override
String toString() {
@@ -16,8 +12,8 @@ abstract class DisplayObjectContainer extends IAnimatable {
return '$runtimeType (DisplayObjectContainer)$msg';
}
- static GxMatrix _sHitTestMatrix = GxMatrix();
- static GxPoint _sHitTestPoint = GxPoint();
+ static final _sHitTestMatrix = GxMatrix();
+ static final _sHitTestPoint = GxPoint();
static GxMatrix $sBoundsMatrix = GxMatrix();
static GxPoint $sBoundsPoint = GxPoint();
@@ -51,7 +47,7 @@ abstract class DisplayObjectContainer extends IAnimatable {
}
@override
- GxRect getBounds(IAnimatable targetSpace, [GxRect out]) {
+ GxRect getBounds(DisplayObject targetSpace, [GxRect out]) {
out ??= GxRect();
final len = children.length;
if (len == 0) {
@@ -61,10 +57,10 @@ abstract class DisplayObjectContainer extends IAnimatable {
} else if (len == 1) {
children[0].getBounds(targetSpace, out);
} else {
- double minx = 10000000.0;
- double maxx = -10000000.0;
- double miny = 10000000.0;
- double maxy = -10000000.0;
+ var minx = 10000000.0;
+ var maxx = -10000000.0;
+ var miny = 10000000.0;
+ var maxy = -10000000.0;
final len = numChildren;
for (var i = 0; i < len; ++i) {
children[i].getBounds(targetSpace, out);
@@ -81,11 +77,11 @@ abstract class DisplayObjectContainer extends IAnimatable {
return out;
}
- List getObjectsUnderPoint(GxPoint localPoint) {
- final result = [];
+ List getObjectsUnderPoint(GxPoint localPoint) {
+ final result = [];
if (!visible || !touchable || !hitTestMask(localPoint)) return result;
final numChild = children.length;
- IAnimatable target;
+ DisplayObject target;
for (var i = numChild - 1; i >= 0; --i) {
var child = children[i];
if (child.isMask) continue;
@@ -105,9 +101,9 @@ abstract class DisplayObjectContainer extends IAnimatable {
}
@override
- IAnimatable hitTest(GxPoint localPoint, [bool useShape = false]) {
+ DisplayObject hitTest(GxPoint localPoint, [bool useShape = false]) {
if (!visible || !touchable || !hitTestMask(localPoint)) return null;
- IAnimatable target;
+ DisplayObject target;
final numChild = children.length;
for (var i = numChild - 1; i >= 0; --i) {
var child = children[i];
@@ -122,11 +118,11 @@ abstract class DisplayObjectContainer extends IAnimatable {
return null;
}
- IAnimatable addChild(IAnimatable child) {
+ DisplayObject addChild(DisplayObject child) {
return addChildAt(child, children.length);
}
- IAnimatable addChildAt(IAnimatable child, int index) {
+ DisplayObject addChildAt(DisplayObject child, int index) {
if (child == null) throw "::child can't be null";
if (index < 0 || index > children.length) {
throw RangeError('Invalid child index');
@@ -154,9 +150,9 @@ abstract class DisplayObjectContainer extends IAnimatable {
// if (child is DisplayObjectContainer) {}
}
- int getChildIndex(IAnimatable child) => children.indexOf(child);
+ int getChildIndex(DisplayObject child) => children.indexOf(child);
- void setChildIndex(IAnimatable child, int index) {
+ void setChildIndex(DisplayObject child, int index) {
final old = getChildIndex(child);
if (old == index) return;
if (old == -1)
@@ -166,7 +162,7 @@ abstract class DisplayObjectContainer extends IAnimatable {
requiresRedraw();
}
- void swapChildren(IAnimatable child1, IAnimatable child2) {
+ void swapChildren(DisplayObject child1, DisplayObject child2) {
final idx1 = getChildIndex(child1);
final idx2 = getChildIndex(child2);
if (idx1 == -1 || idx2 == -1)
@@ -193,14 +189,14 @@ abstract class DisplayObjectContainer extends IAnimatable {
requiresRedraw();
}
- IAnimatable getChildAt(int index) {
+ DisplayObject getChildAt(int index) {
final len = children.length;
if (index < 0) index = len + index;
if (index >= 0 && index < len) return children[index];
throw RangeError("Invalid child index");
}
- IAnimatable getChildByName(String name) {
+ DisplayObject getChildByName(String name) {
for (final child in children) {
if (child.name == name) return child;
}
@@ -226,7 +222,7 @@ abstract class DisplayObjectContainer extends IAnimatable {
bool get hasChildren => children.isNotEmpty;
- bool contains(IAnimatable child, [bool recursive = true]) {
+ bool contains(DisplayObject child, [bool recursive = true]) {
if (!recursive) return children.contains(child);
while (child != null) {
if (child == this) return true;
@@ -235,7 +231,7 @@ abstract class DisplayObjectContainer extends IAnimatable {
return false;
}
- IAnimatable removeChildAt(int index, [bool dispose = false]) {
+ DisplayObject removeChildAt(int index, [bool dispose = false]) {
if (index >= 0 && index < children.length) {
requiresRedraw();
final child = children[index];
@@ -256,7 +252,7 @@ abstract class DisplayObjectContainer extends IAnimatable {
return null;
}
- IAnimatable removeChild(IAnimatable child, [bool dispose = false]) {
+ DisplayObject removeChild(DisplayObject child, [bool dispose = false]) {
if (child == null || child?.$parent != this) return null;
final index = getChildIndex(child);
if (index > -1) return removeChildAt(index, dispose);
@@ -315,7 +311,7 @@ abstract class DisplayObjectContainer extends IAnimatable {
});
}
- void _drawMask(IAnimatable mask, IAnimatable child) {}
+ void _drawMask(DisplayObject mask, DisplayObject child) {}
- void _eraseMask(IAnimatable mask, IAnimatable child) {}
+ void _eraseMask(DisplayObject mask, DisplayObject child) {}
}
diff --git a/lib/graphx/display/shape.dart b/lib/src/display/shape.dart
similarity index 82%
rename from lib/graphx/display/shape.dart
rename to lib/src/display/shape.dart
index 9ee547a..fa073bf 100644
--- a/lib/graphx/display/shape.dart
+++ b/lib/src/display/shape.dart
@@ -1,16 +1,12 @@
import 'dart:ui';
-import 'package:graphx/graphx/display/display_object.dart';
-import 'package:graphx/graphx/display/display_object_container.dart';
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
-import 'package:graphx/graphx/render/graphics.dart';
-import 'package:graphx/graphx/utils/matrix_utils.dart';
-
-class Shape extends IAnimatable {
+import '../../graphx.dart';
+
+
+
+class Shape extends DisplayObject {
Graphics _graphics;
- static GxMatrix _sHelperMatrix = GxMatrix();
+ static final _sHelperMatrix = GxMatrix();
@override
String toString() {
@@ -21,7 +17,7 @@ class Shape extends IAnimatable {
Graphics get graphics => _graphics ??= Graphics();
@override
- GxRect getBounds(IAnimatable targetSpace, [GxRect out]) {
+ GxRect getBounds(DisplayObject targetSpace, [GxRect out]) {
final matrix = _sHelperMatrix;
matrix.identity();
getTransformationMatrix(targetSpace, matrix);
@@ -62,7 +58,7 @@ class Shape extends IAnimatable {
}
@override
- IAnimatable hitTest(GxPoint localPoint, [bool useShape = false]) {
+ DisplayObject hitTest(GxPoint localPoint, [bool useShape = false]) {
if (!visible || !touchable) return null;
return (_graphics?.hitTest(localPoint, useShape) ?? false) ? this : null;
}
diff --git a/lib/graphx/display/sprite.dart b/lib/src/display/sprite.dart
similarity index 70%
rename from lib/graphx/display/sprite.dart
rename to lib/src/display/sprite.dart
index 5633bfe..090bc5d 100644
--- a/lib/graphx/display/sprite.dart
+++ b/lib/src/display/sprite.dart
@@ -1,10 +1,4 @@
-import 'package:graphx/graphx/display/display_object_container.dart';
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
-import 'package:graphx/graphx/render/graphics.dart';
-import 'package:graphx/graphx/utils/matrix_utils.dart';
-
+import '../../graphx.dart';
import 'display_object.dart';
class Sprite extends DisplayObjectContainer {
@@ -14,15 +8,15 @@ class Sprite extends DisplayObjectContainer {
return '$runtimeType (Sprite)$msg';
}
- static GxMatrix _sHelperMatrix = GxMatrix();
- static GxPoint _sHelperPoint = GxPoint();
+ static final _sHelperMatrix = GxMatrix();
+ static final _sHelperPoint = GxPoint();
Graphics _graphics;
Graphics get graphics => _graphics ??= Graphics();
@override
- GxRect getBounds(IAnimatable targetSpace, [GxRect out]) {
+ GxRect getBounds(DisplayObject targetSpace, [GxRect out]) {
out = super.getBounds(targetSpace, out);
if (_graphics != null) {
/// add graphics later.
@@ -46,9 +40,9 @@ class Sprite extends DisplayObjectContainer {
}
@override
- IAnimatable hitTest(GxPoint localPoint, [bool useShape = false]) {
+ DisplayObject hitTest(GxPoint localPoint, [bool useShape = false]) {
if (!visible || !touchable) return null;
- IAnimatable target = super.hitTest(localPoint);
+ DisplayObject target = super.hitTest(localPoint);
if (target == null) {
target =
(_graphics?.hitTest(localPoint, useShape) ?? false) ? this : null;
diff --git a/lib/graphx/display/stage.dart b/lib/src/display/stage.dart
similarity index 82%
rename from lib/graphx/display/stage.dart
rename to lib/src/display/stage.dart
index e01d7f9..8388394 100644
--- a/lib/graphx/display/stage.dart
+++ b/lib/src/display/stage.dart
@@ -1,23 +1,15 @@
import 'dart:ui';
-import 'package:graphx/graphx/animations/juggler.dart';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/display/display_object_container.dart';
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
-import 'package:graphx/graphx/input/keyboard_manager.dart';
-import 'package:graphx/graphx/input/pointer_manager.dart';
-
-import '../events/mixins.dart';
+import '../../graphx.dart';
import '../core/scene_painter.dart';
+import '../events/mixins.dart';
import 'display_object.dart';
class Stage extends DisplayObjectContainer
with ResizeSignalMixin, TickerSignalMixin {
final ScenePainter scene;
- static GxMatrix _sMatrix = GxMatrix();
+ static final _sMatrix = GxMatrix();
bool maskBounds = false;
@@ -87,7 +79,7 @@ class Stage extends DisplayObjectContainer
}
@override
- IAnimatable hitTest(GxPoint localPoint, [bool useShapes = false]) {
+ DisplayObject hitTest(GxPoint localPoint, [bool useShapes = false]) {
if (!visible || !touchable) return null;
/// location outside stage area, is not accepted.
@@ -100,7 +92,7 @@ class Stage extends DisplayObjectContainer
return super.hitTest(localPoint) ?? this;
}
- GxRect getStageBounds(IAnimatable targetSpace, [GxRect out]) {
+ GxRect getStageBounds(DisplayObject targetSpace, [GxRect out]) {
out ??= GxRect();
out.setTo(0, 0, stageWidth, stageHeight);
getTransformationMatrix(targetSpace, _sMatrix);
diff --git a/lib/graphx/display/static_text.dart b/lib/src/display/static_text.dart
similarity index 93%
rename from lib/graphx/display/static_text.dart
rename to lib/src/display/static_text.dart
index 09dfc12..8655945 100644
--- a/lib/graphx/display/static_text.dart
+++ b/lib/src/display/static_text.dart
@@ -1,18 +1,14 @@
import 'dart:ui';
-import 'package:graphx/graphx/display/display_object.dart';
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
-import 'package:graphx/graphx/utils/matrix_utils.dart';
-import 'package:graphx/graphx/utils/painter_utils.dart';
+import '../../graphx.dart';
-class StaticText extends IAnimatable {
+class StaticText extends DisplayObject {
Paragraph _paragraph;
- static GxMatrix _sHelperMatrix = GxMatrix();
+ static final _sHelperMatrix = GxMatrix();
@override
- GxRect getBounds(IAnimatable targetSpace, [GxRect out]) {
+ GxRect getBounds(DisplayObject targetSpace, [GxRect out]) {
validate();
out ??= GxRect();
out.setTo(0, 0, intrinsicWidth, textHeight);
diff --git a/lib/src/events/events.dart b/lib/src/events/events.dart
new file mode 100644
index 0000000..dd2a8a7
--- /dev/null
+++ b/lib/src/events/events.dart
@@ -0,0 +1,6 @@
+export './gx_callback.dart';
+export './keyboard_data.dart';
+export './mixins.dart';
+export './pointer_data.dart';
+export './signal.dart';
+export './signal_data.dart';
\ No newline at end of file
diff --git a/lib/graphx/events/gx_callback.dart b/lib/src/events/gx_callback.dart
similarity index 100%
rename from lib/graphx/events/gx_callback.dart
rename to lib/src/events/gx_callback.dart
diff --git a/lib/graphx/events/keyboard_data.dart b/lib/src/events/keyboard_data.dart
similarity index 100%
rename from lib/graphx/events/keyboard_data.dart
rename to lib/src/events/keyboard_data.dart
diff --git a/lib/graphx/events/mixins.dart b/lib/src/events/mixins.dart
similarity index 95%
rename from lib/graphx/events/mixins.dart
rename to lib/src/events/mixins.dart
index 0111c47..f50bfbe 100644
--- a/lib/graphx/events/mixins.dart
+++ b/lib/src/events/mixins.dart
@@ -2,10 +2,8 @@ import 'dart:collection';
import 'dart:ui';
import 'package:flutter/foundation.dart';
-import 'package:flutter/gestures.dart';
-import 'package:graphx/graphx/events/pointer_data.dart';
-import 'package:graphx/graphx/events/signal_data.dart';
+import '../../graphx.dart';
import 'signal.dart';
mixin EventDispatcherMixin implements Listenable {
diff --git a/lib/graphx/events/pointer_data.dart b/lib/src/events/pointer_data.dart
similarity index 85%
rename from lib/graphx/events/pointer_data.dart
rename to lib/src/events/pointer_data.dart
index 86597ec..efef7bc 100644
--- a/lib/graphx/events/pointer_data.dart
+++ b/lib/src/events/pointer_data.dart
@@ -1,8 +1,8 @@
import 'dart:ui';
import 'package:flutter/gestures.dart';
-import 'package:graphx/graphx/display/display_object.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
+
+import '../../graphx.dart';
enum PointerEventType { scroll, cancel, move, up, down, enter, exit, hover }
@@ -34,14 +34,14 @@ class PointerEventData {
/// new properties.
/// TODO: decide how to name mouse/pointer events.
- IAnimatable target;
- IAnimatable dispatcher;
+ DisplayObject target;
+ DisplayObject dispatcher;
bool captured = false;
bool mouseOut = false;
PointerEventData clone(
- IAnimatable target,
- IAnimatable dispatcher,
+ DisplayObject target,
+ DisplayObject dispatcher,
PointerEventType type,
) {
var i = PointerEventData(type: type, rawEvent: rawEvent);
diff --git a/lib/graphx/events/signal.dart b/lib/src/events/signal.dart
similarity index 100%
rename from lib/graphx/events/signal.dart
rename to lib/src/events/signal.dart
diff --git a/lib/graphx/events/signal_data.dart b/lib/src/events/signal_data.dart
similarity index 61%
rename from lib/graphx/events/signal_data.dart
rename to lib/src/events/signal_data.dart
index 502f21c..a8dee3d 100644
--- a/lib/graphx/events/signal_data.dart
+++ b/lib/src/events/signal_data.dart
@@ -1,4 +1,5 @@
-import 'package:graphx/graphx/animations/updatable.dart';
+import '../../graphx.dart';
+
class JugglerObjectEventData {
IUpdatable target;
diff --git a/lib/gameutils.dart b/lib/src/gameutils/gameutils.dart
similarity index 91%
rename from lib/gameutils.dart
rename to lib/src/gameutils/gameutils.dart
index 6a95108..607de1d 100644
--- a/lib/gameutils.dart
+++ b/lib/src/gameutils/gameutils.dart
@@ -11,7 +11,7 @@ class GameUtils {
return rnd.nextDouble();
}
- static rndFromList(List list) {
+ static E rndFromList(List list) {
final idx = rndRangeInt(0, list.length - 1);
return list[idx];
}
diff --git a/lib/src/geom/geom.dart b/lib/src/geom/geom.dart
new file mode 100644
index 0000000..eb0c26e
--- /dev/null
+++ b/lib/src/geom/geom.dart
@@ -0,0 +1,3 @@
+export './gxmatrix.dart';
+export './gxpoint.dart';
+export './gxrect.dart';
diff --git a/lib/graphx/geom/gxmatrix.dart b/lib/src/geom/gxmatrix.dart
similarity index 99%
rename from lib/graphx/geom/gxmatrix.dart
rename to lib/src/geom/gxmatrix.dart
index 97c86eb..5ac1846 100644
--- a/lib/graphx/geom/gxmatrix.dart
+++ b/lib/src/geom/gxmatrix.dart
@@ -1,9 +1,12 @@
import 'dart:math' as math;
import 'package:flutter/material.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
import 'package:vector_math/vector_math_64.dart';
+import 'geom.dart';
+
+
+
class GxMatrix {
double a, b, c, d, tx, ty;
diff --git a/lib/graphx/geom/gxpoint.dart b/lib/src/geom/gxpoint.dart
similarity index 100%
rename from lib/graphx/geom/gxpoint.dart
rename to lib/src/geom/gxpoint.dart
diff --git a/lib/graphx/geom/gxrect.dart b/lib/src/geom/gxrect.dart
similarity index 93%
rename from lib/graphx/geom/gxrect.dart
rename to lib/src/geom/gxrect.dart
index 8e645c3..8130552 100644
--- a/lib/graphx/geom/gxrect.dart
+++ b/lib/src/geom/gxrect.dart
@@ -1,8 +1,8 @@
import 'dart:math' as math;
import 'dart:ui';
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
+import 'geom.dart';
+
class GxRect {
static GxRect fromNative(Rect nativeRect) {
@@ -56,14 +56,14 @@ class GxRect {
}
static List _sHelperPositions;
- static GxPoint _sHelperPoint = GxPoint();
+ static final _sHelperPoint = GxPoint();
GxRect getBounds(GxMatrix matrix, [GxRect out]) {
out ??= GxRect();
- double minX = 10000000.0;
- double maxX = -10000000.0;
- double minY = 10000000.0;
- double maxY = -10000000.0;
+ var minX = 10000000.0;
+ var maxX = -10000000.0;
+ var minY = 10000000.0;
+ var maxY = -10000000.0;
final positions = getPositions(_sHelperPositions);
for (var point in positions) {
matrix.transformCoords(point.x, point.y, _sHelperPoint);
diff --git a/lib/src/input/input.dart b/lib/src/input/input.dart
new file mode 100644
index 0000000..2315d3e
--- /dev/null
+++ b/lib/src/input/input.dart
@@ -0,0 +1,3 @@
+export './input_converter.dart';
+export './keyboard_manager.dart';
+export './pointer_manager.dart';
\ No newline at end of file
diff --git a/lib/graphx/input/input_converter.dart b/lib/src/input/input_converter.dart
similarity index 99%
rename from lib/graphx/input/input_converter.dart
rename to lib/src/input/input_converter.dart
index 4d7230b..a2a3324 100644
--- a/lib/graphx/input/input_converter.dart
+++ b/lib/src/input/input_converter.dart
@@ -1,6 +1,7 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
+
import '../events/keyboard_data.dart';
import '../events/pointer_data.dart';
import 'keyboard_manager.dart';
diff --git a/lib/graphx/input/keyboard_manager.dart b/lib/src/input/keyboard_manager.dart
similarity index 86%
rename from lib/graphx/input/keyboard_manager.dart
rename to lib/src/input/keyboard_manager.dart
index 58a7fac..f91b3fe 100644
--- a/lib/graphx/input/keyboard_manager.dart
+++ b/lib/src/input/keyboard_manager.dart
@@ -1,7 +1,8 @@
-import 'package:flutter/cupertino.dart';
+
+import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
-import 'package:graphx/graphx/events/keyboard_data.dart';
-import 'package:graphx/graphx/events/signal.dart';
+
+import '../../graphx.dart';
class KeyboardManager {
FocusNode focusNode = FocusNode();
diff --git a/lib/graphx/input/pointer_manager.dart b/lib/src/input/pointer_manager.dart
similarity index 96%
rename from lib/graphx/input/pointer_manager.dart
rename to lib/src/input/pointer_manager.dart
index 04dbfd1..5018265 100644
--- a/lib/graphx/input/pointer_manager.dart
+++ b/lib/src/input/pointer_manager.dart
@@ -1,7 +1,9 @@
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
-import 'package:graphx/graphx/events/pointer_data.dart';
-import 'package:graphx/graphx/events/signal.dart';
+
+import '../../graphx.dart';
+
+
class PointerManager {
SystemMouseCursor get cursor => _cursor;
diff --git a/lib/graphx/render/filters/color_filter.dart b/lib/src/render/filters/color_filter.dart
similarity index 100%
rename from lib/graphx/render/filters/color_filter.dart
rename to lib/src/render/filters/color_filter.dart
diff --git a/lib/graphx/render/graphics.dart b/lib/src/render/graphics.dart
similarity index 97%
rename from lib/graphx/render/graphics.dart
rename to lib/src/render/graphics.dart
index d2fe379..3ecfe2d 100644
--- a/lib/graphx/render/graphics.dart
+++ b/lib/src/render/graphics.dart
@@ -2,11 +2,9 @@ import 'dart:math';
import 'dart:ui';
import 'package:flutter/painting.dart';
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
-import 'package:graphx/graphx/utils/interfases.dart';
-import 'package:graphx/graphx/utils/mixins.dart';
+
+import '../geom/geom.dart';
+import '../utils/utils.dart';
class Graphics with RenderUtilMixin implements GxRenderable {
final _drawingQueue = [];
@@ -49,6 +47,7 @@ class Graphics with RenderUtilMixin implements GxRenderable {
return out;
}
+ @override
GxRect getBounds([GxRect out]) {
Rect r;
_drawingQueue.forEach((e) {
@@ -375,7 +374,7 @@ class Graphics with RenderUtilMixin implements GxRenderable {
final startAngle = (-1 * pi / 2) + rotation;
final len = points * 2;
final delta = pi * 2 / len;
- final polys = List();
+ final polys = [];
for (var i = 0; i < len; ++i) {
final r = i.isOdd ? innerRadius : radius;
final a = i * delta + startAngle;
@@ -442,13 +441,14 @@ class Graphics with RenderUtilMixin implements GxRenderable {
}
Path getPaths() {
- Path output = Path();
+ var output = Path();
_drawingQueue.forEach((graph) {
output = Path.combine(PathOperation.union, output, graph.path);
});
return output;
}
+ @override
void paint(Canvas canvas) {
// TODO : add mask support.
if (isMask) {
@@ -558,9 +558,9 @@ class GraphicsDrawingData {
GraphicsDrawingData([this.fill, this.path]);
- get hasPicture => picture != null;
+ bool get hasPicture => picture != null;
- get hasGradient => gradient != null;
+ bool get hasGradient => gradient != null;
/// When cloning, we can pass fill and path by reference or make a deep copy.
/// Mostly intended for direct `Graphics.pushData` and `Graphics.removeData`
@@ -579,7 +579,7 @@ class GraphicsDrawingData {
// compute grad?
}
-extension ExtSkiaPaint on Paint {
+extension ExtSkiaPaintCustom on Paint {
Paint clone([Paint out]) {
out ??= Paint();
out.maskFilter = maskFilter;
diff --git a/lib/graphx/render/gx_icon.dart b/lib/src/render/gx_icon.dart
similarity index 84%
rename from lib/graphx/render/gx_icon.dart
rename to lib/src/render/gx_icon.dart
index 27f482e..99155d6 100644
--- a/lib/graphx/render/gx_icon.dart
+++ b/lib/src/render/gx_icon.dart
@@ -1,19 +1,15 @@
import 'dart:ui';
import 'package:flutter/widgets.dart' as widgets;
-import 'package:graphx/graphx/display/display_object.dart';
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
-import 'package:graphx/graphx/utils/matrix_utils.dart';
-class GxIcon extends IAnimatable {
- static GxMatrix _sHelperMatrix = GxMatrix();
+import '../../graphx.dart';
- GxRect _localBounds = GxRect();
+class GxIcon extends DisplayObject {
+ static final _sHelperMatrix = GxMatrix();
+ final _localBounds = GxRect();
@override
- GxRect getBounds(IAnimatable targetSpace, [GxRect out]) {
+ GxRect getBounds(DisplayObject targetSpace, [GxRect out]) {
_sHelperMatrix.identity();
getTransformationMatrix(targetSpace, _sHelperMatrix);
return MatrixUtils.getTransformedBoundsRect(
@@ -24,7 +20,7 @@ class GxIcon extends IAnimatable {
}
@override
- IAnimatable hitTest(GxPoint localPoint, [bool useShape = false]) {
+ DisplayObject hitTest(GxPoint localPoint, [bool useShape = false]) {
if (!visible || !touchable) return null;
return _localBounds.containsPoint(localPoint) ? this : null;
}
diff --git a/lib/graphx/render/movie_clip.dart b/lib/src/render/movie_clip.dart
similarity index 94%
rename from lib/graphx/render/movie_clip.dart
rename to lib/src/render/movie_clip.dart
index 9907eeb..bb6701b 100644
--- a/lib/graphx/render/movie_clip.dart
+++ b/lib/src/render/movie_clip.dart
@@ -1,6 +1,8 @@
-import 'package:graphx/graphx/display/bitmap.dart';
-import 'package:graphx/graphx/events/signal.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
+import '../../graphx.dart';
+import '../events/events.dart';
+import '../textures/textures.dart';
+
+
class MovieClip extends Bitmap {
double timeDilation = 1;
diff --git a/lib/graphx/render/particles/simple_particle.dart b/lib/src/render/particles/simple_particle.dart
similarity index 98%
rename from lib/graphx/render/particles/simple_particle.dart
rename to lib/src/render/particles/simple_particle.dart
index a28edbe..a4fb9c0 100644
--- a/lib/graphx/render/particles/simple_particle.dart
+++ b/lib/src/render/particles/simple_particle.dart
@@ -1,8 +1,8 @@
import 'dart:math';
import 'dart:ui';
-import 'package:graphx/graphx/render/particles/simple_particle_system.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
+import '../../../graphx.dart';
+
class SimpleParticle {
SimpleParticle $next;
diff --git a/lib/graphx/render/particles/simple_particle_system.dart b/lib/src/render/particles/simple_particle_system.dart
similarity index 95%
rename from lib/graphx/render/particles/simple_particle_system.dart
rename to lib/src/render/particles/simple_particle_system.dart
index dd9231d..e5306a9 100644
--- a/lib/graphx/render/particles/simple_particle_system.dart
+++ b/lib/src/render/particles/simple_particle_system.dart
@@ -1,15 +1,11 @@
import 'dart:math';
import 'dart:ui';
-import 'package:graphx/graphx/display/display_object.dart';
-import 'package:graphx/graphx/render/particles/simple_particle.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
+import '../../../graphx.dart';
-import '../../core/graphx.dart';
-
-class SimpleParticleSystem extends IAnimatable {
- static GxMatrix _sHelperMatrix = GxMatrix();
- static GxPoint _sHelperPoint = GxPoint();
+class SimpleParticleSystem extends DisplayObject {
+ static final _sHelperMatrix = GxMatrix();
+ static final _sHelperPoint = GxPoint();
static Random random = Random();
bool useWorldSpace = false;
@@ -22,7 +18,7 @@ class SimpleParticleSystem extends IAnimatable {
}
@override
- GxRect getBounds(IAnimatable targetSpace, [GxRect out]) {
+ GxRect getBounds(DisplayObject targetSpace, [GxRect out]) {
final matrix = _sHelperMatrix;
matrix.identity();
getTransformationMatrix(targetSpace, matrix);
diff --git a/lib/src/render/render.dart b/lib/src/render/render.dart
new file mode 100644
index 0000000..7c75e76
--- /dev/null
+++ b/lib/src/render/render.dart
@@ -0,0 +1,7 @@
+export './filters/color_filter.dart';
+export './graphics.dart';
+export './gx_icon.dart';
+export './movie_clip.dart';
+export './particles/simple_particle.dart';
+export './particles/simple_particle_system.dart';
+export './svg_shape.dart';
\ No newline at end of file
diff --git a/lib/graphx/render/svg_shape.dart b/lib/src/render/svg_shape.dart
similarity index 89%
rename from lib/graphx/render/svg_shape.dart
rename to lib/src/render/svg_shape.dart
index 300b58a..3439d15 100644
--- a/lib/graphx/render/svg_shape.dart
+++ b/lib/src/render/svg_shape.dart
@@ -1,11 +1,11 @@
import 'dart:ui';
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/utils/matrix_utils.dart';
+import '../../graphx.dart';
+import '../utils/utils.dart';
-class SvgShape extends IAnimatable {
- static GxMatrix _sHelperMatrix = GxMatrix();
- static GxPoint _sHelperPoint = GxPoint();
+class SvgShape extends DisplayObject {
+ static final GxMatrix _sHelperMatrix = GxMatrix();
+ static final GxPoint _sHelperPoint = GxPoint();
Color _tint;
@@ -62,7 +62,7 @@ class SvgShape extends IAnimatable {
}
@override
- GxRect getBounds(IAnimatable targetSpace, [GxRect out]) {
+ GxRect getBounds(DisplayObject targetSpace, [GxRect out]) {
final matrix = _sHelperMatrix;
matrix.identity();
getTransformationMatrix(targetSpace, matrix);
diff --git a/lib/graphx/text/text_format.dart b/lib/src/text/text_format.dart
similarity index 100%
rename from lib/graphx/text/text_format.dart
rename to lib/src/text/text_format.dart
diff --git a/lib/graphx/textures/base_texture.dart b/lib/src/textures/base_texture.dart
similarity index 96%
rename from lib/graphx/textures/base_texture.dart
rename to lib/src/textures/base_texture.dart
index 5721120..5ef156c 100644
--- a/lib/graphx/textures/base_texture.dart
+++ b/lib/src/textures/base_texture.dart
@@ -1,6 +1,9 @@
import 'dart:ui';
-import 'package:graphx/graphx/geom/gxrect.dart';
+import '../../graphx.dart';
+
+
+
class GxTexture {
Image source;
diff --git a/lib/graphx/textures/gx_texture_utils.dart b/lib/src/textures/gx_texture_utils.dart
similarity index 100%
rename from lib/graphx/textures/gx_texture_utils.dart
rename to lib/src/textures/gx_texture_utils.dart
diff --git a/lib/src/textures/textures.dart b/lib/src/textures/textures.dart
new file mode 100644
index 0000000..a7a13db
--- /dev/null
+++ b/lib/src/textures/textures.dart
@@ -0,0 +1,2 @@
+export './base_texture.dart';
+export './gx_texture_utils.dart';
\ No newline at end of file
diff --git a/lib/graphx/ticker/gx_ticker.dart b/lib/src/ticker/gx_ticker.dart
similarity index 96%
rename from lib/graphx/ticker/gx_ticker.dart
rename to lib/src/ticker/gx_ticker.dart
index ed75040..614ab37 100644
--- a/lib/graphx/ticker/gx_ticker.dart
+++ b/lib/src/ticker/gx_ticker.dart
@@ -1,5 +1,7 @@
+
import 'package:flutter/scheduler.dart';
-import 'package:graphx/graphx/events/signal.dart';
+
+import '../events/events.dart';
class GxTicker {
GxTicker();
diff --git a/lib/graphx/utils/assets_loader.dart b/lib/src/utils/assets_loader.dart
similarity index 88%
rename from lib/graphx/utils/assets_loader.dart
rename to lib/src/utils/assets_loader.dart
index 11cfd99..817a2c7 100644
--- a/lib/graphx/utils/assets_loader.dart
+++ b/lib/src/utils/assets_loader.dart
@@ -3,8 +3,10 @@ import 'dart:typed_data';
import 'dart:ui';
import 'package:flutter/services.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
-import 'package:graphx/graphx/utils/texture_utils.dart';
+
+import '../../graphx.dart';
+
+
abstract class AssetLoader {
static Future loadImageTexture(
diff --git a/lib/graphx/utils/interfases.dart b/lib/src/utils/interfases.dart
similarity index 67%
rename from lib/graphx/utils/interfases.dart
rename to lib/src/utils/interfases.dart
index d7f0bdb..b7c0664 100644
--- a/lib/graphx/utils/interfases.dart
+++ b/lib/src/utils/interfases.dart
@@ -1,6 +1,8 @@
import 'dart:ui';
-import 'package:graphx/graphx/geom/gxrect.dart';
+import '../../graphx.dart';
+
+
abstract class GxRenderable {
void paint(Canvas canvas);
diff --git a/lib/graphx/utils/list_utils.dart b/lib/src/utils/list_utils.dart
similarity index 74%
rename from lib/graphx/utils/list_utils.dart
rename to lib/src/utils/list_utils.dart
index c2b9472..a1e9581 100644
--- a/lib/graphx/utils/list_utils.dart
+++ b/lib/src/utils/list_utils.dart
@@ -1,9 +1,10 @@
-import 'package:graphx/graphx/display/display_object.dart';
-import 'package:graphx/graphx/display/display_object_container.dart';
+
+
+import '../../graphx.dart';
abstract class ListUtils {
- static void mergeSort(List input, SortChildrenCallback compare,
- int startIndex, int len, List buffer) {
+ static void mergeSort(List input, SortChildrenCallback compare,
+ int startIndex, int len, List buffer) {
if (len > 1) {
int i,
endIndex = startIndex + len,
diff --git a/lib/graphx/utils/math_utils.dart b/lib/src/utils/math_utils.dart
similarity index 98%
rename from lib/graphx/utils/math_utils.dart
rename to lib/src/utils/math_utils.dart
index 5d77888..7670bc9 100644
--- a/lib/graphx/utils/math_utils.dart
+++ b/lib/src/utils/math_utils.dart
@@ -1,8 +1,11 @@
import 'dart:math' as math;
-import 'package:graphx/graphx/geom/gxpoint.dart';
import 'package:vector_math/vector_math_64.dart';
+import '../../graphx.dart';
+
+
+
double deg2rad(double deg) => deg / 180.0 * math.pi;
double rad2deg(double rad) => rad / math.pi * 180.0;
diff --git a/lib/graphx/utils/matrix_utils.dart b/lib/src/utils/matrix_utils.dart
similarity index 61%
rename from lib/graphx/utils/matrix_utils.dart
rename to lib/src/utils/matrix_utils.dart
index 65df45b..d71a97c 100644
--- a/lib/graphx/utils/matrix_utils.dart
+++ b/lib/src/utils/matrix_utils.dart
@@ -1,7 +1,7 @@
import 'dart:math' as math;
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
+import '../../graphx.dart';
+
abstract class MatrixUtils {
static void skew(GxMatrix matrix, double skewX, double skewY) {
@@ -24,18 +24,18 @@ abstract class MatrixUtils {
out ??= GxRect();
// out = out.getBounds(matrix);
// return out;
- double minX = 10000000.0;
- double maxX = -10000000.0;
- double minY = 10000000.0;
- double maxY = -10000000.0;
- double tx1 = matrix.a * rect.x + matrix.c * rect.y + matrix.tx;
- double ty1 = matrix.d * rect.y + matrix.b * rect.x + matrix.ty;
- double tx2 = matrix.a * rect.x + matrix.c * rect.bottom + matrix.tx;
- double ty2 = matrix.d * rect.bottom + matrix.b * rect.x + matrix.ty;
- double tx3 = matrix.a * rect.right + matrix.c * rect.y + matrix.tx;
- double ty3 = matrix.d * rect.y + matrix.b * rect.right + matrix.ty;
- double tx4 = matrix.a * rect.right + matrix.c * rect.bottom + matrix.tx;
- double ty4 = matrix.d * rect.bottom + matrix.b * rect.right + matrix.ty;
+ var minX = 10000000.0;
+ var maxX = -10000000.0;
+ var minY = 10000000.0;
+ var maxY = -10000000.0;
+ var tx1 = matrix.a * rect.x + matrix.c * rect.y + matrix.tx;
+ var ty1 = matrix.d * rect.y + matrix.b * rect.x + matrix.ty;
+ var tx2 = matrix.a * rect.x + matrix.c * rect.bottom + matrix.tx;
+ var ty2 = matrix.d * rect.bottom + matrix.b * rect.x + matrix.ty;
+ var tx3 = matrix.a * rect.right + matrix.c * rect.y + matrix.tx;
+ var ty3 = matrix.d * rect.y + matrix.b * rect.right + matrix.ty;
+ var tx4 = matrix.a * rect.right + matrix.c * rect.bottom + matrix.tx;
+ var ty4 = matrix.d * rect.bottom + matrix.b * rect.right + matrix.ty;
if (minX > tx1) minX = tx1;
if (minX > tx2) minX = tx2;
if (minX > tx3) minX = tx3;
diff --git a/lib/graphx/utils/mixins.dart b/lib/src/utils/mixins.dart
similarity index 92%
rename from lib/graphx/utils/mixins.dart
rename to lib/src/utils/mixins.dart
index a78532e..5d6b6d9 100644
--- a/lib/graphx/utils/mixins.dart
+++ b/lib/src/utils/mixins.dart
@@ -1,9 +1,8 @@
import 'dart:ui';
-import 'package:graphx/graphx/geom/gxrect.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
+import '../../graphx.dart';
+
-import 'interfases.dart';
mixin RenderUtilMixin {
Picture createPicture([void Function(Canvas) prepaintCallback]) {
diff --git a/lib/graphx/utils/painter_utils.dart b/lib/src/utils/painter_utils.dart
similarity index 100%
rename from lib/graphx/utils/painter_utils.dart
rename to lib/src/utils/painter_utils.dart
diff --git a/lib/graphx/utils/pools.dart b/lib/src/utils/pools.dart
similarity index 89%
rename from lib/graphx/utils/pools.dart
rename to lib/src/utils/pools.dart
index 12a6779..4eaa80f 100644
--- a/lib/graphx/utils/pools.dart
+++ b/lib/src/utils/pools.dart
@@ -1,6 +1,6 @@
-import 'package:graphx/graphx/geom/gxmatrix.dart';
-import 'package:graphx/graphx/geom/gxpoint.dart';
-import 'package:graphx/graphx/geom/gxrect.dart';
+
+
+import '../../graphx.dart';
abstract class Pool {
static final _points = [];
diff --git a/lib/graphx/utils/texture_utils.dart b/lib/src/utils/texture_utils.dart
similarity index 92%
rename from lib/graphx/utils/texture_utils.dart
rename to lib/src/utils/texture_utils.dart
index cb6c41e..a235c72 100644
--- a/lib/graphx/utils/texture_utils.dart
+++ b/lib/src/utils/texture_utils.dart
@@ -1,6 +1,5 @@
-import 'package:graphx/graphx/core/graphx.dart';
-import 'package:graphx/graphx/render/graphics.dart';
-import 'package:graphx/graphx/textures/base_texture.dart';
+
+import '../../graphx.dart';
abstract class TextureUtils {
static Shape _helperShape = Shape();
diff --git a/lib/src/utils/utils.dart b/lib/src/utils/utils.dart
new file mode 100644
index 0000000..5ca11ad
--- /dev/null
+++ b/lib/src/utils/utils.dart
@@ -0,0 +1,9 @@
+export './assets_loader.dart';
+export './interfases.dart';
+export './list_utils.dart';
+export './math_utils.dart';
+export './matrix_utils.dart';
+export './mixins.dart';
+export './painter_utils.dart';
+export './pools.dart';
+export './texture_utils.dart';
diff --git a/lib/graphx/widgets/graphx_widget.dart b/lib/src/widgets/graphx_widget.dart
similarity index 95%
rename from lib/graphx/widgets/graphx_widget.dart
rename to lib/src/widgets/graphx_widget.dart
index 2e1599e..e5f0461 100644
--- a/lib/graphx/widgets/graphx_widget.dart
+++ b/lib/src/widgets/graphx_widget.dart
@@ -1,7 +1,10 @@
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
-import 'package:graphx/graphx/input/input_converter.dart';
-import 'package:graphx/graphx/core/scene_controller.dart';
+
+import '../../graphx.dart';
+import '../core/core.dart';
+
+
class SceneBuilderWidget extends StatefulWidget {
final Widget child;
diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig
deleted file mode 100644
index 785633d..0000000
--- a/macos/Flutter/Flutter-Debug.xcconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
-#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig
deleted file mode 100644
index 5fba960..0000000
--- a/macos/Flutter/Flutter-Release.xcconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
-#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift
deleted file mode 100644
index cccf817..0000000
--- a/macos/Flutter/GeneratedPluginRegistrant.swift
+++ /dev/null
@@ -1,10 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-import FlutterMacOS
-import Foundation
-
-
-func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
-}
diff --git a/macos/Podfile b/macos/Podfile
deleted file mode 100644
index d60ec71..0000000
--- a/macos/Podfile
+++ /dev/null
@@ -1,82 +0,0 @@
-platform :osx, '10.11'
-
-# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
-ENV['COCOAPODS_DISABLE_STATS'] = 'true'
-
-project 'Runner', {
- 'Debug' => :debug,
- 'Profile' => :release,
- 'Release' => :release,
-}
-
-def parse_KV_file(file, separator='=')
- file_abs_path = File.expand_path(file)
- if !File.exists? file_abs_path
- return [];
- end
- pods_ary = []
- skip_line_start_symbols = ["#", "/"]
- File.foreach(file_abs_path) { |line|
- next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
- plugin = line.split(pattern=separator)
- if plugin.length == 2
- podname = plugin[0].strip()
- path = plugin[1].strip()
- podpath = File.expand_path("#{path}", file_abs_path)
- pods_ary.push({:name => podname, :path => podpath});
- else
- puts "Invalid plugin specification: #{line}"
- end
- }
- return pods_ary
-end
-
-def pubspec_supports_macos(file)
- file_abs_path = File.expand_path(file)
- if !File.exists? file_abs_path
- return false;
- end
- File.foreach(file_abs_path) { |line|
- return true if line =~ /^\s*macos:/
- }
- return false
-end
-
-target 'Runner' do
- use_frameworks!
- use_modular_headers!
-
- # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
- # referring to absolute paths on developers' machines.
- ephemeral_dir = File.join('Flutter', 'ephemeral')
- symlink_dir = File.join(ephemeral_dir, '.symlinks')
- symlink_plugins_dir = File.join(symlink_dir, 'plugins')
- system("rm -rf #{symlink_dir}")
- system("mkdir -p #{symlink_plugins_dir}")
-
- # Flutter Pods
- generated_xcconfig = parse_KV_file(File.join(ephemeral_dir, 'Flutter-Generated.xcconfig'))
- if generated_xcconfig.empty?
- puts "Flutter-Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
- end
- generated_xcconfig.map { |p|
- if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
- symlink = File.join(symlink_dir, 'flutter')
- File.symlink(File.dirname(p[:path]), symlink)
- pod 'FlutterMacOS', :path => File.join(symlink, File.basename(p[:path]))
- end
- }
-
- # Plugin Pods
- plugin_pods = parse_KV_file('../.flutter-plugins')
- plugin_pods.map { |p|
- symlink = File.join(symlink_plugins_dir, p[:name])
- File.symlink(p[:path], symlink)
- if pubspec_supports_macos(File.join(symlink, 'pubspec.yaml'))
- pod p[:name], :path => File.join(symlink, 'macos')
- end
- }
-end
-
-# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
-install! 'cocoapods', :disable_input_output_paths => true
diff --git a/macos/Podfile.lock b/macos/Podfile.lock
deleted file mode 100644
index 499bf62..0000000
--- a/macos/Podfile.lock
+++ /dev/null
@@ -1,3 +0,0 @@
-PODFILE CHECKSUM: d8ba9b3e9e93c62c74a660b46c6fcb09f03991a7
-
-COCOAPODS: 1.10.0
diff --git a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d9810..0000000
--- a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 21a3cc1..0000000
--- a/macos/Runner.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements
deleted file mode 100644
index 02ce7ec..0000000
--- a/macos/Runner/Release.entitlements
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- com.apple.security.app-sandbox
-
- com.apple.security.files.downloads.read-write
-
- com.apple.security.files.user-selected.read-write
-
- com.apple.security.network.client
-
- com.apple.security.network.server
-
-
-
diff --git a/pubspec.lock b/pubspec.lock
index 82adc97..07d0268 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -7,68 +7,61 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
- version: "2.5.0-nullsafety.2"
+ version: "2.4.2"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.0-nullsafety.2"
+ version: "2.0.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0-nullsafety.4"
+ version: "1.0.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0-nullsafety.2"
+ version: "1.1.3"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0-nullsafety.2"
+ version: "1.0.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
- version: "1.15.0-nullsafety.4"
- convert:
- dependency: transitive
+ version: "1.14.13"
+ effective_dart:
+ dependency: "direct dev"
description:
- name: convert
+ name: effective_dart
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.1"
+ version: "1.2.4"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0-nullsafety.2"
+ version: "1.1.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
- flutter_svg:
- dependency: "direct main"
- description:
- name: flutter_svg
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.19.1"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -80,42 +73,28 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.10-nullsafety.2"
+ version: "0.12.8"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
- version: "1.3.0-nullsafety.5"
+ version: "1.1.8"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
- version: "1.8.0-nullsafety.2"
- path_drawing:
- dependency: transitive
- description:
- name: path_drawing
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.4.1+1"
- path_parsing:
- dependency: transitive
- description:
- name: path_parsing
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.1.4"
- petitparser:
- dependency: transitive
+ version: "1.7.0"
+ pedantic:
+ dependency: "direct dev"
description:
- name: petitparser
+ name: pedantic
url: "https://pub.dartlang.org"
source: hosted
- version: "3.1.0"
+ version: "1.9.0"
sky_engine:
dependency: transitive
description: flutter
@@ -127,63 +106,55 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
- version: "1.8.0-nullsafety.3"
+ version: "1.7.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
- version: "1.10.0-nullsafety.5"
+ version: "1.9.5"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.0-nullsafety.2"
+ version: "2.0.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0-nullsafety.2"
+ version: "1.0.5"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0-nullsafety.2"
+ version: "1.1.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.2.19-nullsafety.4"
+ version: "0.2.17"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
- version: "1.3.0-nullsafety.4"
+ version: "1.2.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.0-nullsafety.4"
- xml:
- dependency: transitive
- description:
- name: xml
- url: "https://pub.dartlang.org"
- source: hosted
- version: "4.5.1"
+ version: "2.0.8"
sdks:
- dart: ">=2.11.0-0.0 <2.12.0"
- flutter: ">=1.18.0-6.0.pre <2.0.0"
+ dart: ">=2.9.1 <3.0.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index a29e5b6..d4a79fa 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,83 +1,17 @@
name: graphx
-description: Graphx rendering prototype
-
-# The following line prevents the package from being accidentally published to
-# pub.dev using `pub publish`. This is preferred for private packages.
-publish_to: 'none' # Remove this line if you wish to publish to pub.dev
-
-# The following defines the version and build number for your application.
-# A version number is three numbers separated by dots, like 1.2.43
-# followed by an optional build number separated by a +.
-# Both the version and the builder number may be overridden in flutter
-# build by specifying --build-name and --build-number, respectively.
-# In Android, build-name is used as versionName while build-number used as versionCode.
-# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
-# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
-# Read more about iOS versioning at
-# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 1.0.0+1
+description: A starting point for Dart libraries or applications.
+version: 1.0.0
+homepage: https://github.com/roipeker/graphx
environment:
- sdk: ">=2.7.0 <3.0.0"
+ sdk: '>=2.9.1 <3.0.0'
dependencies:
- flutter:
+ flutter:
sdk: flutter
- flutter_svg: ^0.19.1
-
- # just_audio: ^0.5.4
-# just_audio_web: any
- # The following adds the Cupertino Icons font to your application.
- # Use with the CupertinoIcons class for iOS style icons.
-# cupertino_icons: ^1.0.0
dev_dependencies:
+ pedantic: ^1.9.0
flutter_test:
sdk: flutter
-
-# For information on the generic Dart part of this file, see the
-# following page: https://dart.dev/tools/pub/pubspec
-
-# The following section is specific to Flutter.
-flutter:
-
- # The following line ensures that the Material Icons font is
- # included with your application, so that you can use the icons in
- # the material Icons class.
- uses-material-design: true
-
- # To add assets to your application, add an assets section, like this:
- assets:
- - assets/
- - assets/game/
- - assets/game/flare/
-# - assets/santorini.jpg
- # assets:
- # - images/a_dot_burr.jpeg
- # - images/a_dot_ham.jpeg
-
- # An image asset can refer to one or more resolution-specific "variants", see
- # https://flutter.dev/assets-and-images/#resolution-aware.
-
- # For details regarding adding assets from package dependencies, see
- # https://flutter.dev/assets-and-images/#from-packages
-
- # To add custom fonts to your application, add a fonts section here,
- # in this "flutter" section. Each entry in this list should have a
- # "family" key with the font family name, and a "fonts" key with a
- # list giving the asset and other descriptors for the font. For
- # example:
- # fonts:
- # - family: Schyler
- # fonts:
- # - asset: fonts/Schyler-Regular.ttf
- # - asset: fonts/Schyler-Italic.ttf
- # style: italic
- # - family: Trajan Pro
- # fonts:
- # - asset: fonts/TrajanPro.ttf
- # - asset: fonts/TrajanPro_Bold.ttf
- # weight: 700
- #
- # For details regarding fonts from package dependencies,
- # see https://flutter.dev/custom-fonts/#from-packages
+ effective_dart: ^1.0.0
\ No newline at end of file
diff --git a/test/widget_test.dart b/test/widget_test.dart
deleted file mode 100644
index 8280551..0000000
--- a/test/widget_test.dart
+++ /dev/null
@@ -1,30 +0,0 @@
-// This is a basic Flutter widget test.
-//
-// To perform an interaction with a widget in your test, use the WidgetTester
-// utility that Flutter provides. For example, you can send tap and scroll
-// gestures. You can also use WidgetTester to find child widgets in the widget
-// tree, read text, and verify that the values of widget properties are correct.
-
-import 'package:flutter/material.dart';
-import 'package:flutter_test/flutter_test.dart';
-
-import 'package:graphx/main.dart';
-
-void main() {
- testWidgets('Counter increments smoke test', (WidgetTester tester) async {
- // Build our app and trigger a frame.
- await tester.pumpWidget(MyApp());
-
- // Verify that our counter starts at 0.
- expect(find.text('0'), findsOneWidget);
- expect(find.text('1'), findsNothing);
-
- // Tap the '+' icon and trigger a frame.
- await tester.tap(find.byIcon(Icons.add));
- await tester.pump();
-
- // Verify that our counter has incremented.
- expect(find.text('0'), findsNothing);
- expect(find.text('1'), findsOneWidget);
- });
-}