rename/export Flutter widgets
This commit is contained in:
@@ -3,15 +3,15 @@ import 'dart:io';
|
||||
import 'package:thermion_dart/thermion_dart/thermion_viewer.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'filament_gesture_detector_desktop.dart';
|
||||
import 'filament_gesture_detector_mobile.dart';
|
||||
import 'thermion_gesture_detector_desktop.dart';
|
||||
import 'thermion_gesture_detector_mobile.dart';
|
||||
|
||||
enum GestureType { rotateCamera, panCamera, panBackground }
|
||||
|
||||
///
|
||||
/// A widget that translates finger/mouse gestures to zoom/pan/rotate actions.
|
||||
///
|
||||
class FilamentGestureDetector extends StatelessWidget {
|
||||
class ThermionGestureDetector extends StatelessWidget {
|
||||
///
|
||||
/// The content to display below the gesture detector/listener widget.
|
||||
/// This will usually be a ThermionWidget (so you can navigate by directly interacting with the viewport), but this is not necessary.
|
||||
@@ -45,7 +45,7 @@ class FilamentGestureDetector extends StatelessWidget {
|
||||
final void Function(ScaleUpdateDetails)? onScaleUpdate;
|
||||
final void Function(ScaleEndDetails)? onScaleEnd;
|
||||
|
||||
const FilamentGestureDetector(
|
||||
const ThermionGestureDetector(
|
||||
{Key? key,
|
||||
required this.controller,
|
||||
this.child,
|
||||
@@ -68,7 +68,7 @@ class FilamentGestureDetector extends StatelessWidget {
|
||||
if (kIsWeb || Platform.isLinux ||
|
||||
Platform.isWindows ||
|
||||
Platform.isMacOS) {
|
||||
return FilamentGestureDetectorDesktop(
|
||||
return ThermionGestureDetectorDesktop(
|
||||
controller: controller,
|
||||
child: child,
|
||||
showControlOverlay: showControlOverlay,
|
||||
@@ -76,7 +76,7 @@ class FilamentGestureDetector extends StatelessWidget {
|
||||
enablePicking: enablePicking,
|
||||
);
|
||||
} else {
|
||||
return FilamentGestureDetectorMobile(
|
||||
return ThermionGestureDetectorMobile(
|
||||
controller: controller,
|
||||
child: child,
|
||||
showControlOverlay: showControlOverlay,
|
||||
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
||||
///
|
||||
/// A widget that translates finger/mouse gestures to zoom/pan/rotate actions.
|
||||
///
|
||||
class FilamentGestureDetectorDesktop extends StatefulWidget {
|
||||
class ThermionGestureDetectorDesktop extends StatefulWidget {
|
||||
///
|
||||
/// The content to display below the gesture detector/listener widget.
|
||||
/// This will usually be a ThermionWidget (so you can navigate by directly interacting with the viewport), but this is not necessary.
|
||||
@@ -37,7 +37,7 @@ class FilamentGestureDetectorDesktop extends StatefulWidget {
|
||||
///
|
||||
final bool enablePicking;
|
||||
|
||||
const FilamentGestureDetectorDesktop(
|
||||
const ThermionGestureDetectorDesktop(
|
||||
{Key? key,
|
||||
required this.controller,
|
||||
this.child,
|
||||
@@ -47,11 +47,11 @@ class FilamentGestureDetectorDesktop extends StatefulWidget {
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _FilamentGestureDetectorDesktopState();
|
||||
State<StatefulWidget> createState() => _ThermionGestureDetectorDesktopState();
|
||||
}
|
||||
|
||||
class _FilamentGestureDetectorDesktopState
|
||||
extends State<FilamentGestureDetectorDesktop> {
|
||||
class _ThermionGestureDetectorDesktopState
|
||||
extends State<ThermionGestureDetectorDesktop> {
|
||||
///
|
||||
///
|
||||
///
|
||||
@@ -69,7 +69,7 @@ class _FilamentGestureDetectorDesktopState
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(FilamentGestureDetectorDesktop oldWidget) {
|
||||
void didUpdateWidget(ThermionGestureDetectorDesktop oldWidget) {
|
||||
if (widget.showControlOverlay != oldWidget.showControlOverlay ||
|
||||
widget.enableCamera != oldWidget.enableCamera ||
|
||||
widget.enablePicking != oldWidget.enablePicking) {
|
||||
@@ -7,7 +7,7 @@ enum GestureType { rotateCamera, panCamera, panBackground }
|
||||
///
|
||||
/// A widget that translates finger/mouse gestures to zoom/pan/rotate actions.
|
||||
///
|
||||
class FilamentGestureDetectorMobile extends StatefulWidget {
|
||||
class ThermionGestureDetectorMobile extends StatefulWidget {
|
||||
///
|
||||
/// The content to display below the gesture detector/listener widget.
|
||||
/// This will usually be a ThermionWidget (so you can navigate by directly interacting with the viewport), but this is not necessary.
|
||||
@@ -43,7 +43,7 @@ class FilamentGestureDetectorMobile extends StatefulWidget {
|
||||
final void Function(ScaleUpdateDetails)? onScaleUpdate;
|
||||
final void Function(ScaleEndDetails)? onScaleEnd;
|
||||
|
||||
const FilamentGestureDetectorMobile(
|
||||
const ThermionGestureDetectorMobile(
|
||||
{Key? key,
|
||||
required this.controller,
|
||||
this.child,
|
||||
@@ -57,11 +57,11 @@ class FilamentGestureDetectorMobile extends StatefulWidget {
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _FilamentGestureDetectorMobileState();
|
||||
State<StatefulWidget> createState() => _ThermionGestureDetectorMobileState();
|
||||
}
|
||||
|
||||
class _FilamentGestureDetectorMobileState
|
||||
extends State<FilamentGestureDetectorMobile> {
|
||||
class _ThermionGestureDetectorMobileState
|
||||
extends State<ThermionGestureDetectorMobile> {
|
||||
GestureType gestureType = GestureType.panCamera;
|
||||
|
||||
final _icons = {
|
||||
@@ -116,7 +116,7 @@ class _FilamentGestureDetectorMobileState
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(FilamentGestureDetectorMobile oldWidget) {
|
||||
void didUpdateWidget(ThermionGestureDetectorMobile oldWidget) {
|
||||
if (widget.showControlOverlay != oldWidget.showControlOverlay ||
|
||||
widget.enableCamera != oldWidget.enableCamera ||
|
||||
widget.enablePicking != oldWidget.enablePicking) {
|
||||
@@ -2,4 +2,6 @@ library thermion_flutter;
|
||||
|
||||
export 'thermion/thermion_flutter_plugin.dart';
|
||||
export 'thermion/widgets/thermion_widget.dart';
|
||||
export 'thermion/widgets/camera/gestures/thermion_gesture_detector.dart';
|
||||
|
||||
export 'package:thermion_dart/thermion_dart.dart';
|
||||
|
||||
Reference in New Issue
Block a user