diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml
new file mode 100644
index 0000000..25d388a
--- /dev/null
+++ b/.idea/libraries/Dart_SDK.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/KotlinJavaRuntime.xml b/.idea/libraries/KotlinJavaRuntime.xml
new file mode 100644
index 0000000..2b96ac4
--- /dev/null
+++ b/.idea/libraries/KotlinJavaRuntime.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..8a1facc
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/.idea/runConfigurations/main_dart.xml b/.idea/runConfigurations/main_dart.xml
new file mode 100644
index 0000000..aab7b5c
--- /dev/null
+++ b/.idea/runConfigurations/main_dart.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..5b3388c
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.metadata b/.metadata
new file mode 100644
index 0000000..085e319
--- /dev/null
+++ b/.metadata
@@ -0,0 +1,30 @@
+# 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.
+
+version:
+ revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
+ channel: stable
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
+ base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
+ - platform: macos
+ create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
+ base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 99ef94a..b4cf00f 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -9,20 +9,14 @@
"type": "dart",
"request": "attach",
"osx": {
- "deviceId": "macos",
"serviceInfoFile": "${env:TMPDIR}vmservice.nativeshell_examples",
- "vmServiceInfoFile": "${env:TMPDIR}vmservice.nativeshell_examples"
},
"windows": {
- "deviceId": "windows",
- "serviceInfoFile": "${env:TEMP}/vmservice.nativeshell_examples",
- "vmServiceInfoFile": "${env:TEMP}/vmservice.nativeshell_examples"
+ "serviceInfoFile": "${env:TEMP}/vmservice.nativeshell_examples"
},
"linux": {
- "deviceId": "linux",
- "serviceInfoFile": "${env:XDG_RUNTIME_DIR}/vmservice.nativeshell_examples",
- "vmServiceInfoFile": "${env:XDG_RUNTIME_DIR}/vmservice.nativeshell_examples"
+ "serviceInfoFile": "${env:XDG_RUNTIME_DIR}/vmservice.nativeshell_examples"
}
},
]
-}
+}
\ No newline at end of file
diff --git a/examples.iml b/examples.iml
new file mode 100644
index 0000000..e5c8371
--- /dev/null
+++ b/examples.iml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lib/main.dart b/lib/main.dart
index d98e17f..b76c110 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,11 +1,10 @@
import 'package:flutter/material.dart';
-import 'package:flutter/rendering.dart';
import 'package:nativeshell/nativeshell.dart';
-import 'pages/other_window.dart';
-import 'pages/platform_channels.dart';
import 'main_window.dart';
import 'pages/modal_window.dart';
+import 'pages/other_window.dart';
+import 'pages/platform_channels.dart';
import 'widgets/veil.dart';
void main() async {
diff --git a/lib/main_window.dart b/lib/main_window.dart
index 16e3f81..ee2cb9f 100644
--- a/lib/main_window.dart
+++ b/lib/main_window.dart
@@ -1,35 +1,32 @@
import 'dart:io';
import 'package:flutter/material.dart';
-import 'package:flutter/painting.dart';
-import 'package:flutter/rendering.dart';
-import 'package:flutter/widgets.dart';
-import 'package:nativeshell/nativeshell.dart';
+import 'package:nativeshell/nativeshell.dart' as nshell;
import 'package:nativeshell_examples/pages/flutter_plugins.dart';
import 'main.dart';
-import 'widgets/button.dart';
-import 'pages/window_management.dart';
import 'pages/drag_drop.dart';
import 'pages/file_open_dialog.dart';
import 'pages/menu.dart';
-import 'widgets/page.dart';
import 'pages/platform_channels.dart';
+import 'pages/window_management.dart';
+import 'widgets/button.dart';
+import 'widgets/page.dart';
-class MainWindowState extends WindowState {
+class MainWindowState extends nshell.WindowState {
@override
Widget build(BuildContext context) {
return ExamplesWindow(child: MainWindow());
}
@override
- WindowSizingMode get windowSizingMode =>
- WindowSizingMode.atLeastIntrinsicSize;
+ nshell.WindowSizingMode get windowSizingMode =>
+ nshell.WindowSizingMode.atLeastIntrinsicSize;
@override
Future initializeWindow(Size intrinsicContentSize) async {
if (Platform.isMacOS) {
- await Menu(_buildMenu).setAsAppMenu();
+ await nshell.Menu(_buildMenu).setAsAppMenu();
}
await window.setTitle('NativeShell Examples');
return super.initializeWindow(intrinsicContentSize);
@@ -38,18 +35,22 @@ class MainWindowState extends WindowState {
// This will be the default "fallback" app menu used for any window that doesn't
// have other menu
-List